Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force MessageBox to display as top window

Tags:

c++

winapi

I don't known how to explain what I mean. I created a program (A), that shows a MessageBox after a time out.

It only shows the MessageBox like I want, if my program (A) is activated. But when I'm working with another program (B) (my program - A - is not active), the MessageBox only appears in the task bar, like this:

enter image description here

I want to this:

enter image description here

Can anyone help me create a messageBox that will be top-most (what is the name of the method)?

like image 613
cristiano Avatar asked Nov 13 '13 04:11

cristiano


1 Answers

I also find out my solution:

I can use:

MB_SETFOREGROUND or

MB_TOPMOST or

MB_SYSTEMMODAL

like image 58
cristiano Avatar answered Sep 20 '22 18:09

cristiano