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 
49