IHateMyJob2004
Lifer
Does anyone know how to do timers in either MFC (preferred) or STL when you are not using them with graphics objecects like CDialog or CFrame?
I jsut want to use a CWnd object since that has CWnd::SetTimer(). I did all the code 100% perfectly. From what I understand i need to call CWnd::Create() in order to get an HWND pointer initialized within CWnd but I couldn't figure it out.
Here is the thing. I want to encapsulate a callback method within a class. Preferably use the OnTimer() method in conjunction with SetTimer() but I can not figure it out.
Also, I do not want a C style function. And I do not want a static method in C++.
So, what am I to do? All I want is for the OS to regularly call a method (typically referred to as a callback method) ever 500 ms. I want this method to be non-static and defined as part of a method within a class (no C style functions).
EDIT:
A good google search (finally):
http://www.google.com/search?h...hod&btnG=Google+Search
I jsut want to use a CWnd object since that has CWnd::SetTimer(). I did all the code 100% perfectly. From what I understand i need to call CWnd::Create() in order to get an HWND pointer initialized within CWnd but I couldn't figure it out.
Here is the thing. I want to encapsulate a callback method within a class. Preferably use the OnTimer() method in conjunction with SetTimer() but I can not figure it out.
Also, I do not want a C style function. And I do not want a static method in C++.
So, what am I to do? All I want is for the OS to regularly call a method (typically referred to as a callback method) ever 500 ms. I want this method to be non-static and defined as part of a method within a class (no C style functions).
EDIT:
A good google search (finally):
http://www.google.com/search?h...hod&btnG=Google+Search