static void test_disableowner(void) { HPROPSHEETPAGE hpsp[1]; PROPSHEETPAGEA psp; PROPSHEETHEADERA psh; register_parent_wnd_class(); parent = CreateWindowA("parent class", "", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 100, 100, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), 0); memset(&psp, 0, sizeof(psp)); psp.dwSize = sizeof(psp); psp.dwFlags = 0; psp.hInstance = GetModuleHandleW(NULL); U(psp).pszTemplate = "prop_page1"; U2(psp).pszIcon = NULL; psp.pfnDlgProc = NULL; psp.lParam = 0; hpsp[0] = CreatePropertySheetPageA(&psp); memset(&psh, 0, sizeof(psh)); psh.dwSize = sizeof(psh); psh.dwFlags = PSH_USECALLBACK; psh.pszCaption = "test caption"; psh.nPages = 1; psh.hwndParent = parent; U3(psh).phpage = hpsp; psh.pfnCallback = disableowner_callback; PropertySheetA(&psh); ok(IsWindowEnabled(parent) != 0, "parent window should be enabled\n"); DestroyWindow(parent); }
static HWND create_parent_window(void) { HWND hwnd; InitCommonControls(); /* flush message sequences, so we can check the new sequence by the end of function */ flush_sequences(sequences, NUM_MSG_SEQUENCES); if (!register_parent_wnd_class()) return NULL; hwnd = CreateWindowEx(0, "Month-Cal test parent class", "Month-Cal test parent window", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE, 0, 0, 500, 500, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); assert(hwnd); /* check for message sequences */ ok_sequence(sequences, PARENT_SEQ_INDEX, create_parent_window_seq, "create parent window", TRUE); return hwnd; }
static HWND create_parent_window(void){ if (!register_parent_wnd_class()) return NULL; return CreateWindowA("Trackbar test parent class", "Trackbar test parent window", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE, 0, 0, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); }
static HWND create_parent_window(void) { if (!register_parent_wnd_class()) return NULL; return CreateWindowA("Pager test parent class", "Pager test parent window", WS_OVERLAPPED | WS_VISIBLE, 0, 0, 200, 200, 0, NULL, GetModuleHandleA(NULL), NULL ); }
static HWND create_parent_window(void) { static const WCHAR titleW[] = {'S','y','s','l','i','n','k',' ','t','e','s','t',' ','p','a','r','e','n','t',' ','w','i','n','d','o','w',0}; if (!register_parent_wnd_class()) return NULL; return CreateWindowExW(0, parentClassW, titleW, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE, 0, 0, 200, 100, GetDesktopWindow(), NULL, GetModuleHandleW(NULL), NULL); }
static HWND create_parent_window(void) { HWND hwnd; if (!register_parent_wnd_class()) return NULL; hwnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), NULL, NULL, GetModuleHandleA(NULL), 0); ShowWindow(hwnd, SW_SHOW); return hwnd; }