ReactOS 0.4.16-dev-125-g798ea90
startmnu.cpp File Reference
#include "precomp.h"
Include dependency graph for startmnu.cpp:

Go to the source code of this file.

Functions

HRESULT UpdateStartMenu (IN OUT IMenuPopup *pMenuPopup, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons, IN BOOL bRefresh)
 
IMenuPopupCreateStartMenu (IN ITrayWindow *Tray, OUT IMenuBand **ppMenuBand, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons)
 

Function Documentation

◆ CreateStartMenu()

IMenuPopup * CreateStartMenu ( IN ITrayWindow *  Tray,
OUT IMenuBand **  ppMenuBand,
IN HBITMAP hbmBanner  OPTIONAL,
IN BOOL  bSmallIcons 
)

Definition at line 50 of file startmnu.cpp.

54{
55 HRESULT hr;
62 DWORD dwBandId = 0;
63
66 return NULL;
67
70 return NULL;
71
72 /* Set the menu site so we can handle messages */
73 hr = IUnknown_SetSite(pMp, pSms);
75 return NULL;
76
77 /* Initialize the menu object */
78 hr = pMp->QueryInterface(IID_PPV_ARG(IInitializeObject, &pIo));
79 if (SUCCEEDED(hr))
80 hr = pIo->Initialize();
81 else
82 hr = S_OK;
83
84 /* Everything is initialized now. Let's get the IMenuBand interface. */
86 return NULL;
87
88 hr = pMp->GetClient(&pUnk);
90 return NULL;
91
94 return NULL;
95
96 /* Finally we have the IBandSite interface, there's only one
97 band in it that apparently provides the IMenuBand interface */
98 hr = pBs->EnumBands(0, &dwBandId);
100 return NULL;
101
102 hr = pBs->GetBandObject(dwBandId, IID_PPV_ARG(IMenuBand, &pMb));
104 return NULL;
105
106 UpdateStartMenu(pMp, hbmBanner, bSmallIcons, FALSE);
107
108 *ppMenuBand = pMb.Detach();
109
110 return pMp.Detach();
111}
HRESULT CStartMenuSite_CreateInstance(IN OUT ITrayWindow *Tray, const IID &riid, PVOID *ppv)
HRESULT WINAPI _CStartMenu_CreateInstance(REFIID riid, void **ppv)
Definition: rshell.cpp:32
T * Detach()
Definition: atlcomcli.h:186
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1411
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned long DWORD
Definition: ntddk_ex.h:95
nsresult QueryInterface(nsIIDRef riid, void **result)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183
HRESULT UpdateStartMenu(IN OUT IMenuPopup *pMenuPopup, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons, IN BOOL bRefresh)
Definition: startmnu.cpp:24
#define IID_PPV_ARG(Itype, ppType)

Referenced by CTrayWindow::OnCreate(), and CTrayWindow::OnSettingChanged().

◆ UpdateStartMenu()

HRESULT UpdateStartMenu ( IN OUT IMenuPopup pMenuPopup,
IN HBITMAP hbmBanner  OPTIONAL,
IN BOOL  bSmallIcons,
IN BOOL  bRefresh 
)

Definition at line 24 of file startmnu.cpp.

28{
30 HRESULT hRet;
31
32 hRet = pMenuPopup->QueryInterface(IID_PPV_ARG(IBanneredBar, &pbb));
33 if (SUCCEEDED(hRet))
34 {
35 hRet = pbb->SetBitmap(hbmBanner);
36
37 /* Update the icon size */
38 hRet = pbb->SetIconSize(bSmallIcons ? BMICON_SMALL : BMICON_LARGE);
39 }
40
41 if (bRefresh)
42 {
43 FIXME("Refresh the Start menu with communicating with SHELL32\n");
44 }
45
46 return hRet;
47}
#define FIXME(fmt,...)
Definition: precomp.h:53
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
@ BMICON_SMALL
Definition: shlobj_undoc.h:121
@ BMICON_LARGE
Definition: shlobj_undoc.h:120

Referenced by CreateStartMenu(), and CTrayWindow::OnSettingChanged().