CMenuBarButton Class Reference

#include <MenuBar.h>

Inheritance diagram for CMenuBarButton:

CMenuBarButtonClose CMenuBarButtonClose CMenuBarButtonMax CMenuBarButtonMax CMenuBarButtonMin CMenuBarButtonMin List of all members.

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

Detailed Description

A CMenuBar helper class

Definition at line 36 of file MenuBar.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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  ) 

Definition at line 82 of file MenuBar.cpp.

References m_bHidden.

bool CMenuBarButton::HitTest ( CPoint  pt  )  const

bool CMenuBarButton::HitTest ( CPoint  pt  )  const

Definition at line 40 of file MenuBar.cpp.

References GetButtonRect(), and IsVisible().

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

Definition at line 77 of file MenuBar.cpp.

References m_bPushed.

Referenced by DrawButton().

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  ) 

Definition at line 89 of file MenuBar.cpp.

References m_bPushed.

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  ) 

Definition at line 50 of file MenuBar.cpp.

References m_rcMenuBar.

Referenced by CMenuBarButton().

void CMenuBarButton::SetTheme ( HTHEME  hTheme  ) 

Definition at line 74 of file MenuBar.cpp.

References m_hTheme.


Member Data Documentation

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]

Definition at line 74 of file MenuBar.h.

Referenced by DrawButton(), and SetTheme().

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:22:27 2006 for DT2005.panorama by  doxygen 1.4.7