ReactOS 0.4.16-dev-1369-gd4d04c8
TrackPopupMenuEx.c File Reference
#include "precomp.h"
#include <versionhelpers.h>
Include dependency graph for TrackPopupMenuEx.c:

Go to the source code of this file.

Classes

struct  tagCOUNTMENUWND
 

Macros

#define CLASSNAME   L"TrackPopupMenuEx tests"
 
#define MENUCLASS   L"#32768"
 
#define VALID_TPM_FLAGS
 
#define TPM_WORKAREA   0x10000
 
#define DELAY   100
 
#define INTERVAL   300
 

Typedefs

typedef enum tagAUTO_CLICK AUTO_CLICK
 
typedef enum tagAUTO_KEY AUTO_KEY
 
typedef struct tagCOUNTMENUWND COUNTMENUWND
 
typedef struct tagCOUNTMENUWNDPCOUNTMENUWND
 

Enumerations

enum  tagAUTO_CLICK {
  AUTO_LEFT_CLICK , AUTO_RIGHT_CLICK , AUTO_LEFT_DOUBLE_CLICK , AUTO_RIGHT_DOUBLE_CLICK ,
  AUTO_LEFT_CLICK , AUTO_RIGHT_CLICK , AUTO_LEFT_DOUBLE_CLICK , AUTO_RIGHT_DOUBLE_CLICK
}
 
enum  tagAUTO_KEY {
  AUTO_KEY_DOWN , AUTO_KEY_UP , AUTO_KEY_DOWN_UP , AUTO_KEY_DOWN ,
  AUTO_KEY_UP , AUTO_KEY_DOWN_UP
}
 

Functions

static VOID TEST_InvalidFlags (VOID)
 
static VOID TEST_InvalidSize (VOID)
 
static VOID AutoKey (AUTO_KEY type, UINT vKey)
 
static VOID AutoClick (AUTO_CLICK type, INT x, INT y)
 
static POINT CenterPoint (const RECT *prc)
 
static BOOL CALLBACK CountMenuWndProc (HWND hwnd, LPARAM lParam)
 
static INT CountMenuWnds (VOID)
 
static DWORD WINAPI TEST_Tracking_ThreadFunc (LPVOID arg)
 
static VOID OnRButtonDown (HWND hwnd)
 
static LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static VOID TEST_Tracking (VOID)
 
 START_TEST (TrackPopupMenuEx)
 

Macro Definition Documentation

◆ CLASSNAME

#define CLASSNAME   L"TrackPopupMenuEx tests"

Definition at line 11 of file TrackPopupMenuEx.c.

◆ DELAY

#define DELAY   100

Definition at line 90 of file TrackPopupMenuEx.c.

◆ INTERVAL

#define INTERVAL   300

Definition at line 91 of file TrackPopupMenuEx.c.

◆ MENUCLASS

#define MENUCLASS   L"#32768"

Definition at line 12 of file TrackPopupMenuEx.c.

◆ TPM_WORKAREA

#define TPM_WORKAREA   0x10000

Definition at line 22 of file TrackPopupMenuEx.c.

◆ VALID_TPM_FLAGS

#define VALID_TPM_FLAGS
Value:
( \
TPM_LAYOUTRTL | TPM_NOANIMATION | TPM_VERNEGANIMATION | TPM_VERPOSANIMATION | \
TPM_HORNEGANIMATION | TPM_HORPOSANIMATION | TPM_RETURNCMD | \
)
#define TPM_CENTERALIGN
Definition: winuser.h:2395
#define TPM_RIGHTBUTTON
Definition: winuser.h:2399
#define TPM_BOTTOMALIGN
Definition: winuser.h:2404
#define TPM_RIGHTALIGN
Definition: winuser.h:2397
#define TPM_NONOTIFY
Definition: winuser.h:2405
#define TPM_VCENTERALIGN
Definition: winuser.h:2403
#define TPM_VERTICAL
Definition: winuser.h:2401
#define TPM_RETURNCMD
Definition: winuser.h:2406

Definition at line 14 of file TrackPopupMenuEx.c.

Typedef Documentation

◆ AUTO_CLICK

◆ AUTO_KEY

◆ COUNTMENUWND

◆ PCOUNTMENUWND

Enumeration Type Documentation

◆ tagAUTO_CLICK

Enumerator
AUTO_LEFT_CLICK 
AUTO_RIGHT_CLICK 
AUTO_LEFT_DOUBLE_CLICK 
AUTO_RIGHT_DOUBLE_CLICK 
AUTO_LEFT_CLICK 
AUTO_RIGHT_CLICK 
AUTO_LEFT_DOUBLE_CLICK 
AUTO_RIGHT_DOUBLE_CLICK 

Definition at line 93 of file TrackPopupMenuEx.c.

