Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer in a non-CWnd class

Status
Not open for further replies.

d00ape

Programmer
Apr 2, 2003
171
0
0
SE
I have created a generic class (not derived from CWnd).
When I call one function in that class I like it to generate a call to another member function of the same class. Tips on how to accomplish that?

Thanks / Anders
 
What do you mean "generate"?
Can't you simply call that another member?
Where here is about the timer?
 
OOpppps... Sory meant:

When I call one function in that class I like it to generate a call to another member function of the same class after 5 seconds. (Can't use Sleep(5000))
 
You must process somewhere your application message queue. Do you? Read something about that stuff regarding GetMessage(), PeekMessage(), TranslateMessage(&msg) and DispatchMessage(). Then SetTimer() and wait for the message WM_TIMER.
 
Or CreateThread() and Sleep(5000) in that thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top