saidi
asked on
using a timer in a CWinThread base class
I will use a timer in my methode but my base class of my class is CWinThread and i can not use SetTimer()
and Event timer handling function OnTimer, can you write me a solution.
thank you
i have a code fragment like this code:
i use MFC and implement in visual c++ 5.0.
class A public:CWinthread
A::Run(){
setTimer(1,1000,NULL); <--------- ilegal base class is not CWnd
while(!timerEvent)
{
do anything}
killTimer(1); <--------- ilegal base class is not CWnd
void A::Ontimer(UINT nIDEvent){ <--------- CWinThread has not a timer event handler what is alternate solution.
if(nIDEvent==1)
timerEvent=true;
}
and Event timer handling function OnTimer, can you write me a solution.
thank you
i have a code fragment like this code:
i use MFC and implement in visual c++ 5.0.
class A public:CWinthread
A::Run(){
setTimer(1,1000,NULL); <--------- ilegal base class is not CWnd
while(!timerEvent)
{
do anything}
killTimer(1); <--------- ilegal base class is not CWnd
void A::Ontimer(UINT nIDEvent){ <--------- CWinThread has not a timer event handler what is alternate solution.
if(nIDEvent==1)
timerEvent=true;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.