comdlg32/tests: Fix file dialog resize failures on NT4 and with tiny desktops.

This commit is contained in:
Rein Klazes 2009-06-17 08:18:04 +02:00 committed by Alexandre Julliard
parent 28a2646d21
commit 8526eee472
2 changed files with 23 additions and 3 deletions

View File

@ -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 |

View File

@ -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
}