lsvedin
October 29th, 2004, 11:37 AM
I have a worker thread that needs a timer, but since it's not associated with a window, I can't use the CWnd::OnTimer routine. How do I go about setting up a timer within the worker thread?
|
Click to See Complete Forum and Search --> : Worker Thread and Timer lsvedin October 29th, 2004, 11:37 AM I have a worker thread that needs a timer, but since it's not associated with a window, I can't use the CWnd::OnTimer routine. How do I go about setting up a timer within the worker thread? cilu October 29th, 2004, 11:53 AM Yesm you can. Set the window parameter to NULL and provide a callback function to handle the message. VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime ); Take a look in MSDN at SetTimer. lsvedin October 29th, 2004, 12:01 PM Cilu, you are a genius!!!!!!!! Thanks. Andreas Masur October 30th, 2004, 11:37 AM [ Moved thread ] codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |