-
December 23rd, 2003, 08:30 PM
#1
Close Application During Certain Time
Can anyone give me a portion of code relating to this situation:
I want my Application To open for 1000 miliseconds ...and then it close automitically after 1000 milis...sort of a splash window for ur infor
For my current understanding WaitForSingleObject has been used together with GetExitCodeProcess....
Can someone give me a portion of code pls...starting from obtaining a handle for my application to closing my app after 1000 milis .Thx
-
December 23rd, 2003, 08:57 PM
#2
One solution is a timer.
Kuphryn
-
December 23rd, 2003, 09:00 PM
#3
SendMessage WM_CLOSE whenever you want to close your application.
Quang
-
December 24th, 2003, 08:04 AM
#4
Well...I am not sure whether I understood completely...but if you want to shor your application only for one second...add the following to your dialog...
Code:
BOOL CMyDlg::OnInitDialog()
{
...
if(!SetTimer(100, 1000, 0))
EndDialog(IDCANCEL);
return TRUE;
}
void CMyDlg::OnTimer(UINT nIDEvent)
{
if(nIDEvent == 100)
{
// Kill timer
KillTimer(100);
EndDialog(IDOK);
return;
}
CDialog::OnTimer(nIDEvent);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|