WTL Controls
Back to the WTL Controls Home Page.
StatusBarPlus.h
Go to the documentation of this file.
1 #pragma once
2 #include "stdafx.h"
3 //--------------------------------------------------------------------------------------
4 //--------------------------------------------------------------------------------------
5 //
6 //
7 // WTL Control Library
8 // by
9 // Bright Ideas Software®
10 // Copyright © 2018 by Bright Ideas Software.
11 //
12 //
13 //
14 //--------------------------------------------------------------------------------------
15 //--------------------------------------------------------------------------------------
16 
17 namespace BIS_WTL_CONTROLS
18 {
19 
76  class CStatusBarPlus : public CMultiPaneStatusBarCtrl
77  {
78  public:
79 
81  DECLARE_WND_SUPERCLASS(_T("CStatusBarPlus"), CMultiPaneStatusBarCtrl::GetWndClassName())
83 
84  CStatusBarPlus() noexcept;
85  virtual ~CStatusBarPlus();
86 
87 
88  virtual BOOL SubclassStatusBar(HWND hFrameWnd, UINT ProgressBarCtlID, UINT style_flags = 0);
89  virtual void UnSubclassStatusBar();
90 
91 
92  CProgressBarCtrl& ProgressBar();
93 
94  BOOL SetPaneStyle(int pane_index, UINT flags);
95 
96  void SetProgressBarMargin(int margin);
97  int GetProgressBarMargin() const;
98 
99  void SetProgressBarPane(int pane_index);
100  int GetProgressBarPane() const;
101 
102 
103 
104  protected:
105 
106  CProgressBarCtrl m_ProgressBar;
109 
110  private:
111 
112  LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
113 
114  BEGIN_MSG_MAP(CStatusBarPlus)
115  MESSAGE_HANDLER(WM_SIZE, OnSize)
116  CHAIN_MSG_MAP(CMultiPaneStatusBarCtrl)
117  END_MSG_MAP()
118 
119  };
120 
121 }
122 
int GetProgressBarPane() const
Default : 2.
void SetProgressBarPane(int pane_index)
Select the pane to contain the embedded CProgressBarCtrl.
virtual BOOL SubclassStatusBar(HWND hFrameWnd, UINT ProgressBarCtlID, UINT style_flags=0)
SubclassStatusBar subclasses a pre-existing status bar and creates a default 3 panes with a progress ...
A CMultiPaneStatusBarCtrl descendant with a child CProgressBarCtrl that can be embedded in a user-sel...
Definition: StatusBarPlus.h:76
BOOL SetPaneStyle(int pane_index, UINT flags)
Valid style flags are 0 (sunken - no longer works on Win10), SBT_NOBORDERS, SBT_OWNERDRAW, SBT_POPOUT, SBT_RTLREADING and SBT_NOTABPARSING. Specify only one per pane; see the MSDN documentation for the SB_SETTEXT message for more detail.
CProgressBarCtrl & ProgressBar()
Returns a reference to the embedded CProgressBarCtrl.
virtual void UnSubclassStatusBar()
Release the status bar and destroy the embedded progress bar control.
int GetProgressBarMargin() const
Default : 2.
void SetProgressBarMargin(int margin)
Defines the margin around the embedded CProgressBarCtrl, within the pane client area. Make sure not to make this value too big.