Check if dialog is visible before setting the focus.
This commit is contained in:
parent
268a36e872
commit
2b37da6792
|
@ -788,7 +788,7 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||||
{
|
{
|
||||||
/* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
|
/* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
|
||||||
but the focus has not changed, set the focus where we expect it. */
|
but the focus has not changed, set the focus where we expect it. */
|
||||||
if ( GetFocus() == hwndPreInitFocus )
|
if ( (wndPtr->dwStyle & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
|
||||||
SetFocus( dlgInfo->hwndFocus );
|
SetFocus( dlgInfo->hwndFocus );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue