30#define WC_DIALOG (MAKEINTATOM(0x8002))
39#define IDC_APPLY_BUTTON 12321
50 (
void *)&reading_layout,
sizeof(reading_layout)) && reading_layout == 1;
58 int min_timeout = 100;
83 ok(
size != 0,
"Failed to get size of propsheet dialog resource\n");
85 ok(
buffer_size == 2 *
size,
"Unexpected template buffer size %u, resource size %u\n",
93 ok(!
strcmp(caption,
"test caption"),
"caption: %s\n", caption);
111 ok(!
strcmp(caption,
"test caption"),
"caption: %s\n", caption);
143 memset(&psp, 0,
sizeof(psp));
147 U(psp).pszTemplate =
"prop_page1";
152 hpsp[0] = pCreatePropertySheetPageA(&psp);
154 memset(&psh, 0,
sizeof(psh));
160 U3(psh).phpage = hpsp;
163 hdlg = (
HWND)pPropertySheetA(&psh);
169 "got unexpected style: %x\n",
style);
182 memset(&psp, 0,
sizeof(psp));
186 U(psp).pszTemplate =
"prop_page1";
191 hpsp[0] = pCreatePropertySheetPageA(&psp);
193 memset(&psh, 0,
sizeof(psh));
199 U3(psh).phpage = hpsp;
202 hdlg = (
HWND)pPropertySheetA(&psh);
211 ok(hpage ==
NULL,
"expected no current page, got %p, index=%d\n", hpage,
active_page);
217 "expected no pending WM_PAINT messages\n");
260 parenthwnd =
CreateWindowA(
"parent class",
"",
WS_CAPTION |
WS_SYSMENU |
WS_VISIBLE, 100, 100, 100, 100,
GetDesktopWindow(),
NULL,
GetModuleHandleA(
NULL), 0);
262 memset(&psp, 0,
sizeof(psp));
266 U(psp).pszTemplate =
"prop_page1";
271 hpsp[0] = pCreatePropertySheetPageA(&psp);
273 memset(&psh, 0,
sizeof(psh));
279 U3(psh).phpage = hpsp;
282 p = pPropertySheetA(&psh);
283 ok(
p == 0,
"Expected 0, got %ld\n",
p);
353 const INT nextID = 12324;
354 const INT backID = 12323;
367 hpsp[0] = pCreatePropertySheetPageA(&psp[0]);
373 hpsp[1] = pCreatePropertySheetPageA(&psp[1]);
379 hpsp[2] = pCreatePropertySheetPageA(&psp[2]);
385 hpsp[3] = pCreatePropertySheetPageA(&psp[3]);
388 memset(&psh, 0,
sizeof(psh));
394 U3(psh).phpage = hpsp;
395 hdlg = (
HWND)pPropertySheetA(&psh);
403 "got unexpected style: %x\n",
style);
407 ok(controlID == nextID,
"Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID);
412 if (hwndtoindex_supported)
417 ok(controlID ==
IDC_PS_EDIT1,
"Focus should be set to the first item on the second page. Expected: %d, Found: %ld\n",
IDC_PS_EDIT1, controlID);
427 if (hwndtoindex_supported)
432 ok(controlID ==
IDC_PS_RADIO1,
"Focus should have been set to item on third page. Expected: %d, Found %ld\n",
IDC_PS_RADIO1, controlID);
436 if (hwndtoindex_supported)
441 ok(controlID ==
IDC_PS_EDIT1,
"Focus should have been set to the first item on second page. Expected: %d, Found %ld\n",
IDC_PS_EDIT1, controlID);
448 if (hwndtoindex_supported)
451 if (hwndtoindex_supported)
458 ok(controlID == nextID,
"Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID);
481 memset(&psp, 0,
sizeof(psp));
485 U(psp).pszTemplate =
"prop_page1";
490 hpsp[0] = pCreatePropertySheetPageA(&psp);
492 memset(&psh, 0,
sizeof(psh));
498 U3(psh).phpage = hpsp;
501 hdlg = (
HWND)pPropertySheetA(&psh);
507 prevRight = rc.
right;
513 ok(rc.
top ==
top,
"Cancel button should have same top as OK button\n");
515 ok(rc.
left < prevRight,
"Cancel button should be to the left of OK button\n");
517 ok(rc.
left > prevRight,
"Cancel button should be to the right of OK button\n");
518 prevRight = rc.
right;
522 ok(rc.
top ==
top,
"Apply button should have same top as OK button\n");
524 ok(rc.
left < prevRight,
"Apply button should be to the left of Cancel button\n");
526 ok(rc.
left > prevRight,
"Apply button should be to the right of Cancel button\n");
527 prevRight = rc.
right;
531 ok(rc.
top ==
top,
"Help button should have same top as OK button\n");
533 ok(rc.
left < prevRight,
"Help button should be to the left of Apply button\n");
535 ok(rc.
left > prevRight,
"Help button should be to the right of Apply button\n");
576 U2(psp[0]).pszIcon =
NULL;
585 U(psh).pszIcon =
NULL;
589 U2(psh).nStartPage = 0;
597 hdlg = (
HWND)pPropertySheetA(&psh);
629#define RECEIVER_SHEET_CALLBACK 0
630#define RECEIVER_SHEET_WINPROC 1
631#define RECEIVER_PAGE 2
633#define NUM_MSG_SEQUENCES 1
634#define PROPSHEET_SEQ_INDEX 0
748 (message < WM_MOUSEFIRST || message > WM_MOUSEHWHEEL) &&
799 memset(&psp, 0,
sizeof(psp));
808 hpsp[0] = pCreatePropertySheetPageA(&psp);
810 memset(&psh, 0,
sizeof(psh));
817 U3(psh).phpage = hpsp;
820 hdlg = (
HWND)pPropertySheetA(&psh);
839 memset(&psp, 0,
sizeof(psp));
849 hpsp[0] = pCreatePropertySheetPageA(&psp);
850 hpsp[1] = pCreatePropertySheetPageA(&psp);
851 hpsp[2] = pCreatePropertySheetPageA(&psp);
854 hpsp[3] = pCreatePropertySheetPageA(&psp);
857 hpsp[4] = pCreatePropertySheetPageA(&psp);
859 memset(&psh, 0,
sizeof(psh));
865 U3(psh).phpage = hpsp;
867 hdlg = (
HWND)pPropertySheetA(&psh);
887 ok(
r == 2,
"got %d\n",
r);
893 ok(
r == 3,
"got %d\n",
r);
900 ok(
r == 4,
"got %d\n",
r);
907 ok(
r == 3,
"got %d\n",
r);
914 ok(
r == 3,
"got %d\n",
r);
916 pDestroyPropertySheetPage(hpsp[4]);
929 memset(&psp, 0,
sizeof(psp));
939 hpsp[0] = pCreatePropertySheetPageA(&psp);
940 hpsp[1] = pCreatePropertySheetPageA(&psp);
941 hpsp[2] = pCreatePropertySheetPageA(&psp);
944 hpsp[3] = pCreatePropertySheetPageA(&psp);
947 hpsp[4] = pCreatePropertySheetPageA(&psp);
949 memset(&psh, 0,
sizeof(psh));
955 U3(psh).phpage = hpsp;
957 hdlg = (
HWND)pPropertySheetA(&psh);
981 ok(
r == 2,
"got %d\n",
r);
987 ok(
r == 3,
"got %d\n",
r);
994 ok(
r == 4,
"got %d\n",
r);
1001 ok(
r == 3,
"got %d\n",
r);
1008 ok(
r == 3,
"got %d\n",
r);
1010 pDestroyPropertySheetPage(hpsp[4]);
1032 ok(psp->
lParam && psp->
lParam != (
LPARAM)psp,
"Expected newly allocated page description, got %lx, %p\n",
1034 ok(psp_orig->pszTitle == psp->
pszTitle,
"Expected same page title pointer\n");
1035 ok(!
lstrcmpA(psp_orig->pszTitle, psp->
pszTitle),
"Expected same page title string\n");
1048 ok(0,
"Unexpected message %u\n",
msg);
1060 ok(psp->
lParam && psp->
lParam != (
LPARAM)psp,
"Expected newly allocated page description, got %lx, %p\n",
1062 ok(psp_orig->pszTitle == psp->
pszTitle,
"Expected same page title pointer\n");
1063 ok(!
lstrcmpW(psp_orig->pszTitle, psp->
pszTitle),
"Expected same page title string\n");
1076 ok(0,
"Unexpected message %u\n",
msg);
1084 static const WCHAR titleW[] = {
'T',
'i',
't',
'l',
'e',0};
1094 page.u.pageA.pszTitle =
"Title";
1099 page.addref_called = 0;
1100 hpsp = pCreatePropertySheetPageA(&
page.u.pageA);
1103 ok(hpsp ==
NULL,
"Expected failure, size %u\n",
page.u.pageA.dwSize);
1106 ok(hpsp !=
NULL,
"Failed to create a page, size %u\n",
page.u.pageA.dwSize);
1112 page.release_called = 0;
1113 ret = pDestroyPropertySheetPage(hpsp);
1114 ok(
ret,
"Failed to destroy a page\n");
1115 ok(
page.release_called == 1,
"Expected RELEASE callback message\n");
1128 page.addref_called = 0;
1132 ok(hpsp ==
NULL,
"Expected failure, size %u\n",
page.u.pageW.dwSize);
1135 ok(hpsp !=
NULL,
"Failed to create a page, size %u\n",
page.u.pageW.dwSize);
1141 page.release_called = 0;
1142 ret = pDestroyPropertySheetPage(hpsp);
1143 ok(
ret,
"Failed to destroy a page\n");
1144 ok(
page.release_called == 1,
"Expected RELEASE callback message\n");
1156 memset(&psp, 0,
sizeof(psp));
1157 psp.
dwSize =
sizeof(psp);
1162 hpsp = pCreatePropertySheetPageA(&psp);
1163 ok(hpsp != 0,
"CreatePropertySheetPage failed\n");
1165 memset(&psh, 0,
sizeof(psh));
1169 U3(psh).phpage = &hpsp;
1171 ret = pPropertySheetA(&psh);
1175 hpsp = pCreatePropertySheetPageA(&psp);
1176 ok(hpsp != 0,
"CreatePropertySheetPage failed\n");
1177 U3(psh).phpage = &hpsp;
1180 ret = pPropertySheetA(&psh);
1191#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
1206 trace(
"RTL locale detected\n");
int strcmp(const char *String1, const char *String2)
static void init_msg_sequences(struct msg_sequence **seq, int n)
INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA lpPropSheetPage)
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
#define INVALID_HANDLE_VALUE
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTickCount(VOID)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble top
static const WCHAR titleW[]
static FN_CreatePropertySheetPageW pCreatePropertySheetPageW
static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
static void test_custom_default_button(void)
static UINT CALLBACK proppage_callback_a(HWND hwnd, UINT msg, PROPSHEETPAGEA *psp)
static void test_CreatePropertySheetPage(void)
static LRESULT CALLBACK hook_proc(int code, WPARAM wp, LPARAM lp)
static INT_PTR CALLBACK page_with_custom_default_button_dlg_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
static BOOL add_button_has_been_pressed
static INT_PTR CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
#define NUM_MSG_SEQUENCES
static void test_messages(void)
static void test_title(void)
static void save_message(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, INT receiver)
static void test_disableowner(void)
static void test_nopage(void)
static WNDPROC oldWndProc
static UINT CALLBACK proppage_callback_w(HWND hwnd, UINT msg, PROPSHEETPAGEW *psp)
static void test_buttons(void)
static WNDPROC old_nav_dialog_proc
static void register_parent_wnd_class(void)
static void detect_locale(void)
static INT_PTR CALLBACK page_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_wiznavigation(void)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
#define PROPSHEET_SEQ_INDEX
static void flush_events(void)
static INT_PTR CALLBACK page_dlg_proc_messages(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_PSM_INSERTPAGE(void)
static void test_PSM_ADDPAGE(void)
#define RECEIVER_SHEET_WINPROC
#define RECEIVER_SHEET_CALLBACK
static LRESULT CALLBACK sheet_callback_messages_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static const struct message property_sheet_seq[]
static LRESULT CALLBACK new_nav_dialog_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void init_functions(void)
static int CALLBACK disableowner_callback(HWND hwnd, UINT msg, LPARAM lparam)
static void test_bad_control_class(void)
static int CALLBACK sheet_callback_messages(HWND hwnd, UINT msg, LPARAM lParam)
#define IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON
#define IDD_PROP_PAGE_RADIO
#define IDD_PROP_PAGE_MESSAGE_TEST
#define IDD_PROP_PAGE_ERROR
#define IDD_PROP_PAGE_EXIT
#define IDC_PS_PUSHBUTTON1
#define IDD_PROP_PAGE_EDIT
#define IDD_PROP_PAGE_BAD_CONTROL
#define IDD_PROP_PAGE_INTRO
static const WCHAR desc[]
struct _PSP * HPROPSHEETPAGE
#define LOCALE_USER_DEFAULT
#define PSM_GETTABCONTROL
#define PROPSHEETHEADERA_V1_SIZE
#define PROPSHEETPAGEA_V1_SIZE
#define PSM_ISDIALOGMESSAGE
#define PSM_GETCURRENTPAGEHWND
#define PROPSHEETPAGEA_V4_SIZE
#define PROPSHEETPAGEW_V4_SIZE
#define PSH_PROPSHEETPAGE
#define PROPSHEETPAGEW_V1_SIZE
struct _PROPSHEETPAGEA PROPSHEETPAGEA
union custom_proppage::@1655 u
unsigned int release_called
unsigned int addref_called
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
DWORD WINAPI GetCurrentThreadId(void)
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define LOCALE_IREADINGLAYOUT
HWND WINAPI GetFocus(void)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define SetWindowLongPtrA
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CTLCOLORSTATIC
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetWindowLongPtrA
HWND WINAPI GetNextDlgTabItem(_In_ HWND, _In_opt_ HWND, _In_ BOOL)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI GetDesktopWindow(void)
#define WM_IME_SETCONTEXT
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define MAKELRESULT(l, h)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
struct tagNMHDR * LPNMHDR
BOOL WINAPI IsWindowEnabled(_In_ HWND)
#define MAKEINTRESOURCEA(i)
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define WM_NCMBUTTONDBLCLK
#define SetWindowLongPtrW
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGED
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)