7 BOOL CLogView::PreTranslateMessage(MSG* pMsg) {
12 int CLogView::OnCreate(LPCREATESTRUCT lpCreateStruct) {
15 lf.lfWeight = FW_NORMAL;
17 SecureHelper::strcpy_x(lf.lfFaceName, LF_FACESIZE, L
"Calibri");
18 font.CreateFontIndirect(&lf);
22 return DefWindowProc();
25 LRESULT CLogView::OnChar(UINT uMsg, WPARAM wParam,LPARAM lParam, BOOL& bHandled) {
33 return DefWindowProc(uMsg, wParam, lParam);
37 _ASSERTE(lpstrFilePath != NULL);
39 HANDLE hFile = ::CreateFile(lpstrFilePath, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
40 if(hFile == INVALID_HANDLE_VALUE)
44 es.dwCookie = (DWORD)hFile;
47 StreamOut(SF_TEXT, es);
51 return !(BOOL)es.dwError;
55 _ASSERTE(dwCookie != 0);
56 _ASSERTE(pcb != NULL);
58 return !::WriteFile((HANDLE)dwCookie, pbBuff, cb, (LPDWORD)pcb, NULL);
void GetUserLoggings()
Gets the text in the logbook window and calls FlushLogbox.
scope::ScopeLogger scope_logger
our ScopeLogger here
This is the include file for standard system include files, or project specific include files that ar...
BOOL SaveFile(LPTSTR lpstrFilePath)
Saves the logwindow text into a file.
static DWORD CALLBACK StreamWriteCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG FAR *pcb)
Callback for actual writing to disk.