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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

settimer visual c++ 6.0

Status
Not open for further replies.

camurria

Programmer
Nov 9, 2006
2
IT
hi,
I must create a timer in dll-application in visual c++.
I do this:
UINT m_timerID;
m_timerID = SetTimer(NULL,0,(UINT)1,(TIMERPROC)OnTimer);

void CALLBACK OnTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
printf("ok\n");
} // OnTimer
but OnTimer not happened.
why?

Thanks
 
Uuum, don't much about this stuff, but will printf work under Windoze?

You might try a message box instead.
 
What you get is a WM_TIMER message which then calls OnTimer. If you don't have a message pump, nothing will happen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top