Announcement
Collapse
No announcement yet.
SetDialogFocus (does this exist?)
Collapse
X
-
That's too vague.
Usually to show or hide a window only the SDK's ShowWindow or PB's verbose Dialog Show State is needed.
Why do you need SetForegroundWindow? I am trying to figure out the context in which the dialog is being
made visible.
Is it at application startup?
Is it after the dialog has been minimized to the system tray?
Are you trying to forcefully grab the foreground from another app?
Comment
-
This is Gosta's app. See post #24 and after.
What I would like to do is to force the Dialog to the top when the timer runs out but I dont know how to do that. I fooled with Dialog styles but no go.
My suggestion was to use DIALOG SHOW STATE hDlg, %SW_SHOWNORMAL in case minimized
and SetForegroundWindow(hDlg) in case behind another window.Last edited by Mike Doty; 20 Oct 2009, 08:33 PM.
Comment
-
Keep in mind that even the Windows API help file suggests that, in general, you shouldn't use the SetForegroundWindow function but let the user choose which window is in the foreground. There are times when it might be necessary but usually, you shouldn't need this. Many applications now simply flash the window and the taskbar button, using something like the FlashWindow API function, to let the user know that something has changed and then the user can switch to the window themselves.Jeff Blakeney
Comment
Comment