94{
@ AUTO_RIGHT_CLICK
@ AUTO_LEFT_DOUBLE_CLICK
@ AUTO_RIGHT_DOUBLE_CLICK
@ AUTO_LEFT_CLICK
enum tagAUTO_CLICK AUTO_CLICK

◆ tagAUTO_KEY

Enumerator
AUTO_KEY_DOWN 
AUTO_KEY_UP 
AUTO_KEY_DOWN_UP 
AUTO_KEY_DOWN 
AUTO_KEY_UP 
AUTO_KEY_DOWN_UP 

Definition at line 101 of file TrackPopupMenuEx.c.

102{
106} AUTO_KEY;
enum tagAUTO_KEY AUTO_KEY
@ AUTO_KEY_DOWN_UP
@ AUTO_KEY_DOWN
@ AUTO_KEY_UP

Function Documentation

◆ AutoClick()

static VOID AutoClick ( AUTO_CLICK  type,
INT  x,
INT  y 
)
static

Definition at line 129 of file TrackPopupMenuEx.c.

130{
131 INPUT input;
132 ZeroMemory(&input, sizeof(input));
133
134 INT nScreenWidth = GetSystemMetrics(SM_CXSCREEN) - 1;
135 INT nScreenHeight = GetSystemMetrics(SM_CYSCREEN) - 1;
136
137 input.type = INPUT_MOUSE;
138 input.mi.dx = (LONG)(x * (65535.0f / nScreenWidth));
139 input.mi.dy = (LONG)(y * (65535.0f / nScreenHeight));
141 SendInput(1, &input, sizeof(INPUT));
142 Sleep(DELAY);
143
144 input.mi.dx = input.mi.dy = 0;
145
146 INT i, count = 1;
147 switch (type)
148 {
150 count = 2;
151 // FALL THROUGH
152 case AUTO_LEFT_CLICK:
153 {
154 for (i = 0; i < count; ++i)
155 {
156 input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
157 SendInput(1, &input, sizeof(INPUT));
158 Sleep(DELAY);
159
160 input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
161 SendInput(1, &input, sizeof(INPUT));
162 Sleep(DELAY);
163 }
164 break;
165 }
167 count = 2;
168 // FALL THROUGH
169 case AUTO_RIGHT_CLICK:
170 {
171 for (i = 0; i < count; ++i)
172 {
173 input.mi.dwFlags = MOUSEEVENTF_RIGHTDOWN;
174 SendInput(1, &input, sizeof(INPUT));
175 Sleep(DELAY);
176
177 input.mi.dwFlags = MOUSEEVENTF_RIGHTUP;
178 SendInput(1, &input, sizeof(INPUT));
179 Sleep(DELAY);
180 }
181 break;
182 }
183 }
184}
#define DELAY
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLenum GLenum GLenum input
Definition: glext.h:9031
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
long LONG
Definition: pedump.c:60
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
int32_t INT
Definition: typedefs.h:58
UINT WINAPI SendInput(UINT, LPINPUT, int)
Definition: ntwrapper.h:344
#define INPUT_MOUSE
Definition: winable.h:9
#define ZeroMemory
Definition: winbase.h:1753
#define MOUSEEVENTF_ABSOLUTE
Definition: winuser.h:1205
#define SM_CYSCREEN
Definition: winuser.h:971
#define MOUSEEVENTF_LEFTUP
Definition: winuser.h:1196
#define MOUSEEVENTF_RIGHTUP
Definition: winuser.h:1198
#define MOUSEEVENTF_MOVE
Definition: winuser.h:1194
#define MOUSEEVENTF_LEFTDOWN
Definition: winuser.h:1195
#define MOUSEEVENTF_RIGHTDOWN
Definition: winuser.h:1197
#define SM_CXSCREEN
Definition: winuser.h:970
int WINAPI GetSystemMetrics(_In_ int)

Referenced by TEST_Tracking_ThreadFunc().

◆ AutoKey()

static VOID AutoKey ( AUTO_KEY  type,
UINT  vKey 
)
static

Definition at line 109 of file TrackPopupMenuEx.c.

110{
111 if (type == AUTO_KEY_DOWN_UP)
112 {
113 AutoKey(AUTO_KEY_DOWN, vKey);
114 AutoKey(AUTO_KEY_UP, vKey);
115 return;
116 }
117
118 INPUT input;
119 ZeroMemory(&input, sizeof(input));
120
121 input.type = INPUT_KEYBOARD;
122 input.ki.wVk = vKey;
123 input.ki.dwFlags = ((type == AUTO_KEY_UP) ? KEYEVENTF_KEYUP : 0);
124 SendInput(1, &input, sizeof(INPUT));
125 Sleep(DELAY);
126}
static VOID AutoKey(AUTO_KEY type, UINT vKey)
#define INPUT_KEYBOARD
Definition: winable.h:10
#define KEYEVENTF_KEYUP
Definition: winuser.h:1113

Referenced by AutoKey(), and TEST_Tracking_ThreadFunc().

◆ CenterPoint()

static POINT CenterPoint ( const RECT prc)
static

Definition at line 187 of file TrackPopupMenuEx.c.

188{
189 POINT pt = { (prc->left + prc->right) / 2, (prc->top + prc->bottom) / 2 };
190 return pt;
191}
#define pt(x, y)
Definition: drawing.c:79
_Out_ LPRECT prc
Definition: ntgdi.h:1658
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

Referenced by TEST_Tracking_ThreadFunc().

◆ CountMenuWndProc()

static BOOL CALLBACK CountMenuWndProc ( HWND  hwnd,
LPARAM  lParam 
)
static

Definition at line 199 of file TrackPopupMenuEx.c.

200{
201 if (!IsWindowVisible(hwnd))
202 return TRUE;
203
204 WCHAR szClass[64];
205 GetClassNameW(hwnd, szClass, _countof(szClass));
206 if (lstrcmpiW(szClass, MENUCLASS) != 0)
207 return TRUE;
208
210 pData->nMenuCount += 1;
211 return TRUE;
212}
struct tagCOUNTMENUWND * PCOUNTMENUWND
#define MENUCLASS
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
#define _countof(array)
Definition: sndvol32.h:70
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
BOOL WINAPI IsWindowVisible(_In_ HWND)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CountMenuWnds().

◆ CountMenuWnds()

static INT CountMenuWnds ( VOID  )
static

Definition at line 215 of file TrackPopupMenuEx.c.

216{
217 COUNTMENUWND data = { 0 };
219 return data.nMenuCount;
220}
static BOOL CALLBACK CountMenuWndProc(HWND hwnd, LPARAM lParam)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by TEST_Tracking_ThreadFunc().

◆ OnRButtonDown()

static VOID OnRButtonDown ( HWND  hwnd)
static

Definition at line 253 of file TrackPopupMenuEx.c.

254{
256
257 POINT pt;
259
260 HMENU hMenu = CreatePopupMenu();
261 BOOL ret = AppendMenuW(hMenu, MF_STRING, 100, L"(Dummy)");
262 ok_int(ret, TRUE);
263
265 INT nCmdID = (INT)TrackPopupMenuEx(hMenu, uFlags, pt.x, pt.y, hwnd, NULL);
266
267 ok_int(nCmdID, 100);
268
269 DestroyMenu(hMenu);
270}
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
UINT uFlags
Definition: api.c:59
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
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 INT
Definition: polytest.cpp:20
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
#define MF_STRING
Definition: winuser.h:138
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3032
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)

