55 ok(
ctrl !=
NULL,
"could not get the toolbar control\n");
57 ok(
ret == 0,
"addstring returned %d (expected 0)\n",
ret);
59 ok( maxtextrows == 0 ||
broken(maxtextrows == 1),
60 "Get(Max)TextRows returned %d (expected 0)\n", maxtextrows);
81 ok(
ret > 0,
"CMD_GETFOLDERIDLIST not implemented\n");
83 ok(
buf[0] == 0x66 &&
buf[1] == 0x66,
"CMD_GETFOLDERIDLIST: The buffer was touched on failure\n");
105 ofn.
lpstrFilter =
"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
147 win_skip(
"GetOpenFileNameW is not implemented\n");
157 win_skip(
"GetSaveFileNameW is not implemented\n");
174 SV2CVW2_PARAMS view_params;
179 hr = IShellBrowser_QueryActiveShellView(shell_browser, &shell_view);
183 hr = IShellView_QueryInterface(shell_view, &IID_IShellView2, (
void **)&shell_view2);
186 win_skip(
"IShellView2 not supported\n");
192 hr = IShellView2_DestroyViewWindow(shell_view2);
196 folder_settings.
fFlags = 0;
198 view_params.cbSize =
sizeof(view_params);
199 view_params.psvPrev =
NULL;
200 view_params.pfs = &folder_settings;
201 view_params.psbOwner = shell_browser;
202 view_params.prcView = &
rect;
203 view_params.pvid =
NULL;
204 view_params.hwndView =
NULL;
206 hr = IShellView2_CreateViewWindow2(shell_view2, &view_params);
209 win_skip(
"CreateViewWindow2 is broken on Vista/W2K8\n");
215 hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings);
218 "view mode is %d, expected FVM_LIST\n",
221 hr = IShellView2_DestroyViewWindow(shell_view2);
229 view_params.pvid = &VID_Details;
230 hr = IShellView2_CreateViewWindow2(shell_view2, &view_params);
234 hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings);
237 "view mode is %d, expected FVM_DETAILS\n",
241 if (shell_view2) IShellView2_Release(shell_view2);
242 if (shell_view) IShellView_Release(shell_view);
256 ok(
p!=
NULL,
"Failed to get parent of template\n");
258 ok(
cb!=
NULL,
"Failed to get filter combobox\n");
260 ok (sel != -1,
"Failed to get selection from filter listbox\n");
282 ok(!
ret,
"GetOpenFileNameA returned %#x\n",
ret);
284 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
302 ok(!
ret,
"GetOpenFileNameA returned %#x\n",
ret);
304 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
330 static RECT initrc, rc;
332 static BOOL gotSWP_bottom, gotShowWindow;
349 gotSWP_bottom = gotShowWindow =
FALSE;
354 win_skip(
"OFN_ENABLESIZING flag not supported.\n");
359 "testid %d: dialog should have a WS_SIZEBOX style.\n",
index);
362 "testid %d: dialog should not have a WS_SIZEBOX style.\n",
index);
399 }
else if(
count == 1){
404 "testid %d size-x change %d expected %d\n",
index,
407 "testid %d size-y change %d expected %d\n",
index,
413 for(
i = 0;
i < nrctrls;
i++) {
419#define TESTRECTS( R1, R2, Mx, My, Sx, Sy) \
420 ((R1).left + (Mx) ==(R2).left \
421 &&(R1).top + (My) ==(R2).top \
422 &&(R1).right + (Mx) + (Sx) == (R2).right \
423 &&(R1).bottom + (My) + (Sy) ==(R2).bottom)
429 "control id %03x should have sized horizontally and moved vertically, before %s after %s\n",
436 "control id %03x should have sized horizontally and vertically, before %s after %s\n",
444 "control id %03x should have moved horizontally and vertically, before %s after %s\n",
453 "control id %03x should have moved vertically, before %s after %s\n",
461 "control id %03x should have resized horizontally, before %s after %s\n",
468 "control id %03x was moved/resized, before %s after %s\n",
476 "control id %03x was moved/resized, before %s after %s\n",
487 trace(
"untested control id %03x before %s after %s\n",
505 gotSWP_bottom =
TRUE;
506 ok(!gotShowWindow,
"The WM_WINDOWPOSCHANGING message came after a WM_SHOWWINDOW message\n");
513 gotShowWindow =
TRUE;
514 ok(gotSWP_bottom,
"No WM_WINDOWPOSCHANGING message came before a WM_SHOWWINDOW message\n");
539 ok(!
ret,
"GetOpenFileName returned %#x\n",
ret);
541 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
578 static UINT msgFILEOKSTRING;
598 if(
msg == msgFILEOKSTRING) {
637 skip(
"Failed to create a temporary file name\n");
651 "testid %d: Open File dialog should %shave closed.\n",
i,
655 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
657 ok(cdret,
"Failed to restore current dir err %d\n",
GetLastError());
676 { 0, {0},{0},{0},0 },
679 { 0, {0, 0, 316, 76},{0},{0},0 },
682 { 1, {0, 0, 316, 76} ,{0, 0, 204, 76,},{0},0 },
683 { 1, {0, 0, 316, 76} ,{0, 0, 204, 76,},{0},
OFN_SHOWHELP},
685 { 1, {0, 0, 316, 170} ,{0, 0, 204, 170,},{0},0 },
686 { 1, {0, 0, 316, 165} ,{0, 0, 411, 165,},{0},
OFN_SHOWHELP },
688 { 1, {0, 0, 300, 100} ,{73, 17, 50, 50,},{0},0 },
690 { 2, {0, 0, 280, 100} ,{0, 0, 50, 50,},{300,20,30,30},0 },
699 static int index, fixhelp;
700 static posz posz0[2];
701 static RECT clrcParent, clrcChild, rcStc32;
702 static HWND hwndStc32;
721 posz0[0].
x = wrcParent.
left;
722 posz0[0].
y = wrcParent.
top;
725 }
else if(
index == 1) {
726 posz0[1].
x = wrcParent.
left;
727 posz0[1].
y = wrcParent.
top;
730 fixhelp = posz0[1].
cy - posz0[0].
cy;
734 int expectx, expecty;
742 expecty = posz0[withhelp].
cy + clrcChild.
bottom;
743 expectx = posz0[withhelp].
cx;
747 expecty = posz0[withhelp].
cy;
748 if( rcStc32.
bottom - rcStc32.
top + (withhelp ? 0 : fixhelp) > clrcParent.
bottom) {
750 if( !withhelp) expecty += fixhelp;
755 expectx = posz0[withhelp].
cx;
757 expectx += clrcChild.
right - clrcParent.
right;
766 "Wrong height of dialog %d, expected %d\n",
767 wrcParent.
bottom - wrcParent.
top, expecty);
769 "Wrong width of dialog %d, expected %d\n",
770 wrcParent.
right - wrcParent.
left, expectx);
774 "Wrong height of dialog %d, expected more than %d\n",
775 wrcParent.
bottom - wrcParent.
top, expecty);
777 "Wrong width of dialog %d, expected more than %d\n",
778 wrcParent.
right - wrcParent.
left, expectx);
806 win_skip(
"could not find the dialog template\n");
811 pv += 3 *
sizeof(
WORD);
819 if( itemtemplateStc32->
x != 22222) {
820 win_skip(
"could not find the first item template\n");
825 pv += 4 *
sizeof(
WORD);
829 if( itemtemplateBtn->
x != 12345) {
830 win_skip(
"could not find the second item template\n");
858 ok(!
ret,
"GetOpenFileNameA returned %#x\n",
ret);
860 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
909 ofn.
lpstrFilter =
"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
931 char filename[1024] =
"pls press Enter if sizable, Esc otherwise";
936 skip(
"some interactive resizable dialog tests (set WINETEST_INTERACTIVE=1)\n");
947 ok(
ret ==
TRUE,
"File Dialog should have been sizable\n");
949 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
952 ok( !
ret,
"File Dialog should NOT have been sizable\n");
954 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
959 ok( !
ret,
"File Dialog should NOT have been sizable\n");
961 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
964 ok( !
ret,
"File Dialog should NOT have been sizable\n");
966 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
973 const char *test_dir_name =
"C:\\mru_test";
975 const char *test_full_path =
"C:\\mru_test\\test.txt";
992 strcpy(filename_buf, test_full_path);
997 ok(!
ret,
"CommDlgExtendedError returned %x\n",
ret);
998 ok(testcase.
actclose,
"Open File dialog should have closed.\n");
1008 ok(!
ret,
"CommDlgExtendedError returned %x\n",
ret);
1009 ok(testcase.
actclose,
"Open File dialog should have closed.\n");
1011 win_skip(
"Platform doesn't save MRU data\n");
1034 const char *expected_filename)
1044 ok(boolret,
"%s: expected TRUE\n",
filter);
1047 ok(!
ret,
"%s: CommDlgExtendedError returned %#x\n",
filter,
ret);
1050 ok(
strcmp(filename_ptr, expected_filename) == 0,
1051 "%s: Filename is %s, expected %s\n",
filter, filename_ptr, expected_filename);
1062 const char *defext_concrete_filters[] = {
1063 "TestFilter (*.abc)\0*.abc\0",
1064 "TestFilter (*.abc;)\0*.abc;\0",
1065 "TestFilter (*.abc;*.def)\0*.abc;*.def\0",
1068 const char *defext_wildcard_filters[] = {
1069 "TestFilter (*.pt*)\0*.pt*\0",
1070 "TestFilter (*.pt*;*.abc)\0*.pt*;*.abc\0",
1071 "TestFilter (*.ab?)\0*.ab?\0",
1072 "TestFilter (*.*)\0*.*\0",
1073 "TestFilter (*sav)\0*sav\0",
1078 ok(boolret,
"Failed to get current dir err %d\n",
GetLastError());
1160 WCHAR filterW[] = {
't',
'e',
'x',
't',
'\0',
'*',
'.',
't',
'x',
't',
'\0',
1161 'A',
'l',
'l',
'\0',
'*',
'\0',
'\0'};
1187 ok(
ret,
"GetOpenFileNameA returned %#x\n",
ret);
1189 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
1191 ok(ofnA.
nFileOffset != 0xdead,
"ofnA.nFileOffset is 0xdead\n");
1218 ok(
ret,
"GetOpenFileNameA returned %#x\n",
ret);
1220 ok(!
ret,
"CommDlgExtendedError returned %#x\n",
ret);
1222 ok(ofnW.
nFileOffset != 0xdead,
"ofnW.nFileOffset is 0xdead\n");
1230 WCHAR filterW[] = {
't',
'e',
'x',
't',
'\0',
'*',
'.',
't',
'x',
't',
'\0',
1231 'A',
'l',
'l',
'\0',
'*',
'\0',
'\0'};
1239 szInitialDir[
strlen(szInitialDir)] =
'\\';
1240 szInitialDirW[
lstrlenW(szInitialDirW)] =
'\\';
1298 "OleInitialize() returned %#x (first dialog %#x)\n",
hr, first_dlg);
1324 ok(!
ret,
"GetOpenFileNameA returned %#x\n",
ret);
1327 ok(
hr ==
S_OK,
"OleInitialize() returned %#x\n",
hr);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static const char * wine_dbgstr_rect(const RECT *prc)
#define CDERR_INITIALIZATION
DWORD WINAPI CommDlgExtendedError(void)
#define OFN_ENABLETEMPLATEHANDLE
#define OPENFILENAME_SIZE_VERSION_400W
#define CDM_GETFOLDERIDLIST
#define OFN_FILEMUSTEXIST
#define OPENFILENAME_SIZE_VERSION_400A
#define OFN_ENABLETEMPLATE
#define CDM_GETFOLDERPATH
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
BOOL WINAPI GetSaveFileNameA(OPENFILENAMEA *ofn)
BOOL WINAPI GetOpenFileNameA(OPENFILENAMEA *ofn)
BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn)
BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
#define ERROR_CALL_NOT_IMPLEMENTED
static void cleanup(void)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
static CHAR SYSDIR[MAX_PATH]
static void test_arrange(void)
static void test_mru(void)
static void test_extension(void)
static void toolbarcheck(HWND hDlg)
static LRESULT CALLBACK hook_proc(int code, WPARAM wp, LPARAM lp)
#define TESTRECTS(R1, R2, Mx, My, Sx, Sy)
static BOOL WINAPI test_null_enum(HWND hwnd, LPARAM lParam)
static UINT_PTR WINAPI test_extension_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_extension_helper(OPENFILENAMEA *ofn, const char *filter, const char *expected_filename)
static void test_create_view_window2(void)
static UINT_PTR WINAPI ok_template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_null_filename(void)
static void test_ok(void)
static UINT_PTR CALLBACK OFNHookProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
static UINT_PTR WINAPI template_hook_arrange(HWND dlgChild, UINT msg, WPARAM wParam, LPARAM lParam)
static UINT_PTR WINAPI test_ok_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static ok_wndproc_testcase ok_testcases[]
static void test_resizable2(void)
static void test_directory_filename(void)
static UINT_PTR WINAPI test_null_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static struct @1660 arrange_tests[]
static UINT_PTR CALLBACK path_hook_proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
static UINT_PTR WINAPI template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_resize(void)
static void test_DialogCancel(void)
static const struct @1659 resize_testcases[]
static void test_getfolderpath(void)
static BOOL resizesupported
static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static UINT_PTR WINAPI test_ole_init_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_create_view_template(void)
static UINT_PTR WINAPI resize_template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_ole_initialization(void)
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
#define test_file_name(a)
static const char tmpfilename[]
unsigned __int3264 UINT_PTR
_Out_opt_ int _Out_opt_ int * cy
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define SetWindowLongPtrA
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
struct tagNMHDR * LPNMHDR
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
int WINAPI GetDlgCtrlID(_In_ HWND)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)