Solved

Create a message Box with no buttons and then kill it later

Posted on 2003-10-24
1
229 Views
Last Modified: 2013-11-20
I want to create a messagebox, but without any buttons.
Then after a specified time I want to close or kill the messagebox.
0
Comment
Question by:Maritimer
1 Comment
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 25 total points
ID: 9616347
Create your own dialog with a static control to display your text.  In the OnInitDlg set a timer going.  In the OnTimer KillTimer to destroy timer and then OnCancel() to kill the dialog.
To prevent the user killing the dlg with the Enter/Esc keys you can override the OnOk and OnCancel as follows
CMessageDlg::OnOK() //OnCancel
{
}

In that case call the CDialog::OnCancel() in your timer.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

839 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