CodePudding user response:
Put the sentence deleted, CDocument: : OnTimer (UINT nIDEvent);CodePudding user response:
Is not recommended to study vc6.0,CodePudding user response:
Deleted after compilation or hint that mistakeCodePudding user response:
News to window class response, no news ring the window classCodePudding user response:
Time is only for the window class,CodePudding user response:
Fyi:# pragma comment (lib, "user32")
#include
#include
#include
#include
Char datestr [16].
Char timestr [16].
Char MSS [4].
Void the log (char * s) {
* struct tm now;
Struct timeb TB;
Ftime (& amp; TB);
Now=localtime (& amp; TB. Time);
Sprintf (datestr, "% d % % 4 d - 02-02 d", now - & gt; Tm_year + 1900, now - & gt; Tm_mon + 1, now - & gt; Tm_mday);
Sprintf (timestr, "02 02 02 % d: % d: % d", now - & gt; Tm_hour, now - & gt; Tm_min, now - & gt; Tm_sec);
Sprintf (MSS, "% 3 d", TB. Millitm);
Printf (" % s % s. % s % s ", datestr, timestr, MSS, s);
}
VOID CALLBACK myTimerProc1 (
HWND HWND,//handle of the window for the timer messages
UINT uMsg,//WM_TIMER message
UINT idEvent,//timer identifier
DWORD dwTime//the current system time
) {
The log (" In myTimerProc1 \ n ");
}
VOID CALLBACK myTimerProc2 (
HWND HWND,//handle of the window for the timer messages
UINT uMsg,//WM_TIMER message
UINT idEvent,//timer identifier
DWORD dwTime//the current system time
) {
The log (" In myTimerProc2 \ n ");
}
Int main () {
int i;
MSG MSG.
SetTimer (NULL, 0, 0100 myTimerProc1);
SetTimer (NULL, 0, 0200 myTimerProc2);
For (I=0; i<20; I++) {
Sleep(500);
The log (In the main "\ n");
If (GetMessage (& amp; MSG, NULL, 0, 0)) {
TranslateMessage (& amp; MSG);
DispatchMessage (& amp; MSG);
}
}
return 0;
}
//the 2012-07-26 17:29:06. 375 In the main
//the 2012-07-26 17:29:06. 875 In myTimerProc1
//the 2012-07-26 17:29:07. 375 In the main
//the 2012-07-26 17:29:07. 875 In myTimerProc2
//the 2012-07-26 17:29:08. 375 In the main
//the 2012-07-26 17:29:08. 375 In myTimerProc1
//the 2012-07-26 17:29:08. 875 In the main
//the 2012-07-26 17:29:08. 875 In myTimerProc1
//the 2012-07-26 17:29:09. 375 In the main
//the 2012-07-26 17:29:09. 890 In myTimerProc2
//the 2012-07-26 17:29:10. 390 In the main
//the 2012-07-26 17:29:10. 390 In myTimerProc1
//the 2012-07-26 17:29:10. 890 In the main
//the 2012-07-26 17:29:10. 890 In myTimerProc1
//the 2012-07-26 17:29:11. 390 In the main
//the 2012-07-26 17:29:11. 890 In myTimerProc2
//the 2012-07-26 17:29:12. 390 In the main
//the 2012-07-26 17:29:12. 390 In myTimerProc1
//the 2012-07-26 17:29:12. 890 In the main
//the 2012-07-26 17:29:12. 890 In myTimerProc1
//the 2012-07-26 17:29:13. 390 In the main
//the 2012-07-26 17:29:13. 890 In myTimerProc2
//the 2012-07-26 17:29:14. 390 In the main
//the 2012-07-26 17:29:14. 390 In myTimerProc1
//the 2012-07-26 17:29:14. 890 In the main
//the 2012-07-26 17:29:14. 890 In myTimerProc1
//the 2012-07-26 17:29:15. 390 In the main
//the 2012-07-26 17:29:15. 890 In myTimerProc2
//the 2012-07-26 17:29:16. 390 In the main
//the 2012-07-26 17:29:16. 390 In myTimerProc1
//the 2012-07-26 17:29:16. 890 In the main
//the 2012-07-26 17:29:16. 890 In myTimerProc1
//the 2012-07-26 17:29:17. 390 In the main
//the 2012-07-26 17:29:17. 890 In myTimerProc2
//the 2012-07-26 17:29:18. 390 In the main
//the 2012-07-26 17:29:18. 390 In myTimerProc1
//the 2012-07-26 17:29:18. 890 In the main
//the 2012-07-26 17:29:18. 890 In myTimerProc1
//the 2012-07-26 17:29:19. 390 In the main
//the 2012-07-26 17:29:19. 890 In myTimerProc2
CodePudding user response:
If you add wrong with class wizard to add some news find added WM_TIMER message