mirror of
https://github.com/reactos/reactos.git
synced 2025-05-11 21:34:19 +00:00
Dmitry Timoshkov : Windows doesn' t send the initialization messages to a dialog if a passed in dlgProc is NULL . <dmitry at codeweavers.com>
svn path=/trunk/; revision=31087
This commit is contained in:
parent
2d1aaeaa7e
commit
4eeedf2f9e
1 changed files with 10 additions and 9 deletions
|
@ -798,7 +798,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||||
if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
||||||
else SetWindowLongPtrA( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
else SetWindowLongPtrA( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
|
||||||
|
|
||||||
if (dlgInfo->hUserFont)
|
if (dlgProc && dlgInfo->hUserFont)
|
||||||
SendMessageW( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
SendMessageW( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
||||||
|
|
||||||
/* Create controls */
|
/* Create controls */
|
||||||
|
@ -806,7 +806,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||||
if (DIALOG_CreateControls32( hwnd, dlgTemplate, &template, hInst, unicode ))
|
if (DIALOG_CreateControls32( hwnd, dlgTemplate, &template, hInst, unicode ))
|
||||||
{
|
{
|
||||||
/* Send initialisation messages and set focus */
|
/* Send initialisation messages and set focus */
|
||||||
|
if (dlgProc)
|
||||||
|
{
|
||||||
if (SendMessageW( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param ) &&
|
if (SendMessageW( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param ) &&
|
||||||
((~template.style & DS_CONTROL) || (template.style & WS_VISIBLE)))
|
((~template.style & DS_CONTROL) || (template.style & WS_VISIBLE)))
|
||||||
{
|
{
|
||||||
|
@ -815,7 +816,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||||
if( dlgInfo->hwndFocus )
|
if( dlgInfo->hwndFocus )
|
||||||
SetFocus( dlgInfo->hwndFocus );
|
SetFocus( dlgInfo->hwndFocus );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD))
|
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD))
|
||||||
SendMessageW( hwnd, WM_CHANGEUISTATE, MAKEWPARAM(UIS_INITIALIZE, 0), 0);
|
SendMessageW( hwnd, WM_CHANGEUISTATE, MAKEWPARAM(UIS_INITIALIZE, 0), 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue