Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanted to create a warning pop-up box instead of a blocking pop.

It means when the pop-up dialog comes i should be still able to click on other controls but in my scenario i have to click OK button than only the pop-up window will go away and am able to click on other controls but i don't want that.

Even though pop-up is existing i should be able to click on other sides of windows.

Can anyone help me in this issue?

Regards,

What I have tried:

In my code i have directly used AfxMessageBox("Some String). When i click on some button it will directly come to this method and it calls internally windows api's. But this api gives me blocking pop-up window it won't allow me to click anywhere until i press Ok button in the pop-up window.
Posted
Updated 31-Jul-18 11:25am

1 solution

What you are looking for is called a modeless (or non-modal) dialog box.

You have to create a dialog box template for those like for normal (modal) dialog boxes. But instead of using DoModal() you have to use Create() and ShowWindow().

There are also more things to observe with modeless dialogs; especially where the instance is stored and usually to avoid multiple instances to be created.

A rather old but still valid link: Tutorial - Modeless Dialogs with MFC[^]-
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900