ReactOS 0.4.15-dev-7968-g24a56f8
GW_ENABLEDPOPUP.c File Reference
#include "precomp.h"
#include <windowsx.h>
Include dependency graph for GW_ENABLEDPOPUP.c:

Go to the source code of this file.

Macros

#define CHECK(hwndTarget)
 

Functions

static VOID DoTestBody (VOID)
 
static LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 START_TEST (GW_ENABLEDPOPUP)
 

Variables

static HWND s_hwnd = NULL
 
static HWND s_hwndChild1 = NULL
 
static HWND s_hwndChild2 = NULL
 
static HWND s_hwndChild3 = NULL
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   hwndTarget)
Value:
do { \
trace("hwndRet: %p\n", hwndRet); \
ok_int(hwndRet == hwndTarget, TRUE); \
} while (0)
static HWND s_hwnd
#define TRUE
Definition: types.h:120
#define GW_ENABLEDPOPUP
Definition: winuser.h:767
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)

Function Documentation

◆ DoTestBody()

static VOID DoTestBody ( VOID  )
static

Definition at line 16 of file GW_ENABLEDPOPUP.c.

17{
18 HWND hwndRet;
19#define CHECK(hwndTarget) do { \
20 hwndRet = GetWindow(s_hwnd, GW_ENABLEDPOPUP); \
21 trace("hwndRet: %p\n", hwndRet); \
22 ok_int(hwndRet == hwndTarget, TRUE); \
23} while (0)
24
25 trace("%p, %p, %p, %p\n", s_hwnd, s_hwndChild1, s_hwndChild2, s_hwndChild3);
26
28
30
32
34
35 CHECK(NULL);
36
38
40
42
44
46
47 CHECK(NULL);
48
50
52
55
57
59
61
63
65}
static HWND s_hwndChild1
static HWND s_hwndChild2
static HWND s_hwndChild3
#define CHECK(hwndTarget)
#define trace
Definition: atltest.h:70
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)

Referenced by WindowProc().

◆ START_TEST()

START_TEST ( GW_ENABLEDPOPUP  )

Definition at line 99 of file GW_ENABLEDPOPUP.c.

100{
101 WNDCLASSW wc = { 0 };
102 MSG msg;
103
108 wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
109 wc.lpszClassName = L"GW_ENABLEDPOPUP";
110 if (!RegisterClassW(&wc))
111 {
112 skip("RegisterClass failed\n");
113 return;
114 }
115
116 s_hwnd = CreateWindowW(L"GW_ENABLEDPOPUP", L"GW_ENABLEDPOPUP",
118 0, 0, 100, 100,
119 NULL, NULL, wc.hInstance, NULL);
120 s_hwndChild1 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #1",
122 100, 100, 100, 100,
123 s_hwnd, NULL, wc.hInstance, NULL);
124 s_hwndChild2 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #2",
126 200, 200, 100, 100,
127 s_hwnd, NULL, wc.hInstance, NULL);
128 s_hwndChild3 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #3",
130 300, 100, 100, 100,
133 {
134 skip("CreateWindow failed\n");
135 }
136
137 while (GetMessage(&msg, NULL, 0, 0))
138 {
141 }
142}
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define skip(...)
Definition: atltest.h:64
#define msg(x)
Definition: auth_time.c:54
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_DISABLED
Definition: pedump.c:621
#define WS_POPUPWINDOW
Definition: pedump.c:638
LPCWSTR lpszClassName
Definition: winuser.h:3185
HBRUSH hbrBackground
Definition: winuser.h:3183
HICON hIcon
Definition: winuser.h:3181
HINSTANCE hInstance
Definition: winuser.h:3180
WNDPROC lpfnWndProc
Definition: winuser.h:3177
HCURSOR hCursor
Definition: winuser.h:3182
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI TranslateMessage(_In_ const MSG *)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
#define IDI_APPLICATION
Definition: winuser.h:704
#define GetMessage
Definition: winuser.h:5790
#define LoadIcon
Definition: winuser.h:5813
#define LoadCursor
Definition: winuser.h:5812
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define COLOR_3DFACE
Definition: winuser.h:929

◆ WindowProc()

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

Definition at line 68 of file GW_ENABLEDPOPUP.c.

69{
70 switch (uMsg)
71 {
72 case WM_CREATE:
73 SetTimer(hwnd, 999, 500, NULL);
74 break;
75 case WM_DESTROY:
76 if (s_hwnd == hwnd)
77 {
82 }
83 break;
84 case WM_TIMER:
86 if (wParam == 999 && hwnd == s_hwnd)
87 {
88 DoTestBody();
90 break;
91 }
92 break;
93 default:
94 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
95 }
96 return 0;
97}
static VOID DoTestBody(VOID)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1608
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_TIMER
Definition: winuser.h:1742
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by START_TEST().

Variable Documentation

◆ s_hwnd

HWND s_hwnd = NULL
static

Definition at line 11 of file GW_ENABLEDPOPUP.c.

Referenced by DoTestBody(), START_TEST(), and WindowProc().

◆ s_hwndChild1

HWND s_hwndChild1 = NULL
static

Definition at line 12 of file GW_ENABLEDPOPUP.c.

Referenced by DoTestBody(), START_TEST(), and WindowProc().

◆ s_hwndChild2

HWND s_hwndChild2 = NULL
static

Definition at line 13 of file GW_ENABLEDPOPUP.c.

Referenced by DoTestBody(), START_TEST(), and WindowProc().

◆ s_hwndChild3

HWND s_hwndChild3 = NULL
static

Definition at line 14 of file GW_ENABLEDPOPUP.c.

Referenced by DoTestBody(), START_TEST(), and WindowProc().