cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
H_Shigenaga
Level 3

How to display MessageBox in TOPMOST

Hi team,

We want to display the message "Are you sure you want to continue?" When uninstalling.

So I use the MessageBox function to send a message like this:

#define MB_TOPMOST 0x00040000L
#define MB_SETFOREGROUND 0x00010000L

...

szMsg = "Confirmation message.";

MessageBox (szMsg,  MB_TOPMOST|MB_ICONQUESTION|MB_SETFOREGROUND|MB_YESNO|MB_DEFBUTTON2);

...

Most of these work fine, but MB_TOPMOST may or may not work and is unstable.

Is there a way to make sure the MessageBox stays in the foreground?

 

Thanks for your support.

Labels (1)
0 Kudos
(0) Replies