Author: tfaber
Date: Sun Apr 21 22:10:36 2013
New Revision: 58821
URL:
http://svn.reactos.org/svn/reactos?rev=58821&view=rev
Log:
[SHELL32]
- Style improvements by Katayama Hirofumi MZ and Edijs Kolesnikovičs
Modified:
trunk/reactos/dll/win32/shell32/dialogs.cpp
trunk/reactos/dll/win32/shell32/shell32_main.cpp
trunk/reactos/dll/win32/shell32/shellitem.cpp
trunk/reactos/dll/win32/shell32/shellitem.h
trunk/reactos/dll/win32/shell32/startmenu.cpp
trunk/reactos/dll/win32/shell32/startmenu.h
Modified: trunk/reactos/dll/win32/shell32/dialogs.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/dialogs.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013
@@ -353,8 +353,8 @@
RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER);
switch (message)
- {
- case WM_INITDIALOG :
+ {
+ case WM_INITDIALOG:
prfdp = (RUNFILEDLGPARAMS *)lParam ;
SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)prfdp);
@@ -379,29 +379,29 @@
SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)prfdp->hIcon);
SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON,
(WPARAM)prfdp->hIcon, 0);
- FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags
& RFF_NODEFAULT) == 0) ;
- SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ;
- return TRUE ;
-
- case WM_COMMAND :
+ FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags
& RFF_NODEFAULT) == 0);
+ SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH));
+ return TRUE;
+
+ case WM_COMMAND:
switch (LOWORD (wParam))
{
- case IDOK :
+ case IDOK:
{
- int ic ;
+ int ic;
HWND htxt = GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH);
if ((ic = GetWindowTextLengthW (htxt)))
{
- WCHAR *psz, *parent=NULL ;
- SHELLEXECUTEINFOW sei ;
-
- ZeroMemory (&sei, sizeof(sei)) ;
- sei.cbSize = sizeof(sei) ;
- psz = (WCHAR *)HeapAlloc( GetProcessHeap(), 0, (ic +
1)*sizeof(WCHAR) );
+ WCHAR *psz, *parent = NULL;
+ SHELLEXECUTEINFOW sei;
+
+ ZeroMemory (&sei, sizeof(sei));
+ sei.cbSize = sizeof(sei);
+ psz = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, (ic +
1)*sizeof(WCHAR));
if (psz)
{
- GetWindowTextW (htxt, psz, ic + 1) ;
+ GetWindowTextW(htxt, psz, ic + 1);
/* according to
http://www.codeproject.com/KB/shell/runfiledlg.aspx we should send a
* WM_NOTIFY before execution */
@@ -415,17 +415,17 @@
else
sei.lpDirectory = parent =
RunDlg_GetParentDir(sei.lpFile);
- if (!ShellExecuteExW( &sei ))
+ if (!ShellExecuteExW(&sei))
{
HeapFree(GetProcessHeap(), 0, psz);
HeapFree(GetProcessHeap(), 0, parent);
- SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1))
;
- return TRUE ;
+ SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0,
-1));
+ return TRUE;
}
/* FillList is still ANSI */
- GetWindowTextA (htxt, (LPSTR)psz, ic + 1) ;
- FillList (htxt, (LPSTR)psz, FALSE) ;
+ GetWindowTextA (htxt, (LPSTR)psz, ic + 1);
+ FillList (htxt, (LPSTR)psz, FALSE);
HeapFree(GetProcessHeap(), 0, psz);
HeapFree(GetProcessHeap(), 0, parent);
@@ -434,14 +434,14 @@
}
}
- case IDCANCEL :
- EndDialog (hwnd, 0) ;
- return TRUE ;
-
- case IDC_RUNDLG_BROWSE :
- {
- HMODULE hComdlg = NULL ;
- LPFNOFN ofnProc = NULL ;
+ case IDCANCEL:
+ EndDialog (hwnd, 0);
+ return TRUE;
+
+ case IDC_RUNDLG_BROWSE:
+ {
+ HMODULE hComdlg = NULL;
+ LPFNOFN ofnProc = NULL;
static const WCHAR comdlg32W[] = L"comdlg32";
WCHAR szFName[1024] = {0};
WCHAR filter[MAX_PATH], szCaption[MAX_PATH];
@@ -465,26 +465,26 @@
{
ERR("Couldn't get GetOpenFileName function entry
(lib=%p, proc=%p)\n", hComdlg, ofnProc);
ShellMessageBoxW(shell32_hInstance, hwnd,
MAKEINTRESOURCEW(IDS_RUNDLG_BROWSE_ERROR), NULL, MB_OK | MB_ICONERROR);
- return TRUE ;
+ return TRUE;
}
if (ofnProc(&ofn))
{
- SetFocus (GetDlgItem (hwnd, IDOK)) ;
- SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), szFName)
;
- SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH),
CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
- SetFocus (GetDlgItem (hwnd, IDOK)) ;
+ SetFocus (GetDlgItem (hwnd, IDOK));
+ SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH),
szFName);
+ SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH),
CB_SETEDITSEL, 0, MAKELPARAM (0, -1));
+ SetFocus (GetDlgItem (hwnd, IDOK));
}
- FreeLibrary (hComdlg) ;
-
- return TRUE ;
- }
+ FreeLibrary (hComdlg);
+
+ return TRUE;
}
- return TRUE ;
- }
- return FALSE ;
- }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
/* This grabs the MRU list from the registry and fills the combo for the "Run"
dialog above */
/* fShowDefault ignored if pszLatest != NULL */
Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] Sun Apr 21 22:10:36
2013
@@ -1278,24 +1278,24 @@
BEGIN_OBJECT_MAP(ObjectMap)
-OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder)
-OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder)
-OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder)
-OBJECT_ENTRY(CLSID_ShellItem, CShellItem)
-OBJECT_ENTRY(CLSID_ShellLink, CShellLink)
-OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper)
-OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder)
-OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
-OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder)
-OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder)
-OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder)
-OBJECT_ENTRY(CLSID_Printers, CPrinterFolder)
-OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder)
-OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin)
-OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu)
-OBJECT_ENTRY(CLSID_NewMenu, CNewMenu)
-OBJECT_ENTRY(CLSID_StartMenu, CStartMenu)
-OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite)
+ OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder)
+ OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder)
+ OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder)
+ OBJECT_ENTRY(CLSID_ShellItem, CShellItem)
+ OBJECT_ENTRY(CLSID_ShellLink, CShellLink)
+ OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper)
+ OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder)
+ OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
+ OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder)
+ OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder)
+ OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder)
+ OBJECT_ENTRY(CLSID_Printers, CPrinterFolder)
+ OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder)
+ OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin)
+ OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu)
+ OBJECT_ENTRY(CLSID_NewMenu, CNewMenu)
+ OBJECT_ENTRY(CLSID_StartMenu, CStartMenu)
+ OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite)
END_OBJECT_MAP()
CShell32Module gModule;
Modified: trunk/reactos/dll/win32/shell32/shellitem.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellite…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellitem.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellitem.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013
@@ -27,9 +27,9 @@
EXTERN_C HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi);
-CShellItem::CShellItem()
-{
- m_pidl = NULL;
+CShellItem::CShellItem() :
+ m_pidl(NULL)
+{
}
CShellItem::~CShellItem()
@@ -60,16 +60,16 @@
HRESULT CShellItem::get_parent_shellfolder(IShellFolder **ppsf)
{
+ HRESULT hr;
LPITEMIDLIST parent_pidl;
CComPtr<IShellFolder> desktop;
- HRESULT hr;
hr = get_parent_pidl(&parent_pidl);
if (SUCCEEDED(hr))
{
hr = SHGetDesktopFolder(&desktop);
if (SUCCEEDED(hr))
- hr = desktop->BindToObject(parent_pidl, NULL, IID_IShellFolder,
(void**)ppsf);
+ hr = desktop->BindToObject(parent_pidl, NULL, IID_IShellFolder,
reinterpret_cast<void **>(ppsf));
ILFree(parent_pidl);
}
@@ -87,8 +87,8 @@
HRESULT WINAPI CShellItem::GetParent(IShellItem **ppsi)
{
+ HRESULT hr;
LPITEMIDLIST parent_pidl;
- HRESULT hr;
TRACE("(%p,%p)\n", this, ppsi);
@@ -104,8 +104,8 @@
HRESULT WINAPI CShellItem::GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName)
{
+ HRESULT hr;
CComPtr<IShellFolder> parent_folder;
- HRESULT hr;
STRRET name;
DWORD uFlags;
@@ -151,7 +151,7 @@
HRESULT WINAPI CShellItem::GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs)
{
CComPtr<IShellFolder> parent_folder;
- LPITEMIDLIST child_pidl;
+ LPCITEMIDLIST child_pidl;
HRESULT hr;
TRACE("(%p,%x,%p)\n", this, sfgaoMask, psfgaoAttribs);
@@ -161,7 +161,7 @@
{
child_pidl = ILFindLastID(m_pidl);
*psfgaoAttribs = sfgaoMask;
- hr = parent_folder->GetAttributesOf(1, (LPCITEMIDLIST*)&child_pidl,
psfgaoAttribs);
+ hr = parent_folder->GetAttributesOf(1, &child_pidl, psfgaoAttribs);
}
return hr;
@@ -169,9 +169,9 @@
HRESULT WINAPI CShellItem::Compare(IShellItem *oth, SICHINTF hint, int *piOrder)
{
+ HRESULT hr;
+ CComPtr<IPersistIDList> pIDList;
CComPtr<IShellFolder> parent_folder;
- CComPtr<IPersistIDList> pIDList;
- HRESULT hr;
LPITEMIDLIST pidl;
TRACE("(%p,%p,%x,%p)\n", this, oth, hint, piOrder);
@@ -179,7 +179,7 @@
if (piOrder == NULL || oth == NULL)
return E_POINTER;
- hr = oth->QueryInterface(IID_IPersistIDList, (void **)&pIDList);
+ hr = oth->QueryInterface(IID_IPersistIDList, reinterpret_cast<void
**>(&pIDList));
if (SUCCEEDED(hr))
{
hr = pIDList->GetIDList(&pidl);
@@ -189,7 +189,7 @@
if (SUCCEEDED(hr))
{
hr = parent_folder->CompareIDs(hint, m_pidl, pidl);
- *piOrder = (int)SCODE_CODE(hr);
+ *piOrder = static_cast<int>(SCODE_CODE(hr));
}
ILFree(pidl);
}
@@ -239,20 +239,19 @@
HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi)
{
+ HRESULT hr;
IShellItem *newShellItem;
LPITEMIDLIST new_pidl;
CComPtr<IPersistIDList> newPersistIDList;
- HRESULT hr;
TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi);
if (!pidl)
- {
return E_INVALIDARG;
- }
- else if (pidlParent || psfParent)
- {
- LPITEMIDLIST temp_parent=NULL;
+
+ if (pidlParent || psfParent)
+ {
+ LPITEMIDLIST temp_parent = NULL;
if (!pidlParent)
{
CComPtr<IPersistFolder2> ppf2Parent;
Modified: trunk/reactos/dll/win32/shell32/shellitem.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellite…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellitem.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellitem.h [iso-8859-1] Sun Apr 21 22:10:36 2013
@@ -23,30 +23,31 @@
#define _SHELLITEM_H_
class CShellItem :
- public CComCoClass<CShellItem, &CLSID_ShellItem>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IShellItem,
- public IPersistIDList
+ public CComCoClass<CShellItem, &CLSID_ShellItem>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IShellItem,
+ public IPersistIDList
{
private:
- LPITEMIDLIST m_pidl;
+ LPITEMIDLIST m_pidl;
+
public:
- CShellItem();
- ~CShellItem();
- HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl);
- HRESULT get_parent_shellfolder(IShellFolder **ppsf);
+ CShellItem();
+ ~CShellItem();
+ HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl);
+ HRESULT get_parent_shellfolder(IShellFolder **ppsf);
- // IShellItem
- virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void
**ppvOut);
- virtual HRESULT WINAPI GetParent(IShellItem **ppsi);
- virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName);
- virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs);
- virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder);
+ // IShellItem
+ virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void
**ppvOut);
+ virtual HRESULT WINAPI GetParent(IShellItem **ppsi);
+ virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName);
+ virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs);
+ virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder);
- // IPersistIDList
- virtual HRESULT WINAPI GetClassID(CLSID *pClassID);
- virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
- virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl);
+ // IPersistIDList
+ virtual HRESULT WINAPI GetClassID(CLSID *pClassID);
+ virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
+ virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl);
DECLARE_NO_REGISTRY()
DECLARE_NOT_AGGREGATABLE(CShellItem)
@@ -54,8 +55,8 @@
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CShellItem)
- COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem)
- COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList)
+ COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem)
+ COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList)
END_COM_MAP()
};
Modified: trunk/reactos/dll/win32/shell32/startmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
==============================================================================
--- trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/startmenu.cpp [iso-8859-1] Sun Apr 21 22:10:36 2013
@@ -22,10 +22,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell32start);
-CStartMenu::CStartMenu()
-{
- m_pBandSite = NULL;
- m_pUnkSite = NULL;
+CStartMenu::CStartMenu() :
+ m_pBandSite(NULL),
+ m_pUnkSite(NULL)
+{
}
CStartMenu::~CStartMenu()
@@ -109,7 +109,7 @@
{
HRESULT hr;
CComObject<CMenuBandSite> *pBandSiteObj;
-
+
TRACE("(%p)\n", this);
//pBandSiteObj = new CComObject<CMenuBandSite>();
@@ -136,10 +136,10 @@
return E_NOTIMPL;
}
-CMenuBandSite::CMenuBandSite()
-{
- m_pObjects = NULL;
- m_cObjects = 0;
+CMenuBandSite::CMenuBandSite() :
+ m_pObjects(NULL),
+ m_cObjects(0)
+{
}
CMenuBandSite::~CMenuBandSite()
@@ -184,7 +184,7 @@
ObjectCount = 0;
- for(Index = 0; Index < m_cObjects; Index++)
+ for (Index = 0; Index < m_cObjects; Index++)
{
if (m_pObjects[Index] != NULL)
{
Modified: trunk/reactos/dll/win32/shell32/startmenu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/startmen…
==============================================================================
--- trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/startmenu.h [iso-8859-1] Sun Apr 21 22:10:36 2013
@@ -1,7 +1,7 @@
/*
- * Start menu object
+ * Start menu object
*
- * Copyright 2009 Andrew Hill
+ * Copyright 2009 Andrew Hill
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -22,20 +22,20 @@
#define _STARTMENU_H_
class CStartMenu :
- public CComCoClass<CStartMenu, &CLSID_StartMenu>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IMenuPopup,
- public IObjectWithSite,
- public IInitializeObject,
- public IMenuBand // FIXME
+ public CComCoClass<CStartMenu, &CLSID_StartMenu>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IMenuPopup,
+ public IObjectWithSite,
+ public IInitializeObject,
+ public IMenuBand // FIXME
{
private:
IBandSite *m_pBandSite;
IUnknown *m_pUnkSite;
public:
- CStartMenu();
- ~CStartMenu();
+ CStartMenu();
+ ~CStartMenu();
// *** IOleWindow methods ***
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
@@ -51,13 +51,13 @@
virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS
dwFlags);
virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet);
- // *** IObjectWithSite methods ***
- virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
- virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
+ // *** IObjectWithSite methods ***
+ virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite);
+ virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
// *** IInitializeObject methods ***
virtual HRESULT STDMETHODCALLTYPE Initialize();
-
+
// *** IMenuBand methods *** FIXME
virtual HRESULT STDMETHODCALLTYPE IsMenuMessage(MSG *pmsg);
virtual HRESULT STDMETHODCALLTYPE TranslateMenuMessage(MSG *pmsg, LRESULT *plRet);
@@ -71,69 +71,69 @@
COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IDeskBar)
COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup)
- COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
- COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject)
- COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) // FIXME: Win does not export it
+ COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
+ COM_INTERFACE_ENTRY_IID(IID_IInitializeObject, IInitializeObject)
+ COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) // FIXME: Win does not export it
END_COM_MAP()
};
class CMenuBandSite :
- public CComCoClass<CMenuBandSite, &CLSID_MenuBandSite>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IBandSite,
- public IDeskBarClient,
- public IOleCommandTarget,
- public IInputObject,
- public IInputObjectSite,
- public IWinEventHandler,
- public IServiceProvider
+ public CComCoClass<CMenuBandSite, &CLSID_MenuBandSite>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IBandSite,
+ public IDeskBarClient,
+ public IOleCommandTarget,
+ public IInputObject,
+ public IInputObjectSite,
+ public IWinEventHandler,
+ public IServiceProvider
{
private:
IUnknown **m_pObjects;
ULONG m_cObjects;
public:
- CMenuBandSite();
- ~CMenuBandSite();
+ CMenuBandSite();
+ ~CMenuBandSite();
- // *** IBandSite methods ***
- virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk);
- virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID);
- virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD
*pdwState, LPWSTR pszName, int cchName);
- virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD
dwState);
- virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID);
- virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID
**ppv);
- virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo);
- virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo);
+ // *** IBandSite methods ***
+ virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk);
+ virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID);
+ virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD
*pdwState, LPWSTR pszName, int cchName);
+ virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD
dwState);
+ virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID);
+ virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID
**ppv);
+ virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo);
+ virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo);
- // *** IOleWindow methods ***
- virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd);
- virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
+ // *** IOleWindow methods ***
+ virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd);
+ virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
- // *** IDeskBarClient methods ***
- virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite);
- virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode);
- virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState);
- virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc);
+ // *** IDeskBarClient methods ***
+ virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite);
+ virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode);
+ virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState);
+ virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc);
// *** IOleCommandTarget methods ***
- virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds,
OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
- virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD
nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
+ virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds,
OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
+ virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD
nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
- // *** IInputObject methods ***
- virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
- virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
- virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
+ // *** IInputObject methods ***
+ virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
+ virtual HRESULT STDMETHODCALLTYPE HasFocusIO();
+ virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg);
- // *** IInputObjectSite methods ***
- virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus);
+ // *** IInputObjectSite methods ***
+ virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL
fSetFocus);
- // *** IWinEventHandler methods ***
- virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND paramC, UINT param10, WPARAM param14,
LPARAM param18, LRESULT *param1C);
- virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND paramC);
+ // *** IWinEventHandler methods ***
+ virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND paramC, UINT param10, WPARAM
param14, LPARAM param18, LRESULT *param1C);
+ virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND paramC);
- // *** IServiceProvider methods ***
- virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void
**ppvObject);
+ // *** IServiceProvider methods ***
+ virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void
**ppvObject);
DECLARE_REGISTRY_RESOURCEID(IDR_MENUBANDSITE)
DECLARE_NOT_AGGREGATABLE(CMenuBandSite)
@@ -142,13 +142,13 @@
BEGIN_COM_MAP(CMenuBandSite)
COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite)
- COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
- COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient)
- COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
- COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
- COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
- COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
- COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
+ COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow)
+ COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient)
+ COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
+ COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
+ COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
+ COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
+ COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
END_COM_MAP()
};