ReactOS 0.4.15-dev-8102-g108db8f
menu.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for shell menu objects
5 * PROGRAMMERS: Giannis Adamopoulos
6 */
7
8#include "shelltest.h"
9
10#include <shlwapi.h>
11#include <unknownbase.h>
12#include <shlguid_undoc.h>
13
14#define test_S_OK(hres, message) ok(hres == S_OK, "%s (0x%lx instead of S_OK)\n",message, hResult);
15#define test_HRES(hres, hresExpected, message) ok(hres == hresExpected, "%s (0x%lx instead of 0x%lx)\n",message, hResult,hresExpected);
16
18{
19 ULONG size = (lstrlenW(className) + 1)* sizeof(WCHAR);
21 if (GetClassNameW(hwnd, buffer, size ) == 0)
22 {
23 free(buffer);
24 return FALSE;
25 }
26 int res = wcscmp(buffer, className);
27 free(buffer);
28 return res == 0;
29}
30
31class CDummyWindow : public CUnknownBase<IOleWindow>
32{
33protected:
35
36 const QITAB* GetQITab()
37 {
38 static const QITAB tab[] = {{ &IID_IOleWindow, OFFSETOFCLASS(IOleWindow, CDummyWindow) }, {0}};
39 return tab;
40 }
41
42public:
44 :CUnknownBase( true, 0 )
45 {
46 m_hwnd = hwnd;
47 }
48
50 {
51 *phwnd = m_hwnd;
52 return S_OK;
53 }
54
56 {
57 return S_OK;
58 }
59};
60
61BOOL CreateCShellMenu(IShellMenu** shellMenu, IDockingWindow** dockingMenu, IObjectWithSite **menuWithSite)
62{
63 HRESULT hResult;
64 hResult = CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, IID_IShellMenu, reinterpret_cast<void **>(shellMenu));
65 test_S_OK(hResult, "Failed to instantiate CLSID_MenuBand");
66 if (!shellMenu) return FALSE;
67
68 hResult = (*shellMenu)->QueryInterface(IID_IDockingWindow, reinterpret_cast<void **>(dockingMenu));
69 test_S_OK(hResult, "Failed to query IID_IDockingWindow");
70 hResult = (*shellMenu)->QueryInterface(IID_IObjectWithSite, reinterpret_cast<void **>(menuWithSite));
71 test_S_OK(hResult, "Failed to query IID_IObjectWithSite");
72 if (!dockingMenu || !menuWithSite) return FALSE;
73 return TRUE;
74}
75
76
78{
79 HRESULT hResult;
80 IShellMenu* shellMenu;
81 IDockingWindow* dockingMenu;
82 IObjectWithSite* menuWithSite;
83
85 UINT uId;
86 UINT uIdAncestor;
88 HWND hwndToolbar;
90 HWND hwndOwner;
91 DWORD menuFlagss;
92 IShellFolder *shellFolder;
93
94 if (!CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite))
95 {
96 skip("failed to create CShellMenuObject\n");
97 return;
98 }
99
100 hResult = shellMenu->Initialize(NULL, 11, 22, 0xdeadbeef);
101 test_S_OK(hResult, "Initialize failed");
102
103 hResult = shellMenu->GetMenuInfo(&psmc, &uId, &uIdAncestor, &dwFlags);
104 test_S_OK(hResult, "GetMenuInfo failed");
105 ok (psmc == NULL, "wrong psmc\n");
106 ok (uId == 11, "wrong uid\n");
107 ok (uIdAncestor == 22, "wrong uIdAncestor\n");
108 ok (dwFlags == 0xdeadbeef, "wrong dwFlags\n");
109
110 hResult = shellMenu->Initialize(NULL, 0, ANCESTORDEFAULT, SMINIT_TOPLEVEL|SMINIT_VERTICAL);
111 test_S_OK(hResult, "Initialize failed");
112
113 hResult = dockingMenu->GetWindow(&hwndToolbar);
114 test_HRES(hResult, E_FAIL, "GetWindow should fail");
115
116 hResult = shellMenu->GetMenu(&hmenu, &hwndOwner, &menuFlagss);
117 test_HRES(hResult, E_FAIL, "GetMenu should fail");
118
120 hResult = shellMenu->SetMenu(hmenu, NULL, 0);
121 test_S_OK(hResult, "SetMenu failed");
122
123 hwndToolbar = (HWND)UlongToPtr(0xdeadbeef);
124 hResult = dockingMenu->GetWindow(&hwndToolbar);
125 test_S_OK(hResult, "GetWindow failed");
126 ok (hwndToolbar == NULL, "Expected NULL window\n");
127
128 hResult = shellMenu->SetMenu(NULL, NULL, 0);
129 test_S_OK(hResult, "SetMenu failed");
130
131 hResult = shellMenu->GetMenu(&hmenu, &hwndOwner, &menuFlagss);
132 test_S_OK(hResult, "GetMenu failed");
133 ok (hmenu == NULL, "Got a menu\n");
134
135 hResult = dockingMenu->GetWindow(&hwndToolbar);
136 test_S_OK(hResult, "GetWindow failed");
137
138 hResult = SHGetDesktopFolder(&shellFolder);
139 test_S_OK(hResult, "SHGetDesktopFolder failed");
140
141 hResult = shellMenu->SetShellFolder(shellFolder, NULL, 0, 0);
142 test_S_OK(hResult, "SetShellFolder failed");
143
144 hResult = shellMenu->SetShellFolder(NULL, NULL, 0, 0);
145 test_HRES(hResult, E_INVALIDARG, "SetShellFolder should fail");
146
147 hwndToolbar = (HWND)UlongToHandle(0xdeadbeef);
148 hResult = dockingMenu->GetWindow(&hwndToolbar);
149 test_S_OK(hResult, "GetWindow failed");
150 ok (hwndToolbar == NULL, "Expected NULL window\n");
151
152 hResult = dockingMenu->ShowDW(TRUE);
153 test_HRES(hResult, S_FALSE, "ShowDW should fail");
154
155 menuWithSite->Release();
156 dockingMenu->Release();
157 shellMenu->Release();
158}
159
161{
162 HRESULT hResult;
163 IShellMenu* shellMenu;
164 IDockingWindow* dockingMenu;
165 IShellFolder *shellFolder;
166 IObjectWithSite *menuWithSite;
167 HWND hwndToolbar;
168
171 CDummyWindow* dummyWindow = new CDummyWindow(hWndParent);
172
173 if (!CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite))
174 {
175 skip("failed to create CShellMenuObject\n");
176 delete dummyWindow;
177 return;
178 }
179
180 hResult = SHGetDesktopFolder(&shellFolder);
181 test_S_OK(hResult, "SHGetDesktopFolder failed");
182
183 hResult = shellMenu->Initialize(NULL, 0, ANCESTORDEFAULT, SMINIT_TOPLEVEL|SMINIT_VERTICAL);
184 test_S_OK(hResult, "Initialize failed");
185
186 hResult = shellMenu->SetShellFolder(shellFolder, NULL, NULL, 0);
187 test_S_OK(hResult, "SetShellFolder failed");
188
189 hResult = menuWithSite->SetSite(dummyWindow);
190 test_S_OK(hResult, "SetSite failed");
191
192 hResult = dockingMenu->GetWindow(&hwndToolbar);
193 test_S_OK(hResult, "GetWindow failed");
194 ok(hwndToolbar != NULL, "GetWindow should return a window\n");
195
196 HWND hwndRealParent = GetParent(hwndToolbar);
197 ok(GetParent(hwndRealParent) == hWndParent, "Wrong parent\n");
198 ok(CheckWindowClass(hwndToolbar, L"ToolbarWindow32"), "Wrong class\n");
199 ok(CheckWindowClass(hwndRealParent, L"SysPager"), "Wrong class\n");
200
201 menuWithSite->Release();
202 dockingMenu->Release();
203 shellMenu->Release();
204 ok(!IsWindow(hwndToolbar), "The toolbar window should not exist\n");
205
207}
208
209/* The folowing struct holds info about the order callbacks are called */
210/* By passing different arrays of results to CMenuCallback, we can test different sequenses of callbacks */
212 int iTest;
214
215class CMenuCallback : public CUnknownBase<IShellMenuCallback>
216{
217protected:
222
224 {
225 static const QITAB tab[] = {{ &IID_IShellMenuCallback, OFFSETOFCLASS(IShellMenuCallback, CMenuCallback) }, {0}};
226 return tab;
227 }
228
229public:
230 CMenuCallback(struct _test_info *testResults, int testsCount)
231 :CUnknownBase( true, 0 )
232 {
233 m_iTest = 0;
234 m_iCallback = 0;
235 m_results = testResults;
236 m_testsCount = testsCount;
237 }
238
239 void SetTest(int i)
240 {
241 m_iTest = i;
242 }
243
245 {
246 /*trace ("callback type %d\n", uMsg);*/
247
248 /*
249 * it seems callback 0x10000000 is called for every item added so
250 * we will ignore consecutive callbacks of this type
251 * Note: this callback is invoked by shell32.dll!CMenuSFToolbar::_FilterPidl
252 */
253 if (uMsg == 0x10000000 && m_results[m_iCallback-1].uMsg == 0x10000000)
254 {
255 return S_OK;
256 }
257
258 m_iCallback++;
260 {
261 ok(0, "Got more callbacks than expected! (%d not %d). uMsg: %d\n", m_iCallback, m_testsCount, uMsg);
262 return S_OK;
263 }
264
266
267 ok(psmd != NULL, "Got NULL psmd\n");
268 ok(m_iTest == result->iTest, "Wrong test number (%d not %d)\n", m_iTest, result->iTest);
269 ok(result->uMsg == uMsg, "%d: Got wrong uMsg (%d instead of %d)\n", m_iCallback, uMsg, result->uMsg);
270
271 if(uMsg == SMC_CREATE)
272 {
273 ok(psmd->dwFlags == 0, "wrong dwFlags\n");
274 ok(psmd->dwMask == 0, "wrong dwMask\n");
275 ok(psmd->hmenu == 0, "wrong hmenu\n");
276 ok(psmd->hwnd == 0, "wrong hwnd\n");
277 ok(psmd->punk != NULL, "punk is null\n");
278 }
279
280 if (uMsg == SMC_GETSFOBJECT)
281 {
282 ok(psmd->psf != 0, "wrong dwFlags\n");
283 }
284
285 return S_FALSE;
286 }
287};
288
290{
291 HRESULT hResult;
292 IShellMenu* shellMenu;
293 IDockingWindow* dockingMenu;
294 IObjectWithSite *menuWithSite;
296
299 CDummyWindow* dummyWindow = new CDummyWindow(hWndParent);
301
302 if (!CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite))
303 {
304 skip("failed to create CShellMenuObject\n");
305 delete dummyWindow;
306 return;
307 }
308
309 struct _test_info cbtest_info[] = { {1, SMC_CREATE},
310 {2, SMC_GETSFOBJECT},
311 {3, 0x31},
312 {4, SMC_INITMENU},
313 {4, 53},
314 {4, 19},
315 {4, 0x10000000},
316 {4, SMC_NEWITEM},
317 {4, 20},
318 {4, 19},
319 {4, 6},
320 {4, 20},
321 {4, 8},
322 {4, 24},
323 {4, 5},
324 {4, 5},
325 {4, 5}};
326
327 callback = new CMenuCallback(cbtest_info,18);
328
329 callback->SetTest(1);
330 hResult = shellMenu->Initialize(callback, 0,ANCESTORDEFAULT, SMINIT_TOPLEVEL|SMINIT_VERTICAL);
331 test_S_OK(hResult, "Initialize failed");
332
333 callback->SetTest(2);
334 hResult = shellMenu->SetShellFolder(shellFolder, NULL, NULL, 0);
335 test_S_OK(hResult, "SetShellFolder failed");
336
337 callback->SetTest(3);
338 hResult = shellMenu->SetMenu(hmenu, hWndParent, SMSET_TOP);
339 test_S_OK(hResult, "SetMenu failed");
340
341 hResult = menuWithSite->SetSite(dummyWindow);
342 test_S_OK(hResult, "SetSite failed");
343
344 callback->SetTest(4);
345 hResult = dockingMenu->ShowDW(TRUE);
346 test_HRES(hResult, S_FALSE, "ShowDW failed");
347}
348
350{
351 HRESULT hResult;
352 IShellMenu* shellMenu;
353 IDockingWindow* dockingMenu;
354 IObjectWithSite *menuWithSite;
355 IMenuPopup* menuPopup;
356 IBandSite* bandSite;
357
358 /* Create the tree objects and query the nescesary interfaces */
359 BOOL bCreated = CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite);
360 hResult = CoCreateInstance(CLSID_MenuDeskBar, NULL, CLSCTX_INPROC_SERVER, IID_IMenuPopup, reinterpret_cast<void **>(&menuPopup));
361 test_S_OK(hResult, "Failed to instantiate CLSID_MenuDeskBar");
362 hResult = CoCreateInstance(CLSID_MenuBandSite, NULL, CLSCTX_INPROC_SERVER, IID_IBandSite, reinterpret_cast<void **>(&bandSite));
363 test_S_OK(hResult, "Failed to instantiate CLSID_MenuBandSite");
364 if (!bCreated || !menuPopup || !bandSite)
365 {
366 skip("failed to create MenuBandSite object\n");
367 return;
368 }
369
370 /* Create the popup menu */
371 hResult = shellMenu->Initialize(NULL, 0, ANCESTORDEFAULT, SMINIT_TOPLEVEL|SMINIT_VERTICAL);
372 test_S_OK(hResult, "Initialize failed");
373 hResult = shellMenu->SetMenu( hmenu, NULL, SMSET_TOP);
374 test_S_OK(hResult, "SetMenu failed");
375 hResult = menuPopup->SetClient(bandSite);
376 test_S_OK(hResult, "SetClient failed");
377 hResult = bandSite->AddBand(shellMenu);
378 test_S_OK(hResult, "AddBand failed");
379
380 /* Show the popum menu */
381 POINTL p = {10,10};
382 hResult = menuPopup->Popup(&p, NULL, 0);
383 test_HRES(hResult, S_FALSE, "Popup failed");
384
385 HWND hWndToolbar, hWndToplevel;
386
387 /* Ensure that the created windows are correct */
388 hResult = dockingMenu->GetWindow(&hWndToolbar);
389 test_S_OK(hResult, "GetWindow failed");
390 ok(hWndToolbar != NULL, "GetWindow should return a window\n");
391
392 hResult = menuPopup->GetWindow(&hWndToplevel);
393 test_S_OK(hResult, "GetWindow failed");
394 ok(hWndToolbar != NULL, "GetWindow should return a window\n");
395
396 HWND hwndRealParent = GetParent(hWndToolbar);
397 ok(GetParent(hwndRealParent) == hWndToplevel, "Wrong parent\n");
398 ok(CheckWindowClass(hWndToolbar, L"ToolbarWindow32"), "Wrong class\n");
399 ok(CheckWindowClass(hwndRealParent, L"MenuSite"), "Wrong class\n");
400 ok(CheckWindowClass(hWndToplevel, L"BaseBar"), "Wrong class\n");
401
402 ok(GetAncestor (hWndToplevel, GA_PARENT) == GetDesktopWindow(), "Expected the BaseBar window to be top level\n");
403}
404
406{
408
409 IShellFolder *shellFolder;
410 HRESULT hResult;
411 hResult = SHGetDesktopFolder(&shellFolder);
412 test_S_OK(hResult, "SHGetDesktopFolder failed");
413
414 HMENU hSubMenu = CreatePopupMenu();
415 AppendMenuW(hSubMenu, 0,0, L"Submenu item1");
416 AppendMenuW(hSubMenu, 0,0, L"Submenu item2");
418 AppendMenuW(hmenu, 0,0, L"test");
419 AppendMenuW(hmenu, 0,1, L"test1");
420 MENUITEMINFOW iteminfo = {0};
421 iteminfo.cbSize = sizeof(iteminfo);
422 iteminfo.hSubMenu = hSubMenu;
423 iteminfo.fMask = MIIM_STRING | MIIM_SUBMENU;
424 iteminfo.dwTypeData = const_cast<LPWSTR>(L"submenu");
425 iteminfo.cch = 7;
426 InsertMenuItemW(hmenu, 0, TRUE, &iteminfo);
427
430 test_CShellMenu_callbacks(shellFolder, hmenu);
432}
433
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
const QITAB * GetQITab()
Definition: menu.cpp:36
HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
Definition: menu.cpp:55
HWND m_hwnd
Definition: menu.cpp:34
CDummyWindow(HWND hwnd)
Definition: menu.cpp:43
HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd)
Definition: menu.cpp:49
HRESULT STDMETHODCALLTYPE CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: menu.cpp:244
void SetTest(int i)
Definition: menu.cpp:239
int m_testsCount
Definition: menu.cpp:221
CMenuCallback(struct _test_info *testResults, int testsCount)
Definition: menu.cpp:230
int m_iCallback
Definition: menu.cpp:219
const QITAB * GetQITab()
Definition: menu.cpp:223
int m_iTest
Definition: menu.cpp:218
struct _test_info * m_results
Definition: menu.cpp:220
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE HWND
Definition: compat.h:19
#define lstrlenW
Definition: compat.h:750
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
const GUID CLSID_MenuBandSite
#define UlongToPtr(u)
Definition: config.h:106
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLfloat GLfloat p
Definition: glext.h:8902
GLuint64EXT * result
Definition: glext.h:11304
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HRESULT AddBand([in] IUnknown *punk)
HRESULT SetClient([in] IUnknown *punkClient)
HRESULT ShowDW([in] BOOL fShow)
HRESULT Popup([in] POINTL *ppt, [in] RECTL *prcExclude, [in] MP_POPUPFLAGS dwFlags)
HRESULT SetSite([in] IUnknown *pUnkSite)
HRESULT GetWindow([out] HWND *phwnd)
HRESULT GetMenuInfo([out] IShellMenuCallback **ppsmc, [out] UINT *puId, [out] UINT *puIdAncestor, [out] DWORD *pdwFlags)
HRESULT SetShellFolder([in] IShellFolder *psf, [in] PCIDLIST_ABSOLUTE pidlFolder, [in] HKEY hKey, [in] DWORD dwFlags)
HRESULT Initialize([in] IShellMenuCallback *psmc, [in] UINT uId, [in] UINT uIdAncestor, [in] DWORD dwFlags)
HRESULT GetMenu([out] HMENU *phmenu, [out] HWND *phwnd, [out] DWORD *pdwFlags)
HRESULT SetMenu([in] HMENU hmenu, [in] HWND hwnd, [in] DWORD dwFlags)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
#define S_OK
Definition: intsafe.h:52
void test_CShellMenu_params()
Definition: menu.cpp:77
BOOL CreateCShellMenu(IShellMenu **shellMenu, IDockingWindow **dockingMenu, IObjectWithSite **menuWithSite)
Definition: menu.cpp:61
#define test_HRES(hres, hresExpected, message)
Definition: menu.cpp:15
void test_CShellMenu()
Definition: menu.cpp:160
void test_CShellMenu_callbacks(IShellFolder *shellFolder, HMENU hmenu)
Definition: menu.cpp:289
#define test_S_OK(hres, message)
Definition: menu.cpp:14
void test_CShellMenu_with_DeskBar(IShellFolder *shellFolder, HMENU hmenu)
Definition: menu.cpp:349
BOOL CheckWindowClass(HWND hwnd, PCWSTR className)
Definition: menu.cpp:17
static IPrintDialogCallback callback
Definition: printdlg.c:326
const IID IID_IObjectWithSite
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:278
const GUID IID_IOleWindow
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define OFFSETOFCLASS(base, derived)
Definition: shlwapi.h:2090
#define true
Definition: stdbool.h:36
int iTest
Definition: menu.cpp:212
UINT uMsg
Definition: menu.cpp:213
LPWSTR dwTypeData
Definition: winuser.h:3269
DWORD dwMask
Definition: shobjidl.idl:2668
IUnknown * punk
Definition: shobjidl.idl:2675
HMENU hmenu
Definition: shobjidl.idl:2670
IShellFolder * psf
Definition: shobjidl.idl:2678
DWORD dwFlags
Definition: shobjidl.idl:2669
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
static HMENU hmenu
Definition: win.c:66
#define GetModuleHandle
Definition: winbase.h:3827
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define S_FALSE
Definition: winerror.h:2357
BOOL WINAPI IsWindow(_In_opt_ HWND)
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
#define MIIM_STRING
Definition: winuser.h:727
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define GA_PARENT
Definition: winuser.h:2788
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
#define MIIM_SUBMENU
Definition: winuser.h:723
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define CW_USEDEFAULT
Definition: winuser.h:225
HWND WINAPI GetParent(_In_ HWND)
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
#define SW_SHOW
Definition: winuser.h:775
BOOL WINAPI DestroyWindow(_In_ HWND)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184