Scope
LogView.h
1 #pragma once
2 
3 #include "controllers/ScopeLogger.h"
4 #include "resource.h"
5 
6 namespace scope {
7  namespace gui {
8 
10 typedef CWinTraits<WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_SAVESEL, 0> CLogViewTraits;
11 
13 class CLogView
14  : public CWindowImpl<CLogView, CRichEditCtrl, CLogViewTraits>
15  , public CRichEditCommands<CLogView> {
16 
17 protected:
20 
21 public:
22  DECLARE_WND_SUPERCLASS(NULL, CRichEditCtrl::GetWndClassName())
23 
24  BEGIN_MSG_MAP(CLogView)
25  MSG_WM_CREATE(OnCreate)
26  MESSAGE_HANDLER(WM_CHAR, OnChar)
27  CHAIN_MSG_MAP_ALT(CRichEditCommands<CLogView>, 1)
28  END_MSG_MAP()
29 
32  BOOL PreTranslateMessage(MSG* pMsg);
33  int OnCreate(LPCREATESTRUCT lpCreateStruct);
34  LRESULT OnChar(UINT uMsg, WPARAM wParam,LPARAM lParam, BOOL& bHandled);
38  BOOL SaveFile(LPTSTR lpstrFilePath);
39 
41  static DWORD CALLBACK StreamWriteCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG FAR *pcb);
42 };
43 
44 }}
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...
Definition: LogView.h:10
scope::ScopeLogger scope_logger
our ScopeLogger here
Definition: LogView.h:19
View class for the log.
Definition: LogView.h:13
A logger class to log various messages and user comments.
Definition: ScopeLogger.h:24
BOOL SaveFile(LPTSTR lpstrFilePath)
Saves the logwindow text into a file.
Definition: LogView.cpp:36
static DWORD CALLBACK StreamWriteCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG FAR *pcb)
Callback for actual writing to disk.
Definition: LogView.cpp:54