How to Install a Timer in an SDI application?
Hallo guys. I used to install a timer in a Dialog-Based application
and have no problems implementing it. Usually the Timer is installed
during OnInitDialog. Below is how i usually write the code in a Dialog
based application.
int iInstallTimer = SetTimer(1,500,NULL);
if(!iInstallTimer)
{
MessageBox("Unable to install a timer!"
;
OnOK();
}
However, when I try to add these lines of code into an SDI application
in the Document class OnNewDocument, It has errors when compiling.
It stated that:
i. SetTimer function does not takes 3 parameters.
ii. MessageBoxA does not takes 1 parameters;
iii. Undeclared identifier OnOK;
Thanks in advance for any guidance.
Hallo guys. I used to install a timer in a Dialog-Based application
and have no problems implementing it. Usually the Timer is installed
during OnInitDialog. Below is how i usually write the code in a Dialog
based application.
int iInstallTimer = SetTimer(1,500,NULL);
if(!iInstallTimer)
{
MessageBox("Unable to install a timer!"
OnOK();
}
However, when I try to add these lines of code into an SDI application
in the Document class OnNewDocument, It has errors when compiling.
It stated that:
i. SetTimer function does not takes 3 parameters.
ii. MessageBoxA does not takes 1 parameters;
iii. Undeclared identifier OnOK;
Thanks in advance for any guidance.