39 DEBUG_INFO(
"DESTRUCTOR: CLogWndFrame: START\n");
41 DEBUG_INFO(
"DESTRUCTOR: CLogWndFrame: END\n");
62 if (CExTextFrame::OnCreate(lpCreateStruct) == -1)
return -1;
67 if (!toolBar->CreateEx(
this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
68 | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | WS_CLIPCHILDREN) ||
71 TRACE0(
"Failed to create toolbar\n");
76 toolBar->EnableDocking(CBRS_ALIGN_ANY);
77 EnableDocking(CBRS_ALIGN_ANY);
78 DockControlBar(toolBar);
88 char* mbstr =
ts2mbs((LPCTSTR)data);
89 size_t size = strlen(mbstr);
95 HGLOBAL hMem = ::GlobalAlloc(GHND, size+1);
96 char* pszptr = (
char*)::GlobalLock(hMem);
97 memcpy(pszptr, mbstr, size+1);
102 if (!OpenClipboard()) {
104 DEBUG_ERROR(
"CLogWndFrame::OnLogCopy(): ERROR: Clipboad open error!!\n");
107 if (!EmptyClipboard()) {
109 DEBUG_ERROR(
"CLogWndFrame::OnLogCopy(): ERROR: Clipboad empty error!!\n");
112 if (!::SetClipboardData(CF_TEXT, hMem)) {
114 DEBUG_ERROR(
"CLogWndFrame::OnLogCopy(): ERROR: Clipboad set error!!\n");
142 int ret = MessageBox(mesg, noti, MB_YESNO | MB_ICONQUESTION);
159 if (pdoc==NULL || pfrm==NULL || pviw==NULL)
return NULL;
168 pfrm->CExTextFrame::pDoc = (CDocument*) pdoc;
170 pviw->CExTextView::pDoc = (CDocument*) pdoc;
173 pfrm->ShowWindow(SW_SHOW);
175 pfrm->
pView->SetFocus();
177 if (!pfrm->
Title.IsEmpty()) {
CMultiDocTemplate * pTempl
CLogWndView * GetView(void)
CString easyGetSaveFileName(LPCTSTR title, HWND hWnd)
afx_msg void OnLogClear()
void SetTitle(LPCTSTR title)
CString getCopyData(void)
char * ts2mbs(LPCTSTR str)
CMessageBoxDLG * MessageBoxDLG(int ttl, int msg, CWnd *wnd=NULL)
CLogWndFrame * ExecLogWnd(CMultiDocTemplate *pDocTempl, LPCTSTR title, CAppCallBack *app)
#define IDS_STR_SPECIFY_SAVE_FILE
#define IDS_STR_ERR_WRITE_FILE
#define IDR_LOG_WND_TOOLBAR
#define IDS_STR_ASK_LOG_CLEAR