Commit f1f1c505 authored by Sergey Khodych's avatar Sergey Khodych Committed by Alexandre Julliard

user32: Use IDOK as default identifier in a template.

parent 205a7f7f
......@@ -674,7 +674,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
dlgInfo->hMenu = hMenu;
dlgInfo->xBaseUnit = xBaseUnit;
dlgInfo->yBaseUnit = yBaseUnit;
dlgInfo->idResult = 0;
dlgInfo->idResult = IDOK;
dlgInfo->flags = flags;
dlgInfo->hDialogHeap = 0;
......
......@@ -930,6 +930,19 @@ static INT_PTR CALLBACK DestroyOnCloseDlgWinProc (HWND hDlg, UINT uiMsg,
return FALSE;
}
static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg,
WPARAM wParam, LPARAM lParam)
{
switch (uiMsg)
{
case WM_INITDIALOG:
EndDialog(hDlg, LOWORD(SendMessage(hDlg, DM_GETDEFID, 0, 0)));
return TRUE;
}
return FALSE;
}
static void test_DialogBoxParamA(void)
{
INT_PTR ret;
......@@ -968,6 +981,9 @@ static void test_DialogBoxParamA(void)
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE ||
broken(GetLastError() == 0xdeadbeef),
"got %d, expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError());
ret = DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestDefButtonDlgProc, 0);
ok(ret == IDOK, "Expected IDOK\n");
}
static void test_DisabledDialogTest(void)
......
......@@ -98,6 +98,13 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
TEST_EMPTY_DIALOG DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
END
MULTI_EDIT_DIALOG DIALOG DISCARDABLE 0, 0, 160, 75
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Multiple Edit Test"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment