bool VDUIJobLogDialog::OnLoaded() { IVDLogWindowControl *pLogWin = VDGetILogWindowControl(GetDlgItem(mhdlg, IDC_LOG)); for(VDAutoLogger::tEntries::const_iterator it(mLogEnts.begin()), itEnd(mLogEnts.end()); it!=itEnd; ++it) { const VDAutoLogger::Entry& ent = *it; pLogWin->AddEntry(ent.severity, ent.text); } return VDDialogFrameW32::OnLoaded(); }
static INT_PTR CALLBACK LogDlgProc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: VDGetILogWindowControl(GetDlgItem(hdlg, IDC_LOG))->AttachAsLogger(false); g_hwndLogWindow = hdlg; VDSetDialogDefaultIcons(hdlg); case WM_SIZE: { RECT r; GetClientRect(hdlg, &r); SetWindowPos(GetDlgItem(hdlg, IDC_LOG), NULL, 0, 0, r.right, r.bottom, SWP_NOZORDER|SWP_NOACTIVATE); } return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDCANCEL) EndDialog(hdlg, 0); return TRUE; } return FALSE; }
INT_PTR CALLBACK VDAutoLogDisplay::DlgProc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: { const VDAutoLogger::tEntries& ents = *(VDAutoLogger::tEntries *)lParam; IVDLogWindowControl *pLogWin = VDGetILogWindowControl(GetDlgItem(hdlg, IDC_LOG)); for(VDAutoLogger::tEntries::const_iterator it(ents.begin()), itEnd(ents.end()); it!=itEnd; ++it) { const VDAutoLogger::Entry& ent = *it; pLogWin->AddEntry(ent.severity, ent.text); } } return TRUE; case WM_COMMAND: switch(LOWORD(wParam)) { case IDOK: case IDCANCEL: EndDialog(hdlg, 0); return TRUE; } break; } return FALSE; }