• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

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

I want to create a messagebox, but without any buttons.
Then after a specified time I want to close or kill the messagebox.
0
Maritimer
Asked:
Maritimer
1 Solution
 
AndyAinscowCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now