While a process is running on one hand I'd like to open a dialog box that'll display something that is moving to show the user that the program haven't crash... The timer works fine if I initialize my dialog as modal but when I open it as modeless, SetTimer returns TRUE since it works, but never calls the OnTimer method... Someone got an idea? Thanks.
main(){
myDlg dlg;
dlg.create(myDlg::IDD);
//big process that takes time
dlg.destroy();
}
class myDlg : public CDialog {
...
BOOL myDlg::OnInitDialog(){
CDialog::OnInitDialog();
SetTimer(1, 1000, NULL); // SetTimer returns TRUE...
return TRUE;
}
void myDlg::OnTimer(UINT nIDEvent){
if (nIDEvent == 1){
MessageBox("it works"
}
CDialog::OnTimer(nIDEvent);
}
}
main(){
myDlg dlg;
dlg.create(myDlg::IDD);
//big process that takes time
dlg.destroy();
}
class myDlg : public CDialog {
...
BOOL myDlg::OnInitDialog(){
CDialog::OnInitDialog();
SetTimer(1, 1000, NULL); // SetTimer returns TRUE...
return TRUE;
}
void myDlg::OnTimer(UINT nIDEvent){
if (nIDEvent == 1){
MessageBox("it works"
}
CDialog::OnTimer(nIDEvent);
}
}