ReactOS  0.4.15-dev-2155-g06f57e1
NtUserGetClassInfo.c File Reference
#include <win32nt.h>
Include dependency graph for NtUserGetClassInfo.c:

Go to the source code of this file.

Functions

 START_TEST (NtUserGetClassInfo)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtUserGetClassInfo  )

Definition at line 10 of file NtUserGetClassInfo.c.

11 {
13  WNDCLASSEXW wclex, wclex2 = {0};
15  PWSTR pwstr = NULL;
16 
17  us.Length = 8;
18  us.MaximumLength = 8;
19  us.Buffer = L"test";
20 
21  wclex.cbSize = sizeof(WNDCLASSEXW);
22  wclex.style = 0;
23  wclex.lpfnWndProc = NULL;
24  wclex.cbClsExtra = 2;
25  wclex.cbWndExtra = 4;
26  wclex.hInstance = hinst;
27  wclex.hIcon = NULL;
28  wclex.hCursor = NULL;
29  wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5));
30  wclex.lpszMenuName = L"MyMenu";
31  wclex.lpszClassName = us.Buffer;
32  wclex.hIconSm = NULL;
33 
34  ASSERT(RegisterClassExW(&wclex) != 0);
35 
36  TEST(GetClassInfoExW(hinst, us.Buffer, &wclex) != 0);
37  wclex2.cbSize = sizeof(WNDCLASSEXW);
38  TEST(NtUserGetClassInfo(hinst, &us, &wclex2, &pwstr, 0) != 0);
39 
40  TEST(pwstr == wclex.lpszMenuName);
41  TEST(wclex2.cbSize == wclex.cbSize);
42  TEST(wclex2.style == wclex.style);
43  TEST(wclex2.lpfnWndProc == wclex.lpfnWndProc);
44  TEST(wclex2.cbClsExtra == wclex.cbClsExtra);
45  TEST(wclex2.cbWndExtra == wclex.cbWndExtra);
46  TEST(wclex2.hInstance == wclex.hInstance);
47  TEST(wclex2.hIcon == wclex.hIcon);
48  TEST(wclex2.hCursor == wclex.hCursor);
49  TEST(wclex2.hbrBackground == wclex.hbrBackground);
50  TEST(wclex2.lpszMenuName == 0);
51  TEST(wclex2.lpszClassName == 0);
52  TEST(wclex2.hIconSm == wclex.hIconSm);
53 
54 }
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
int cbWndExtra
Definition: winuser.h:3195
#define RGB(r, g, b)
Definition: precomp.h:62
static const BYTE us[]
Definition: encode.c:689
uint16_t * PWSTR
Definition: typedefs.h:56
HICON hIcon
Definition: winuser.h:3197
struct _WNDCLASSEXW WNDCLASSEXW
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
LPCWSTR lpszMenuName
Definition: winuser.h:3200
int cbClsExtra
Definition: winuser.h:3194
LPCWSTR lpszClassName
Definition: winuser.h:3201
#define ASSERT(a)
Definition: mode.c:45
#define TEST(x)
Definition: precomp.h:20
HBRUSH hbrBackground
Definition: winuser.h:3199
UINT cbSize
Definition: winuser.h:3191
HINSTANCE hInstance
Definition: winuser.h:3196
static const WCHAR L[]
Definition: oid.c:1250
HCURSOR hCursor
Definition: winuser.h:3198
UINT style
Definition: winuser.h:3192
WNDPROC lpfnWndProc
Definition: winuser.h:3193
#define GetModuleHandle
Definition: winbase.h:3683
#define NULL
Definition: types.h:112
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HICON hIconSm
Definition: winuser.h:3202
static HINSTANCE hinst
Definition: edit.c:551
BOOL NTAPI NtUserGetClassInfo(HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW wcex, LPWSTR *ppszMenuName, BOOL Ansi)
Definition: class.c:2720