Make MessageBox stay on top of other windows

I have a TimerProc that calls a MessageBox. I want MessageBox to stay on top of other windows. So, for example, the parent window sets a timer, then I move to another window on top of this. When the timer fires, I want the MessageBox to appear on top of the window that closes the application. Is this possible, and how should I do it?

+3
source share
2 answers

I think you want to make it System Modal as MB_SYSTEMMODAL, as described here .

And / or make the top window of the owner of the MessageBox.

+4
source

, ? , ?

, MessageBox, , :

, MessageBox, EnumThreadWindows, . , , BringWindowToTop.

MessageBox , , , BringWindowToTop.

MessageBox :

MessageBox , MB_SYSTEMMODAL, MessageBox. MB_TOPMOST, , Vista .

+2

Source: https://habr.com/ru/post/1750841/


All Articles