CreateDialogParamA should not call CreateDialogParamW, because

that'd create a dialog box with a Unicode dialog procedure...
This commit is contained in:
Ove Kaaven 1999-07-18 15:29:09 +00:00 committed by Alexandre Julliard
parent 736eef4a20
commit 483c548eed
1 changed files with 5 additions and 8 deletions

View File

@ -825,14 +825,11 @@ HWND WINAPI CreateDialogParamA( HINSTANCE hInst, LPCSTR name,
HWND owner, DLGPROC dlgProc,
LPARAM param )
{
if (HIWORD(name))
{
LPWSTR str = HEAP_strdupAtoW( GetProcessHeap(), 0, name );
HWND hwnd = CreateDialogParamW( hInst, str, owner, dlgProc, param);
HeapFree( GetProcessHeap(), 0, str );
return hwnd;
}
return CreateDialogParamW( hInst, (LPCWSTR)name, owner, dlgProc, param );
HANDLE hrsrc = FindResourceA( hInst, name, RT_DIALOGA );
if (!hrsrc) return 0;
return CreateDialogIndirectParamA( hInst,
(LPVOID)LoadResource(hInst, hrsrc),
owner, dlgProc, param );
}