Scope
ScopeProgressCtrl.h
1 #pragma once
2 
3 #include "helpers/ScopeNumber.h"
4 #include "ScopeDefines.h" // to get WM_UPDATECONTROL
5 
6 namespace scope {
7  namespace gui {
8 
12  : public CWindowImpl<CScopeProgressCtrl, CProgressBarCtrl> {
13 
14 protected:
16  bool created;
17 
20 
22  boost::signals2::connection valueconnection;
23 
24 public:
25  public:
26  BEGIN_MSG_MAP_EX(CScopeProgressCtrl)
27  MESSAGE_HANDLER(WM_UPDATECONTROL, OnUpdateControl)
28  DEFAULT_REFLECTION_HANDLER()
29  END_MSG_MAP()
30 
33  CScopeProgressCtrl(ScopeNumber<double>* _scopenum);
34 
37 
39  BOOL AttachToDlgItem(HWND hWnd);
40 
44  LRESULT OnUpdateControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
45  // LRESULT OnUpdateValue(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); not needed, since we do OnScroll
51 
53 
An adapted CProgressBarCtrl control around a ScopeNumber.
bool created
true if window created
LRESULT OnUpdateControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Worker for UpdateControl.
ScopeNumber< double > *const scopenum
Pointer to the underlying ScopeNumber.
BOOL AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item and set range.
boost::signals2::connection valueconnection
The connection object for the control state (connection to the scopenum value change) ...