Rein Klazes : comdlg32/tests: Fix file dialog resize failures on NT4 and with tiny desktops.
Alexandre Julliard
julliard at winehq.org
Wed Jun 17 10:43:23 CDT 2009
Module: wine
Branch: master
Commit: 8526eee4721d08599b94cee1e8d0e5d9ebe54680
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8526eee4721d08599b94cee1e8d0e5d9ebe54680
Author: Rein Klazes <wijn at online.nl>
Date: Wed Jun 17 08:18:04 2009 +0200
comdlg32/tests: Fix file dialog resize failures on NT4 and with tiny desktops.
---
dlls/comdlg32/tests/filedlg.c | 10 +++++++---
dlls/comdlg32/tests/rsrc.rc | 16 ++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c
index 8b8d6e7..6280c89 100644
--- a/dlls/comdlg32/tests/filedlg.c
+++ b/dlls/comdlg32/tests/filedlg.c
@@ -309,8 +309,12 @@ static LONG_PTR WINAPI resize_template_hook(HWND dlg, UINT msg, WPARAM wParam, L
/* test style */
style = GetWindowLong( parent, GWL_STYLE);
if( resize_testcases[index].flags & OFN_ENABLESIZING)
- ok( style & WS_SIZEBOX,
- "testid %d: dialog should have a WS_SIZEBOX style.\n", index);
+ if( !(style & WS_SIZEBOX)) {
+ win_skip( "OFN_ENABLESIZING flag not supported.\n");
+ PostMessage( parent, WM_COMMAND, IDCANCEL, 0);
+ } else
+ ok( style & WS_SIZEBOX,
+ "testid %d: dialog should have a WS_SIZEBOX style.\n", index);
else
ok( !(style & WS_SIZEBOX),
"testid %d: dialog should not have a WS_SIZEBOX style.\n", index);
@@ -383,7 +387,7 @@ static void test_resize(void)
ofn.nMaxFile = 1042;
ofn.lpfnHook = (LPOFNHOOKPROC) resize_template_hook;
ofn.hInstance = GetModuleHandle(NULL);
- ofn.lpTemplateName = "template1";
+ ofn.lpTemplateName = "template_sz";
for( i = 0; resize_testcases[i].flags != 0xffffffff; i++) {
ofn.lCustData = i;
ofn.Flags = resize_testcases[i].flags |
diff --git a/dlls/comdlg32/tests/rsrc.rc b/dlls/comdlg32/tests/rsrc.rc
index 51415fd..9600d85 100644
--- a/dlls/comdlg32/tests/rsrc.rc
+++ b/dlls/comdlg32/tests/rsrc.rc
@@ -32,3 +32,19 @@ FONT 8, "MS Shell Dlg"
LTEXT "",-1,28,16,204,31
EDITTEXT 56,65,2,200,12,ES_AUTOHSCROLL
}
+
+/* Used by the resize file dialog tests.
+ * Keep this template small or get failures
+ * resizing on small desk tops.
+ * This will work with 640x480 pixels
+ */
+TEMPLATE_SZ DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 300, 40
+STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
+FONT 8, "MS Shell Dlg"
+{
+ LTEXT "Path:",-1,28,4,36,8
+ LTEXT "Text1",-1,4,16,20,40
+ LTEXT "Text2",-1,232,20,65,8
+ LTEXT "",-1,28,16,204,31
+ EDITTEXT 56,65,2,200,12,ES_AUTOHSCROLL
+}
More information about the wine-cvs
mailing list