FLImaging 6.5.8.1
GUICheckBox.h
1#pragma once
2
11#include <afxwin.h>
12#include "GUIWndCtrlBase.h"
13
15namespace FLImaging
16{
18 namespace GUI
19 {
27 class FL_EXPORT CGUICheckBox : public CButton, public CGUIWndCtrlBase
28 {
29 public:
37
44 virtual ~CGUICheckBox();
45
54 virtual void SetCheckColor(COLORREF clrCheckColorDefault);
55
64 virtual COLORREF GetCheckColor()const;
65
74 void SetCheck(bool bCheck);
75
84 bool GetCheck()const;
85
94 virtual void SetEnable(bool bEnable);
95
104 virtual bool IsEnabled()const;
105
106 DECLARE_MESSAGE_MAP()
107 afx_msg BOOL OnBnClicked();
108 afx_msg void OnSetFocus(CWnd* pOldWnd);
109 afx_msg void OnKillFocus(CWnd* pNewWnd);
110 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
111 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
112 virtual void PreSubclassWindow();
113
114 protected:
115 virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) override;
116 virtual void DrawButton(CDC* pDC, const CRect& rect, const int32_t& i32CheckBoxMargin, const int32_t& i32CheckBoxSize);
117 virtual void DrawText(CDC* pDC, const CRect& rect, const int32_t& i32CheckBoxSize);
118 virtual void DrawRectangleBorder(CDC* pDC, const CRect& rect, COLORREF clr)override;
119
120 protected:
121 UINT m_u32Style;
122 UINT m_u32CheckState;
123 COLORREF m_clrCheckBox;
124 COLORREF m_clrCheck;
125 Gdiplus::Color m_crCheck;
126 bool m_bEnable;
127
128 COLORREF m_clrCheckDefault;
129 };
130 }
131}
CheckBox class.
Definition GUICheckBox.h:28
virtual COLORREF GetCheckColor() const
Get the color of check.
CGUICheckBox()
Default constructor.
virtual void SetEnable(bool bEnable)
Function to specify whether button window is enabled.
virtual ~CGUICheckBox()
Default destructor.
void SetCheck(bool bCheck)
Specify the check status.
virtual void SetCheckColor(COLORREF clrCheckColorDefault)
Set the color of check.
bool GetCheck() const
Function that returns whether the check box is checked.
virtual bool IsEnabled() const
Gets whether the button window is enabled or not.