Referenced by WindowProc().

◆ START_TEST()

START_TEST ( TrackPopupMenuEx  )

Definition at line 337 of file TrackPopupMenuEx.c.

338{
342}
static VOID TEST_InvalidSize(VOID)
static VOID TEST_InvalidFlags(VOID)
static VOID TEST_Tracking(VOID)

◆ TEST_InvalidFlags()

static VOID TEST_InvalidFlags ( VOID  )
static

Definition at line 26 of file TrackPopupMenuEx.c.

27{
29 HMENU hMenu = CreatePopupMenu();
30 BOOL ret;
31
32 ret = AppendMenuW(hMenu, MF_STRING, 100, L"(Dummy)");
33 ok_int(ret, TRUE);
34
35 INT iBit;
37 for (iBit = 0; iBit < sizeof(DWORD) * CHAR_BIT; ++iBit)
38 {
39 uFlags = (1 << iBit);
41 {
42 SetLastError(0xBEEFCAFE);
43 ret = TrackPopupMenuEx(hMenu, uFlags, 0, 0, hwnd, NULL);
47 else
49 }
50 }
51
52 DestroyMenu(hMenu);
53}
#define TPM_WORKAREA
#define VALID_TPM_FLAGS
#define ok_err(error)
Definition: atltest.h:124
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define CHAR_BIT
Definition: urlcache.c:62
#define DWORD
Definition: nt_native.h:44
VERSIONHELPERAPI IsWindows7OrGreater()
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628

Referenced by START_TEST().

◆ TEST_InvalidSize()

static VOID TEST_InvalidSize ( VOID  )
static

Definition at line 56 of file TrackPopupMenuEx.c.

