|
|
| version 1.1, 2003/10/16 17:58:44 | version 1.2, 2003/10/28 13:03:48 |
|---|---|
| Line 2 | Line 2 |
| #include <stdarg.h> | #include <stdarg.h> |
| #include "strres.h" | #include "strres.h" |
| #include "dosio.h" | #include "dosio.h" |
| // #define WRITE_INI | |
| #if defined(WRITE_INI) | |
| #include "ini.h" | #include "ini.h" |
| #endif | |
| #ifdef TRACE | #ifdef TRACE |
| Line 46 static HBRUSH hBrush = NULL; | Line 42 static HBRUSH hBrush = NULL; |
| static char szView[VIEW_BUFFERSIZE]; | static char szView[VIEW_BUFFERSIZE]; |
| static TRACECFG tracecfg; | static TRACECFG tracecfg; |
| #if defined(WRITE_INI) | static const char np2trace[] = "np2trace.ini"; |
| static const char inititle[] = "TRACE"; | static const char inititle[] = "TRACE"; |
| static const INITBL initbl[4] = { | static const INITBL initbl[4] = { |
| {str_posx, INITYPE_SINT32, &tracecfg.posx, 0}, | {"posx", INITYPE_SINT32, &tracecfg.posx, 0}, |
| {str_posy, INITYPE_SINT32, &tracecfg.posy, 0}, | {"posy", INITYPE_SINT32, &tracecfg.posy, 0}, |
| {str_width, INITYPE_SINT32, &tracecfg.width, 0}, | {"width", INITYPE_SINT32, &tracecfg.width, 0}, |
| {str_height, INITYPE_SINT32, &tracecfg.height, 0}}; | {"height", INITYPE_SINT32, &tracecfg.height, 0}}; |
| #endif | |
| static void View_ScrollToBottom(HWND hWnd) { | static void View_ScrollToBottom(HWND hWnd) { |
| Line 206 void trace_init(void) { | Line 201 void trace_init(void) { |
| tracecfg.posy = CW_USEDEFAULT; | tracecfg.posy = CW_USEDEFAULT; |
| tracecfg.width = CW_USEDEFAULT; | tracecfg.width = CW_USEDEFAULT; |
| tracecfg.height = CW_USEDEFAULT; | tracecfg.height = CW_USEDEFAULT; |
| #if defined(WRITE_INI) | ini_read(file_getcd(np2trace), inititle, initbl, 4); |
| ini_read(NULL, inititle, initbl, 4); | |
| #endif | |
| hWndConsole = CreateWindowEx(WS_EX_CONTROLPARENT, | hWndConsole = CreateWindowEx(WS_EX_CONTROLPARENT, |
| ClassName, ProgTitle, | ClassName, ProgTitle, |
| Line 228 void trace_term(void) { | Line 221 void trace_term(void) { |
| if (hWndConsole) { | if (hWndConsole) { |
| DestroyWindow(hWndConsole); | DestroyWindow(hWndConsole); |
| hWndConsole = NULL; | hWndConsole = NULL; |
| #if defined(WRITE_INI) | ini_write(file_getcd(np2trace), inititle, initbl, 4); |
| ini_write(NULL, inititle, initbl, 4); | |
| #endif | |
| } | } |
| } | } |