|
|
| version 1.3, 2003/11/12 00:55:38 | version 1.8, 2004/01/22 01:10:05 |
|---|---|
| Line 38 extern HINSTANCE hPrev; | Line 38 extern HINSTANCE hPrev; |
| enum { | enum { |
| IDM_TRACEEN = 3300, | IDM_TRACEEN = 3300, |
| IDM_TRACEFH | IDM_TRACEFH, |
| IDM_TRACECL | |
| }; | }; |
| static const char ProgTitle[] = "console"; | static const char ProgTitle[] = "console"; |
| Line 46 static const char ClassName[] = "TRACE-c | Line 47 static const char ClassName[] = "TRACE-c |
| static const char ClassEdit[] = "EDIT"; | static const char ClassEdit[] = "EDIT"; |
| static const char traceen[] = "Enable"; | static const char traceen[] = "Enable"; |
| static const char tracefh[] = "File out"; | static const char tracefh[] = "File out"; |
| static const char tracecl[] = "Clear"; | |
| static const char crlf[] = "\r\n"; | static const char crlf[] = "\r\n"; |
| static TRACEWIN tracewin; | static TRACEWIN tracewin; |
| Line 72 static void View_ScrollToBottom(HWND hWn | Line 74 static void View_ScrollToBottom(HWND hWn |
| PostMessage(hWnd, EM_LINESCROLL, 0, MaxPos); | PostMessage(hWnd, EM_LINESCROLL, 0, MaxPos); |
| } | } |
| static void View_ClrString(void) { | |
| szView[0] = '\0'; | |
| SetWindowText(hView, szView); | |
| } | |
| static void View_AddString(const char *lpszString) { | static void View_AddString(const char *lpszString) { |
| int len, vlen; | int len, vlen; |
| Line 110 static LRESULT CALLBACK traceproc(HWND h | Line 118 static LRESULT CALLBACK traceproc(HWND h |
| IDM_TRACEEN, traceen); | IDM_TRACEEN, traceen); |
| InsertMenu(hmenu, 1, MF_BYPOSITION | MF_STRING, | InsertMenu(hmenu, 1, MF_BYPOSITION | MF_STRING, |
| IDM_TRACEFH, tracefh); | IDM_TRACEFH, tracefh); |
| InsertMenu(hmenu, 2, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); | InsertMenu(hmenu, 2, MF_BYPOSITION | MF_STRING, |
| IDM_TRACECL, tracecl); | |
| InsertMenu(hmenu, 3, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); | |
| CheckMenuItem(hmenu, IDM_TRACEEN, | CheckMenuItem(hmenu, IDM_TRACEEN, |
| (tracewin.en & 1)?MF_CHECKED:MF_UNCHECKED); | (tracewin.en & 1)?MF_CHECKED:MF_UNCHECKED); |
| Line 162 static LRESULT CALLBACK traceproc(HWND h | Line 172 static LRESULT CALLBACK traceproc(HWND h |
| MF_CHECKED:MF_UNCHECKED); | MF_CHECKED:MF_UNCHECKED); |
| break; | break; |
| case IDM_TRACECL: | |
| View_ClrString(); | |
| break; | |
| default: | default: |
| return(DefWindowProc(hWnd, msg, wp, lp)); | return(DefWindowProc(hWnd, msg, wp, lp)); |
| } | } |
| Line 250 void trace_init(void) { | Line 264 void trace_init(void) { |
| } | } |
| } | } |
| #if 1 | |
| tracewin.en = 1; | tracewin.en = 1; |
| tracewin.fh = FILEH_INVALID; | tracewin.fh = FILEH_INVALID; |
| #else | |
| tracewin.en = 0; | |
| tracewin.fh = file_create_c("out.txt"); | |
| #endif | |
| tracecfg.posx = CW_USEDEFAULT; | tracecfg.posx = CW_USEDEFAULT; |
| tracecfg.posy = CW_USEDEFAULT; | tracecfg.posy = CW_USEDEFAULT; |