Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have created a Dialog box, It shows only a message (E.g - In progress....). There isn't any controls(Pushbutton etc) on that Dialog and am showing it using Domodal().

I want that Dialog to get closed without any user input. Since Domodal() requires any input from user. I am unable to close.

I am using VC++.

Please suggest, How to close that dialog.
Or is there any better way to achieve this.

Please suggest.

Thanks In advance
Posted
Comments
Sergey Alexandrovich Kryukov 26-Feb-13 0:25am    
Show some mercy to your user! Why?
—SA
Sergey Alexandrovich Kryukov 26-Feb-13 19:57pm    
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA

To close a modal dialog programmatically, you have to call its EndDialog() method, providing the exit code (which is the one returned by the DoModal() method).
 
Share this answer
 
Comments
Dalek Dave 22-Nov-10 7:29am    
Good Call.
Put a timer in the dialog and have it close itself on the timer tick
 
Share this answer
 
Why not use a Progress Bar[^] which allows you to provide useful information for your users? I don't use MFC so I'm not sure whether there is an MFC class for this but I'm sure Bing can find it for you.
 
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