57{
59 HMENU hMenu = CreatePopupMenu();
62 BOOL ret;
63
64 ZeroMemory(&params, sizeof(params));
65
66 ret = AppendMenuW(hMenu, MF_STRING, 100, L"(Dummy)");
67 ok_int(ret, TRUE);
68
69 SetLastError(0xBEEFCAFE);
70 params.cbSize = 0;
71 ret = TrackPopupMenuEx(hMenu, uFlags, 0, 0, hwnd, &params);
74
75 SetLastError(0xBEEFCAFE);
76 params.cbSize = sizeof(params) - 1;
77 ret = TrackPopupMenuEx(hMenu, uFlags, 0, 0, hwnd, &params);
80
81 SetLastError(0xBEEFCAFE);
82 params.cbSize = sizeof(params) + 1;
83 ret = TrackPopupMenuEx(hMenu, uFlags, 0, 0, hwnd, &params);
86
87 DestroyMenu(hMenu);
88}
GLenum const GLfloat * params
Definition: glext.h:5645

Referenced by START_TEST().

◆ TEST_Tracking()

static VOID TEST_Tracking ( VOID  )
static

Definition at line 292 of file TrackPopupMenuEx.c.

293{
295
296 WNDCLASSW wc = { 0, WindowProc };
297 wc.hInstance = hInstance;
300 wc.hbrBackground = (HBRUSH)UlongToHandle(COLOR_3DFACE + 1);
302 if (!RegisterClassW(&wc))
303 {
304 skip("RegisterClassW failed\n");
305 return;
306 }
307
310 0, 0, 320, 200, NULL, NULL, hInstance, NULL);
311 if (!hwnd)
312 {
313 skip("CreateWindowW failed\n");
314 return;
315 }
316
319
321 if (!hThread)
322 {
323 skip("CreateThread failed\n");
325 return;
326 }
328
329 MSG msg;
330 while (GetMessageW(&msg, NULL, 0, 0))
331 {
334 }
335}
#define CLASSNAME
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static DWORD WINAPI TEST_Tracking_ThreadFunc(LPVOID arg)
Arabic default style
Definition: afstyles.h:94
#define skip(...)
Definition: atltest.h:64
#define msg(x)
Definition: auth_time.c:54
#define UlongToHandle(ul)
Definition: basetsd.h:97
HINSTANCE hInstance
Definition: charmap.c:19
#define CloseHandle
Definition: compat.h:739
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE hThread
Definition: wizard.c:28
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
LPCWSTR lpszClassName
Definition: winuser.h:3261
HBRUSH hbrBackground
Definition: winuser.h:3259
HICON hIcon
Definition: winuser.h:3257
HINSTANCE hInstance
Definition: winuser.h:3256
HCURSOR hCursor
Definition: winuser.h:3258
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define SW_SHOWNORMAL
Definition: winuser.h:781
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:695
#define IDI_APPLICATION
Definition: winuser.h:712
#define LoadIcon
Definition: winuser.h:5898
BOOL WINAPI UpdateWindow(_In_ HWND)
#define LoadCursor
Definition: winuser.h:5897
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4392
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define COLOR_3DFACE
Definition: winuser.h:940

Referenced by START_TEST().

◆ TEST_Tracking_ThreadFunc()

static DWORD WINAPI TEST_Tracking_ThreadFunc ( LPVOID  arg)
static

Definition at line 223 of file TrackPopupMenuEx.c.

224{
225 HWND hwnd = (HWND)arg;
226
227 ok_int(CountMenuWnds(), 0);
228
229 RECT rc;
230 GetWindowRect(hwnd, &rc);
231 POINT pt = CenterPoint(&rc);
232
235
236 ok_int(CountMenuWnds(), 1);
237
240
241 ok_int(CountMenuWnds(), 1);
242
245
246 ok_int(CountMenuWnds(), 0);
247
248 PostMessageW(hwnd, WM_CLOSE, 0, 0);
249 return 0;
250}
static INT CountMenuWnds(VOID)
static VOID AutoClick(AUTO_CLICK type, INT x, INT y)
#define INTERVAL
static POINT CenterPoint(const RECT *prc)
HANDLE HWND
Definition: compat.h:19
#define WM_CLOSE
Definition: winuser.h:1640
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define VK_RETURN
Definition: winuser.h:2220
#define VK_DOWN
Definition: winuser.h:2246

Referenced by TEST_Tracking().

◆ WindowProc()

static LRESULT CALLBACK WindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 273 of file TrackPopupMenuEx.c.

274{
275 switch (uMsg)
276 {
277 case WM_CREATE:
278 return 0;
279 case WM_RBUTTONDOWN:
281 break;
282 case WM_DESTROY:
284 break;
285 default:
286 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
287 }
288 return 0;
289}
static VOID OnRButtonDown(HWND hwnd)
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1627
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_RBUTTONDOWN
Definition: winuser.h:1798
#define WM_DESTROY
Definition: winuser.h:1628

Referenced by TEST_Tracking().