110 #pragma comment(linker, \ 111 "\"/manifestdependency:type='Win32' "\ 112 "name='Microsoft.Windows.Common-Controls' "\ 113 "version='6.0.0.0' "\ 114 "processorArchitecture='*' "\ 115 "publicKeyToken='6595b64144ccf1df' "\ 138 while (curIndex < menuItemCount)
140 menuItemInfo.
cbSize =
sizeof(menuItemInfo);
143 menuItemInfo.
wID >= firstIDToDelete && menuItemInfo.
wID <= lastIDToDelete)
162 *newFolder = desktop;
176 public CWindowImpl<CToolbarProxy, CWindow, CControlWinTraits>
201 if (myWindow !=
NULL)
255 public CWindowImpl<CShellBrowser, CWindow, CFrameWinTraits>,
261 public IShellBrowserService,
265 public IDockingWindowSite,
775 hResult = persistStreamInit->InitNew();
790 _AtlBaseModule.GetModuleInstance(), 0);
813 newFolderSettings.
fFlags = 0;
831 reinterpret_cast<LPCITEMIDLIST>(
832 reinterpret_cast<const BYTE *>(pidl) +
length);
833 if (pidlnext->mkid.cb != 0)
851 if (ppidlLast !=
NULL)
855 if (ppidlLast !=
NULL)
866 hResult = psf->BindToObject(pidlParent,
NULL, *
riid,
ppv);
868 *ppidlLast = pidlChild;
888 hResult = parentFolder->GetDisplayNameOf(childPIDL,
uFlags, &L108);
895 hResult = parentFolder->GetAttributesOf(1, const_cast<LPCITEMIDLIST *>(&childPIDL), rgfInOut);
920 HWND newShellViewWindow;
921 BOOL windowUpdateIsLocked;
922 RECT shellViewWindowBounds;
929 if (newShellFolder ==
NULL)
939 if (travelLog->CountEntries(static_cast<IDropTarget *>(
this)) > 0)
940 hResult = travelLog->UpdateEntry(static_cast<IDropTarget *>(
this),
FALSE);
971 if (previousView !=
NULL)
974 ZeroMemory(&shellViewWindowBounds,
sizeof(shellViewWindowBounds));
982 hResult = newShellView->CreateViewWindow(saveCurrentShellView, folderSettings,
983 this, &shellViewWindowBounds, &newShellViewWindow);
989 if (windowUpdateIsLocked)
996 if (saveCurrentShellView !=
NULL)
997 saveCurrentShellView->DestroyViewWindow();
1000 if (previousView ==
NULL)
1006 saveCurrentShellView.
Release();
1007 saveCurrentShellFolder.
Release();
1009 hResult = newShellView->UIActivate(SVUIA_ACTIVATE_FOCUS);
1012 if (windowUpdateIsLocked)
1019 hResult = travelLog->AddEntry(static_cast<IDropTarget *>(
this),
FALSE);
1020 hResult = travelLog->UpdateEntry(static_cast<IDropTarget *>(
this),
FALSE);
1024 nameFlags = SHGDN_FORADDRESSBAR | SHGDN_FORPARSING;
1026 sizeof(newTitle) /
sizeof(
wchar_t),
NULL);
1037 nameFlags = SHGDN_FORADDRESSBAR | SHGDN_FORPARSING;
1039 nameFlags = SHGDN_FORADDRESSBAR;
1041 sizeof(newTitle) /
sizeof(
wchar_t),
NULL);
1093 hResult = bandSite->QueryBand(1, &deskBand,
NULL,
NULL, 0);
1097 return deskBand->QueryInterface(
riid, shellMenu);
1123 *
cache = newBaseBar;
1124 newBaseBar->AddRef();
1135 hResult = deskBar->SetClient(newBaseBarSite);
1140 hResult = newBaseBarSite->QueryInterface(
IID_PPV_ARG(IDeskBarClient, &deskBarClient));
1143 hResult = deskBarClient->SetDeskBarSite(newBaseBar);
1148 return (*cache)->QueryInterface(
riid, theBaseBar);
1166 hResult = deskBar->GetClient(&baseBarSite);
1173 hResult = bandSite->EnumBands(-1, &numBands);
1177 for(
i = 0;
i < numBands;
i++)
1181 hResult = bandSite->EnumBands(
i, &dwBandID);
1188 hResult = bandPersist->GetClassID(&clsidTmp);
1193 if (pdwBandID) *pdwBandID = dwBandID;
1214 hResult = deskBar->GetClient(&baseBarSite);
1227 TRACE(
"CLSID_ExplorerBand requested, building internal band.\n");
1234 TRACE(
"CLSID_FileSearchBand requested, building internal band.\n");
1241 TRACE(
"A different CLSID requested, using CoCreateInstance.\n");
1254 ERR(
"Can't get IBandSite interface\n");
1260 ERR(
"Can't find band object\n");
1276 hResult = dockingWindow->ShowDW(
TRUE);
1292 if (newDirectory ==
NULL)
1312 sheetInfo->phpage[sheetInfo->nPages] = thePage;
1313 sheetInfo->nPages++;
1326 memset(m_psp, 0,
sizeof(m_psp));
1327 memset(&m_PropSheet, 0,
sizeof(m_PropSheet));
1336 hResult =
IUnknown_SetSite(folderOptionsSheet, static_cast<IDispatch *>(
this));
1337 m_PropSheet.phpage = m_psp;
1343 hResult = globalSettings->Get(&shellState,
sizeof(shellState));
1349 hResult = folderOptionsSheet->AddPages(
AddFolderOptionsPage, reinterpret_cast<LPARAM>(&m_PropSheet));
1368 m_PropSheet.dwFlags = 0;
1369 m_PropSheet.hwndParent =
m_hWnd;
1370 m_PropSheet.hInstance = _AtlBaseModule.GetResourceInstance();
1371 m_PropSheet.pszCaption = strFolderOptions;
1372 m_PropSheet.nStartPage = 0;
1398 hResult = menuBand->TranslateMenuMessage(&
msg, &lResult);
1399 if (hResult ==
S_OK)
1410 if (handled ==
FALSE)
1450 for (
x = 0;
x < 3;
x++)
1461 RECT toolbarRect = clientRect;
1462 if (borderSpace.
top != 0)
1464 toolbarRect.
bottom = toolbarRect.
top + borderSpace.
top;
1466 else if (borderSpace.
bottom != 0)
1470 else if (borderSpace.
left != 0)
1474 else if (borderSpace.
right != 0)
1486 if (borderSpace.
top != 0)
1490 else if (borderSpace.
bottom != 0)
1494 else if (borderSpace.
left != 0)
1498 else if (borderSpace.
right != 0)
1516 params.rgvarg = arguments;
1521 while (pp <
vec.end())
1533 while (pp < vec2.
end())
1571 V_BOOL(&varArg[0]) = newState ? VARIANT_TRUE : VARIANT_FALSE;
1573 V_I4(&varArg[1]) = commandID;
1592 canGoForward =
false;
1596 hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(
this),
TLOG_BACK, &unusedEntry);
1602 hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(
this),
TLOG_FORE, &unusedEntry);
1605 canGoForward =
true;
1640 hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(
this),
1652 hResult = travelLog->GetTravelEntry(static_cast<IDropTarget *>(
this),
1668 hResult = travelLog->InsertMenuEntries(static_cast<IDropTarget *>(
this), theMenu, position,
1672 menuItemInfo.
cbSize =
sizeof(menuItemInfo);
1685 HMENU toolbarMenuBar;
1691 if (gotoMenu !=
NULL)
1701 CGID_PrivCITCommands, 5, commandList,
NULL);
1706 menuItemInfo.
cbSize =
sizeof(menuItemInfo);
1731 menuItemInfo.
cbSize =
sizeof(menuItemInfo);
1733 menuItemInfo.
hSubMenu = toolbarMenu;
1785 pEnumGUID->Next(1, &iter, &dwRead);
1830 CMINVOKECOMMANDINFO commandInfo;
1831 const char *searchGUID =
"{169A0691-8DF9-11d1-A1C4-00C04FD75D13}";
1836 memset(&commandInfo, 0,
sizeof(commandInfo));
1837 commandInfo.cbSize =
sizeof(commandInfo);
1838 commandInfo.hwnd =
m_hWnd;
1839 commandInfo.lpParameters = searchGUID;
1849 hResult = objectWithSite->SetSite(dynamic_cast<IShellBrowser*>(
this));
1852 hResult = contextMenu->InvokeCommand(&commandInfo);
1853 hResult = objectWithSite->SetSite(
NULL);
1873 if (int1Retry == int2Retry)
1880 static const INT excludeItems[] = { 1, 1, 1, 0xa001, 0, 0 };
1882 RECT availableBounds;
1885 for (
INT x = 0;
x < 3;
x++)
1895 *prcBorder = availableBounds;
1906 for (
INT x = 0;
x < 3;
x++)
1925 if (prgCmds ==
NULL)
1927 if (pguidCmdGroup ==
NULL)
1933 return commandTarget->QueryStatus(
NULL, 1, prgCmds, pCmdText);
1942 else if (
IsEqualIID(*pguidCmdGroup, CGID_Explorer))
1946 switch (prgCmds->
cmdID)
1981 else if (
IsEqualIID(*pguidCmdGroup, CGID_ShellBrowser))
1985 switch (prgCmds->
cmdID)
2007 TRACE(
"Unhandled null CGID %d %d %p %p\n", nCmdID, nCmdexecopt, pvaIn, pvaOut);
2010 if (
IsEqualIID(*pguidCmdGroup, CGID_Explorer))
2019 if (nCmdID == 0x1c) pclsid = &CLSID_FileSearchBand;
2020 else if (nCmdID == 0x1d) pclsid = &CLSID_SH_HistBand;
2021 else if (nCmdID == 0x1e) pclsid = &CLSID_SH_FavBand;
2022 else pclsid = &CLSID_ExplorerBand;
2047 if (nCmdexecopt == 1)
2058 V_INTREF(pvaOut) = reinterpret_cast<INT *>(
2077 else if (
IsEqualIID(*pguidCmdGroup, CGID_Theater))
2095 else if (
IsEqualIID(*pguidCmdGroup, CGID_ShellDocView))
2110 else if (
IsEqualIID(*pguidCmdGroup, CGID_ShellBrowser))
2126 else if (
IsEqualIID(*pguidCmdGroup, CGID_DefView))
2166 lpMenuWidths->width[0] = 2;
2167 lpMenuWidths->width[2] = 3;
2168 lpMenuWidths->width[4] = 1;
2194 hResult = shellMenu->SetMenu(hmenuShared,
m_hWnd, SMSET_DONTOWN);
2241 ShowBand(CLSID_ExplorerBand,
true);
2347 if (
IsEqualIID(guidService, SID_STopLevelBrowser))
2355 if (
IsEqualIID(guidService, SID_SProxyBrowser))
2882 for (
int i = 0;
i < 3;
i++)
2910 return travelLog->Travel(static_cast<IDropTarget *>(
this),
TLOG_BACK);
2919 return travelLog->Travel(static_cast<IDropTarget *>(
this),
TLOG_FORE);
3209 return ShowBand(classID, vertical);
3294 if (pWinData ==
NULL)
3325 hResult = pStream->
Read(&oldState,
sizeof(oldState), &numRead);
3328 if (numRead !=
sizeof(oldState) || oldState.
dwSize !=
sizeof(oldState))
3335 hResult = pStream->
Read(pidl, oldState.
pidlSize, &numRead);
3369 memset(&newState, 0,
sizeof(newState));
3370 newState.
dwSize =
sizeof(newState);
3373 if (viewPersistHistory.
p !=
NULL)
3375 hResult = viewPersistHistory->GetClassID(&newState.
persistClass);
3380 hResult = pStream->
Write(&newState,
sizeof(newState),
NULL);
3386 if (viewPersistHistory.
p !=
NULL)
3388 hResult = viewPersistHistory->SaveHistory(pStream);
3425 for (
int i = 0;
i < 3;
i++)
3443 hr =
bar->GetClient(&pBarSite);
3446 hr = pBarSite->QueryInterface(
IID_PPV_ARG(IDeskBarClient, &pClient));
3448 pClient->SetDeskBarSite(
NULL);
3474 RECT availableBounds;
3475 static const INT excludeItems[] = {1, 1, 1, 0xa001, 0, 0};
3481 for (
INT x = 0;
x < 3;
x++)
3489 hResult = dockingWindow->ResizeBorderDW(
3490 &availableBounds, static_cast<IDropTarget *>(
this),
TRUE);
3505 theMenu = reinterpret_cast<HMENU>(
wParam);
3569 TRACE(
"DoFolderOptions failed with hResult=%08lx\n", hResult);
3597 TRACE(
"GoBack failed with hResult=%08lx\n", hResult);
3605 TRACE(
"GoForward failed with hResult=%08lx\n", hResult);
3613 TRACE(
"NavigateToParent failed with hResult=%08lx\n", hResult);
3621 TRACE(
"GoHome failed with hResult=%08lx\n", hResult);
3630 TRACE(
"NavigateToParent failed with hResult=%08lx\n", hResult);
3745 ShowBand(CLSID_FileSearchBand,
true);
3748 ShowBand(CLSID_ExplorerBand,
true);
3757 WARN(
"Unknown id %x\n", wID);
3772 return ShellObjectCreatorInit<CShellBrowser>(
riid,
ppv);
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
virtual HRESULT STDMETHODCALLTYPE OnSize(WPARAM wParam)
virtual HRESULT STDMETHODCALLTYPE InitializeDownloadManager()
LRESULT OnGoForward(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
#define DISPID_COMMANDSTATECHANGE
#define IDM_TOOLBARS_ADDRESSBAR
virtual WNDPROC GetWindowProc()
virtual HRESULT STDMETHODCALLTYPE GetPositionCookie(DWORD *pdwPositioncookie)
_Must_inspect_result_ typedef _In_ PVOID Unused
HRESULT BuildExplorerBandMenu()
#define IDM_VIEW_STATUSBAR
int MapWindowPoints(HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
static const int BIHorizontalBaseBar
virtual HRESULT STDMETHODCALLTYPE _GetViewBorderRect(RECT *prc)
virtual HRESULT STDMETHODCALLTYPE _ResizeView()
LRESULT OnInitMenuPopup(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define IDM_TOOLBARS_LINKSBAR
virtual HRESULT STDMETHODCALLTYPE QueryStatusWB(OLECMDID cmdID, OLECMDF *pcmdf)
virtual HRESULT STDMETHODCALLTYPE GetOleObject(IOleObject **ppobjv)
LRESULT OnGoBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorder(UINT itb)
#define IDM_GOTO_UPONELEVEL
#define IDM_EXPLORERBAR_SEARCH
#define SID_ITargetFrame2
BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length)
LRESULT OnBackspace(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
void WINAPI ILFree(LPITEMIDLIST pidl)
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
virtual HRESULT STDMETHODCALLTYPE IEParseDisplayName(UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST *ppidlOut)
virtual HRESULT STDMETHODCALLTYPE put_Offline(VARIANT_BOOL bOffline)
virtual HRESULT STDMETHODCALLTYPE v_ShowHideChildWindows(BOOL fChildOnly)
#define CGID_InternetButtons
static const long BTP_UPDATE_NEXT_HISTORY
#define IDM_VIEW_TOOLBARS
virtual HRESULT STDMETHODCALLTYPE v_MayTranslateAccelerator(MSG *pmsg)
#define IDM_EXPLORERBAR_SEPARATOR
#define IDM_GOTO_TRAVEL_FIRST
virtual HRESULT STDMETHODCALLTYPE IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags)
virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivateBS(BOOL fActive)
virtual HRESULT STDMETHODCALLTYPE get_Height(long *pl)
virtual int STDMETHODCALLTYPE _GetToolbarCount()
virtual HRESULT STDMETHODCALLTYPE _SaveToolbars(IStream *pstm)
BOOL WINAPI DestroyIcon(_In_ HICON)
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
#define CSIDL_COMMON_FAVORITES
virtual HRESULT STDMETHODCALLTYPE GetBrowserByIndex(DWORD dwID, IUnknown **ppunk)
virtual HRESULT STDMETHODCALLTYPE SetActivateState(UINT u)
HRESULT DoFolderOptions()
virtual HRESULT STDMETHODCALLTYPE UpdateBackForwardState()
virtual DWORD STDMETHODCALLTYPE GetBrowserIndex()
#define ITID_LINKSBANDSHOWN
#define IDM_FAVORITES_EMPTY
virtual HRESULT STDMETHODCALLTYPE AllowViewResize(BOOL f)
struct IOleCommandTarget::_tagOLECMD OLECMD
virtual HRESULT STDMETHODCALLTYPE put_MenuBar(VARIANT_BOOL Value)
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
DWORD WINAPI WNetDisconnectDialog(HWND hwnd, DWORD dwType)
virtual HRESULT STDMETHODCALLTYPE put_Height(long Height)
LRESULT OnToggleAddressBandVisible(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
virtual LRESULT STDMETHODCALLTYPE WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual HRESULT STDMETHODCALLTYPE _SetFocus(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg)
LRESULT OnToggleToolbarBandVisible(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
virtual HRESULT STDMETHODCALLTYPE InitializeTravelLog(ITravelLog *ptl, DWORD dw)
virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags, DWORD dwFlagMask)
HRESULT WINAPI SHBindToFolder(LPCITEMIDLIST path, IShellFolder **newFolder)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI DSA_Destroy(HDSA hdsa)
virtual HRESULT STDMETHODCALLTYPE SetTopBrowser()
LRESULT OnGoHome(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
CToolbarProxy fToolbarProxy
virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppDisp)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
#define IDM_TOOLS_MAPNETWORKDRIVE
virtual HRESULT STDMETHODCALLTYPE _SendChildren(HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam)
const GUID IID_IConnectionPointContainer
virtual HRESULT STDMETHODCALLTYPE get_TheaterMode(VARIANT_BOOL *pbRegister)
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)