Hi!
I'm having some trouble with creating a timer (for the 1st time) for my win32 dialog app. I tried to call SetTimer() from the dialog procedure, and created a Timer procedure for it. But it didn't work. The breakpoint inside TimerProc() never got hit. What i'm doing wrong, please?
Code:INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDMAINDLG), hWnd, reinterpret_cast<DLGPROC>(DlgProc)); ............... ............... } LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { ............... ............... SetTimer(hWndDlg,IDTIMER1,1000,(TIMERPROC)TimerProc); } VOID CALLBACK TimerProc(HWND hwnd,UINT uMsg, UINT_PTR idEvent,DWORD dwTime){ ............... ............... }



LinkBack URL
About LinkBacks


