Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UINT_PTR uTimerId = SetTimer(NULL, 0, 2000, NULL);
- TRACE(_T("Timer created - ID=%xn"), uTimerId);
- BOOL CMyFunkyApp::PreTranslateMessage(MSG* pMsg)
- {
- if (pMsg->message == WM_TIMER)
- {
- TRACE(_T("Timer fired - ID=%xn"), pMsg->wParam);
- }
- return CWinApp::PreTranslateMessage(pMsg);
- }
- void CALLBACK TimerCallback(HWND, UINT, UINT_PTR id, DWORD dwTime)
- {
- TRACE(_T("Timer fired - ID=%xn"), id);
- }
- //...
- UINT_PTR uTimerId = SetTimer(NULL, 0, 2000, &TimerCallback);
- TRACE(_T("Timer created - ID=%xn"), uTimerId);
Add Comment
Please, Sign In to add comment