ReactOS
0.4.16-dev-199-g898cc56
NtUserGetTitleBarInfo.c
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 NtUserGetTitleBarInfo
5
* PROGRAMMERS:
6
*/
7
8
#include "../win32nt.h"
9
10
START_TEST
(
NtUserGetTitleBarInfo
)
11
{
12
HINSTANCE
hinst
=
GetModuleHandle
(
NULL
);
13
HWND
hWnd
;
14
TITLEBARINFO
tbi;
15
16
hWnd
=
CreateWindowA
(
"BUTTON"
,
17
"Test"
,
18
BS_PUSHBUTTON
|
WS_VISIBLE
,
19
0,
20
0,
21
50,
22
30,
23
NULL
,
24
NULL
,
25
hinst
,
26
0);
27
28
ASSERT
(
hWnd
);
29
30
/* FALSE case */
31
/* no windows handle */
32
TEST
(
NtUserGetTitleBarInfo
(
NULL
, &tbi) ==
FALSE
);
33
/* no TITLEBARINFO struct */
34
TEST
(
NtUserGetTitleBarInfo
(
hWnd
,
NULL
) ==
FALSE
);
35
/* nothing */
36
TEST
(
NtUserGetTitleBarInfo
(
NULL
,
NULL
) ==
FALSE
);
37
/* wrong size */
38
tbi.
cbSize
= 0;
39
TEST
(
NtUserGetTitleBarInfo
(
hWnd
, &tbi) ==
FALSE
);
40
41
/* TRUE case */
42
tbi.
cbSize
=
sizeof
(
TITLEBARINFO
);
43
TEST
(
NtUserGetTitleBarInfo
(
hWnd
, &tbi) ==
TRUE
);
44
45
DestroyWindow
(
hWnd
);
46
47
}
48
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
hWnd
HWND hWnd
Definition:
settings.c:17
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
NtUserGetTitleBarInfo
BOOLEAN NTAPI NtUserGetTitleBarInfo(HWND hwnd, PTITLEBARINFO pti)
Definition:
menu.c:5750
void
Definition:
nsiface.idl:2307
ASSERT
#define ASSERT(a)
Definition:
mode.c:44
TEST
#define TEST(x)
Definition:
precomp.h:20
hinst
static HINSTANCE hinst
Definition:
edit.c:551
WS_VISIBLE
#define WS_VISIBLE
Definition:
pedump.c:620
BS_PUSHBUTTON
#define BS_PUSHBUTTON
Definition:
pedump.c:651
tagTITLEBARINFO
Definition:
winuser.h:3762
tagTITLEBARINFO::cbSize
DWORD cbSize
Definition:
winuser.h:3763
GetModuleHandle
#define GetModuleHandle
Definition:
winbase.h:3851
CreateWindowA
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition:
winuser.h:4318
TITLEBARINFO
struct tagTITLEBARINFO TITLEBARINFO
DestroyWindow
BOOL WINAPI DestroyWindow(_In_ HWND)
modules
rostests
apitests
win32nt
ntuser
NtUserGetTitleBarInfo.c
Generated on Fri Nov 1 2024 06:08:08 for ReactOS by
1.9.6