Solved

MessageBox with Autoclose ?

Posted on 1998-02-21
1
1,403 Views
Last Modified: 2013-11-20
VC++ 4.0, WIN95:

Using AfxMessageBox for User-Info.
How can I close the Box after a certain time period without user confirmation and without suspending the application while the Box is displayed ?

Example:
1. MESSAGEBOX: "...under initialize..."
2. device is initializing while user reads info
3. initialization finished (about 3 sec.), box dissapears
4. user can start operating

Hope 20 pts. are enough...no more available =:(

Best regards

-Stavi-
0
Comment
Question by:mitrakis
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 20 total points
ID: 1316463
You can't do it with an AfxMessageBox as these are modal.  Modal dialog boxes block the parent window while they are displayed.  In order to do what you want, you need to create a non-modal dialog box.  Create and then display it.  After you are finished having it display, send it a WM_CLOSE message or call it's EndDialog() member function.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question