#include <MenuBar.h>
Inheritance diagram for CMenuBarButton:
Public Member Functions | |
CMenuBarButton () | |
void | DrawButton (CDC *pDC) |
bool | HitTest (CPoint pt) const |
void | SetMDIChild (HWND hWndMDIChild) |
void | SetMenuBarRect (LPCRECT lpRect) |
bool | HideButton (bool bHide) |
bool | PushButton (bool bPush) |
bool | IsPushed () const |
virtual CRect | GetButtonRect () const =0 |
virtual UINT | GetSysCommandID () const =0 |
virtual bool | IsEnabled () const |
virtual bool | IsVisible () const |
CMenuBarButton () | |
virtual | ~CMenuBarButton () |
void | DrawButton (CDC *pDC, bool bFrameActive) |
bool | HitTest (CPoint pt) const |
void | SetMDIChild (HWND hWndMDIChild) |
void | SetMenuBarRect (LPCRECT lpRect) |
void | SetTheme (HTHEME hTheme) |
bool | HideButton (bool bHide) |
bool | PushButton (bool bPush) |
bool | IsPushed () const |
virtual CRect | GetButtonRect () const =0 |
virtual UINT | GetSysCommandID () const =0 |
virtual bool | IsEnabled () const |
virtual bool | IsVisible () const |
Static Public Member Functions | |
static CSize | GetButtonSize () |
static CSize | GetButtonSize () |
Protected Member Functions | |
DWORD | GetMDIChildStyle () const |
DWORD | GetMDIChildStyle () const |
Protected Attributes | |
HWND | m_hWndMDIChild |
CRect | m_rcMenuBar |
bool | m_bHidden |
bool | m_bPushed |
HTHEME | m_hTheme |
Definition at line 36 of file MenuBar.h.
CMenuBarButton::CMenuBarButton | ( | ) |
Definition at line 31 of file MenuBar.cpp.
References m_bHidden, m_bPushed, SetMDIChild(), and SetMenuBarRect().
CMenuBarButton::CMenuBarButton | ( | ) |
CMenuBarButton::~CMenuBarButton | ( | ) | [virtual] |
Definition at line 48 of file MenuBar.cpp.
void CMenuBarButton::DrawButton | ( | CDC * | pDC, | |
bool | bFrameActive | |||
) |
Definition at line 146 of file MenuBar.cpp.
References ASSERT, CBS_DISABLED, CBS_NORMAL, CBS_PUSHED, DrawThemeBackgroundXP(), GetButtonRect(), GetSysCommandID(), IsEnabled(), IsPushed(), IsVisible(), m_hTheme, MINBS_DISABLED, MINBS_NORMAL, MINBS_PUSHED, RBS_DISABLED, RBS_NORMAL, RBS_PUSHED, VERIFY, WP_MDICLOSEBUTTON, WP_MDIMINBUTTON, and WP_MDIRESTOREBUTTON.
void CMenuBarButton::DrawButton | ( | CDC * | pDC | ) |
Definition at line 106 of file MenuBar.cpp.
References ASSERT, GetButtonRect(), GetSysCommandID(), IsEnabled(), IsPushed(), IsVisible(), and VERIFY.
virtual CRect CMenuBarButton::GetButtonRect | ( | ) | const [pure virtual] |
Implemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonClose, CMenuBarButtonMin, CMenuBarButtonMax, and CMenuBarButtonClose.
virtual CRect CMenuBarButton::GetButtonRect | ( | ) | const [pure virtual] |
Implemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonClose, CMenuBarButtonMin, CMenuBarButtonMax, and CMenuBarButtonClose.
Referenced by DrawButton(), and HitTest().
static CSize CMenuBarButton::GetButtonSize | ( | ) | [static] |
CSize CMenuBarButton::GetButtonSize | ( | ) | [static] |
Definition at line 96 of file MenuBar.cpp.
References CWinAppEx::GetInstance(), CWinAppEx::GetNonClientMetrics(), and info.
Referenced by CMenuBarButtonClose::GetButtonRect(), CMenuBarButtonMax::GetButtonRect(), CMenuBarButtonMin::GetButtonRect(), CMenuBar::OnCustomDraw(), CMenuBar::RepositionSysButtons(), and CMenuBar::UpdateMenuBar().
DWORD CMenuBarButton::GetMDIChildStyle | ( | ) | const [protected] |
DWORD CMenuBarButton::GetMDIChildStyle | ( | ) | const [protected] |
Definition at line 62 of file MenuBar.cpp.
References m_hWndMDIChild.
Referenced by CMenuBarButtonMax::IsEnabled(), CMenuBarButtonMin::IsEnabled(), CMenuBarButtonMax::IsVisible(), CMenuBarButtonMin::IsVisible(), and IsVisible().
virtual UINT CMenuBarButton::GetSysCommandID | ( | ) | const [pure virtual] |
Implemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonClose, CMenuBarButtonMin, CMenuBarButtonMax, and CMenuBarButtonClose.
virtual UINT CMenuBarButton::GetSysCommandID | ( | ) | const [pure virtual] |
Implemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonClose, CMenuBarButtonMin, CMenuBarButtonMax, and CMenuBarButtonClose.
Referenced by DrawButton().
bool CMenuBarButton::HideButton | ( | bool | bHide | ) |
bool CMenuBarButton::HideButton | ( | bool | bHide | ) |
bool CMenuBarButton::HitTest | ( | CPoint | pt | ) | const |
bool CMenuBarButton::HitTest | ( | CPoint | pt | ) | const |
virtual bool CMenuBarButton::IsEnabled | ( | ) | const [virtual] |
Reimplemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonMin, and CMenuBarButtonMax.
bool CMenuBarButton::IsEnabled | ( | ) | const [virtual] |
Reimplemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonMin, and CMenuBarButtonMax.
Definition at line 67 of file MenuBar.cpp.
Referenced by DrawButton().
bool CMenuBarButton::IsPushed | ( | ) | const |
bool CMenuBarButton::IsPushed | ( | ) | const |
virtual bool CMenuBarButton::IsVisible | ( | ) | const [virtual] |
Reimplemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonMin, and CMenuBarButtonMax.
bool CMenuBarButton::IsVisible | ( | ) | const [virtual] |
Reimplemented in CMenuBarButtonMin, CMenuBarButtonMax, CMenuBarButtonMin, and CMenuBarButtonMax.
Definition at line 72 of file MenuBar.cpp.
References GetMDIChildStyle(), m_bHidden, and m_hWndMDIChild.
Referenced by DrawButton(), HitTest(), CMenuBarButtonMax::IsVisible(), and CMenuBarButtonMin::IsVisible().
bool CMenuBarButton::PushButton | ( | bool | bPush | ) |
bool CMenuBarButton::PushButton | ( | bool | bPush | ) |
void CMenuBarButton::SetMDIChild | ( | HWND | hWndMDIChild | ) |
void CMenuBarButton::SetMDIChild | ( | HWND | hWndMDIChild | ) |
Definition at line 45 of file MenuBar.cpp.
References m_hWndMDIChild.
Referenced by CMenuBarButton().
void CMenuBarButton::SetMenuBarRect | ( | LPCRECT | lpRect | ) |
void CMenuBarButton::SetMenuBarRect | ( | LPCRECT | lpRect | ) |
void CMenuBarButton::SetTheme | ( | HTHEME | hTheme | ) |
bool CMenuBarButton::m_bHidden [protected] |
Definition at line 69 of file MenuBar.h.
Referenced by CMenuBarButton(), HideButton(), and IsVisible().
bool CMenuBarButton::m_bPushed [protected] |
Definition at line 70 of file MenuBar.h.
Referenced by CMenuBarButton(), IsPushed(), and PushButton().
HTHEME CMenuBarButton::m_hTheme [protected] |
HWND CMenuBarButton::m_hWndMDIChild [protected] |
Definition at line 67 of file MenuBar.h.
Referenced by GetMDIChildStyle(), CMenuBarButtonMax::GetSysCommandID(), CMenuBarButtonMin::GetSysCommandID(), IsVisible(), and SetMDIChild().
CRect CMenuBarButton::m_rcMenuBar [protected] |
Definition at line 68 of file MenuBar.h.
Referenced by CMenuBarButtonClose::GetButtonRect(), CMenuBarButtonMax::GetButtonRect(), CMenuBarButtonMin::GetButtonRect(), and SetMenuBarRect().