Posts: 58
Threads: 19
Joined: Mar 2013
Hello, I have a created macro with a dialog that clicks areas on the screen. It works as intended however when it clicks the screen, the dialog is minimised. How can I keep the dialog in the foreground and always visible? I looked at the styles available in the dialog editor but was unsure.
Many thanks.
Posts: 1,006
Threads: 330
Joined: Mar 2007
see Zorder HWND_TOPMOST or ont
S
Posts: 58
Threads: 19
Joined: Mar 2013
Quote:see Zorder HWND_TOPMOST or ont
Perfect. Thank you!
Posts: 1,006
Threads: 330
Joined: Mar 2007
you wrote minimized but I guessed you meant just covered up by other app windows.
If your dlg is indeed getting minimized for some reason, look at max/min/res functions. They not only set the state for a given window (your own dialog or others) but can be used to test whether a given window is in that state.
S
Posts: 1,338
Threads: 61
Joined: Jul 2006
can also set dialog style to WS_EX_TOPMOST in dialog editor
Posts: 1,006
Threads: 330
Joined: Mar 2007
that is elegant. Don't know why I never did that. I usually just cram all that stuff in WM_INITDIALOG
S
Posts: 58
Threads: 19
Joined: Mar 2013
Quote:can also set dialog style to WS_EX_TOPMOST in dialog editor
Thank you all for your suggestions. This is exactly how I fixed the issue and it works great!