CBegin dlg;
if(dlg.DoModal()!=IDCANCEL)
{
OnOK();
}
BOOL CBegin::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
SetTimer(1, 2000, NULL); //1:Specifies a nonzero timeridentifier
//2000:Specifies the time-out value, in milliseconds.
//NULL:Pointer to the function...if it's NULL, the system posts a WM_TIMER message to the application queue.
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CBegin::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
KillTimer(1); //1:the timer identifier
CDialog::OnCancel();
CDialog::OnTimer(nIDEvent);
}
原文链接: https://www.cnblogs.com/pythonschool/archive/2012/11/14/2770025.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/69372
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!