3 #include "controllers/ScopeLogger.h"
10 typedef CWinTraits<WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_SAVESEL, 0>
CLogViewTraits;
14 :
public CWindowImpl<CLogView, CRichEditCtrl, CLogViewTraits>
15 ,
public CRichEditCommands<CLogView> {
22 DECLARE_WND_SUPERCLASS(NULL, CRichEditCtrl::GetWndClassName())
25 MSG_WM_CREATE(OnCreate)
26 MESSAGE_HANDLER(WM_CHAR, OnChar)
27 CHAIN_MSG_MAP_ALT(CRichEditCommands<
CLogView>, 1)
32 BOOL PreTranslateMessage(MSG* pMsg);
33 int OnCreate(LPCREATESTRUCT lpCreateStruct);
34 LRESULT OnChar(UINT uMsg, WPARAM wParam,LPARAM lParam, BOOL& bHandled);
41 static DWORD CALLBACK
StreamWriteCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG FAR *pcb);
CWinTraits< WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_VSCROLL|ES_AUTOVSCROLL|ES_MULTILINE|ES_NOHIDESEL|ES_SAVESEL, 0 > CLogViewTraits
Traits for this window are standard CControlWinTraits but without WS_HSCROLL => automatic word wrap...
scope::ScopeLogger scope_logger
our ScopeLogger here
A logger class to log various messages and user comments.
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.