24 typedef VOID (WINAPI* P_OutputDebugStringA)(LPCSTR lpOutputString);
25 typedef VOID (WINAPI* P_OutputDebugStringW)(LPCWSTR lpOutputString);
79 if ( DSD::s_pListDialog ==
this || DSD::s_pListDialog != NULL )
84 if ( DSD::s_pHookerA->Hook(NULL,
"OutputDebugStringA", ms_MyOutputDebugStringA) )
87 if ( DSD::s_pHookerW->Hook(NULL,
"OutputDebugStringW", ms_MyOutputDebugStringW) )
89 DSD::s_pListDialog =
this;
102 DSD::s_pListDialog = NULL;
103 if ( DSD::s_pHookerA != NULL )
105 DSD::s_pHookerA->Unhook();
106 delete DSD::s_pHookerA;
107 DSD::s_pHookerA = NULL;
109 if ( DSD::s_pHookerW != NULL )
111 DSD::s_pHookerW->Unhook();
112 delete DSD::s_pHookerW;
113 DSD::s_pHookerW = NULL;
122 static void ms_PumpMessage(
void)
124 HWND h = *DSD::s_pListDialog;
126 while ( ::PeekMessage(&msg, h, NULL, NULL, PM_NOREMOVE) )
128 if ( ::GetMessage(&msg, h, NULL, NULL) )
130 ::TranslateMessage(&msg);
131 ::DispatchMessage(&msg);
141 static VOID WINAPI ms_MyOutputDebugStringA(LPCSTR lpszOutputString)
143 if ( DSD::s_pListDialog != NULL )
145 DSD::s_pListDialog->PostString(
CStr(lpszOutputString));
148 (*DSD::s_pHookerA)()(lpszOutputString);
156 static VOID WINAPI ms_MyOutputDebugStringW(LPCWSTR lpszOutputString)
158 if ( DSD::s_pListDialog != NULL )
160 DSD::s_pListDialog->PostString(
CStr(lpszOutputString));
163 (*DSD::s_pHookerW)()(lpszOutputString);
virtual void OnCreate(void)
[通知] 作成完了通知.
virtual void OnDestroy(void)
[通知] 破棄通知.
CDebugStringDialog(void)
コンストラクタ
TNB::CStrT< TCHAR > CStr
文字列クラス