CWinAppEx Class Reference

#include <WinAppEx.h>

Inheritance diagram for CWinAppEx:

CApp CRobotControlApp List of all members.

Public Types

 osWin95
 osWin98
 osWinNT
 osWin2K
 osUnknown
 osWinXP
enum  EOs {
  osWin95, osWin98, osWinNT, osWin2K,
  osUnknown
}
enum  EOs {
  osWin95, osWin98, osWinNT, osWin2K,
  osWinXP, osUnknown
}

Public Member Functions

 CWinAppEx ()
 ~CWinAppEx ()
void UpdateSystemParameters ()
EOs GetOs () const
DWORD GetComCtlVersion () const
bool IsWin98_2K () const
bool IsWin2K () const
bool GetMenuAnimation () const
bool GetMenuUnderlines () const
bool GetMenuFade () const
const NONCLIENTMETRICS & GetNonClientMetrics () const
void LoadStdProfileSettings (UINT nMaxMRU=_AFX_MRU_COUNT)
void SetBitmappedMenus (bool bBitmappedMenus)
bool GetBitmappedMenus () const
void AddMenuIcon (CMapUIntToInt &mapIDToImage, UINT nBitmapID, COLORREF clrMask=RGB(255, 0, 255))
void AddMenuIcon (UINT nID, HICON hIcon)
void AddMenuIcon (UINT nID, LPCTSTR lpszFileName)
void ReplaceMenuIcon (UINT nID, HICON hIcon)
void RemoveMenuIcon (UINT nID)
void SetMenuIcons (CMenu *pMenu, bool bSubmenus=false)
CImageList * GetMenuImageList ()
int GetMenuImage (UINT nID) const
 CWinAppEx (LPCTSTR lpszAppName=0)
 ~CWinAppEx ()
void UpdateSystemParameters ()
EOs GetOs () const
bool IsWin50 () const
bool IsWinNT () const
bool IsWin2K () const
bool IsWinXP () const
bool GetMenuAnimation () const
bool GetMenuUnderlines () const
bool GetMenuFade () const
bool GetFlatMenu () const
const NONCLIENTMETRICS & GetNonClientMetrics () const
void LoadStdProfileSettings (UINT nMaxMRU=_AFX_MRU_COUNT)
void SetBitmappedMenus (bool bBitmappedMenus)
bool GetBitmappedMenus () const
void AddMenuIcon (CMapUIntToInt &mapIDToImage, UINT nBitmapID, COLORREF clrMask=RGB(255, 0, 255))
void AddMenuIcon (UINT nID, HICON hIcon)
void AddMenuIcon (UINT nID, LPCTSTR lpszFileName)
void ReplaceMenuIcon (UINT nID, HICON hIcon)
void RemoveMenuIcon (UINT nID)
void SetMenuIcons (CMenu *pMenu, bool bSubmenus=false)
CImageList * GetMenuImageList ()
int GetMenuImage (UINT nID) const

Static Public Member Functions

static CWinAppExGetInstance ()
static BOOL TrackPopupMenuEx (HMENU hMenu, UINT nFlags, int x, int y, CWnd *pWnd, LPTPMPARAMS lptpm=0)
static CWinAppExGetInstance ()
static BOOL TrackPopupMenuEx (HMENU hMenu, UINT nFlags, int x, int y, CWnd *pWnd, LPTPMPARAMS lptpm=0)

Protected Attributes

EOs m_eOs
DWORD m_dwComCtlVer
NONCLIENTMETRICS m_info
BOOL m_bMenuAnimation
BOOL m_bMenuUnderlines
BOOL m_bMenuFade
BOOL m_bUIEffects
bool m_bBitmappedMenus
CImageList m_imageList
CMapUIntToInt m_mapIDToImage
CMapIntToInt m_mapFileIcons
BOOL m_bFlatMenu

Private Member Functions

 DECLARE_DYNAMIC (CWinAppEx)
 DECLARE_DYNAMIC (CWinAppEx)

Detailed Description

an extended CWinApp class

Definition at line 34 of file WinAppEx.h.


Member Enumeration Documentation

enum CWinAppEx::EOs

Enumerator:
osWin95 
osWin98 
osWinNT 
osWin2K 
osWinXP 
osUnknown 

Definition at line 43 of file WinAppEx.h.

enum CWinAppEx::EOs

Enumerator:
osWin95 
osWin98 
osWinNT 
osWin2K 
osUnknown 

Definition at line 40 of file WinAppEx.h.


Constructor & Destructor Documentation

CWinAppEx::CWinAppEx (  ) 

Definition at line 32 of file WinAppEx.cpp.

References GetProcAddress(), and VERIFY.

CWinAppEx::~CWinAppEx (  ) 

Definition at line 101 of file WinAppEx.cpp.

CWinAppEx::CWinAppEx ( LPCTSTR  lpszAppName = 0  ) 

Definition at line 54 of file WinAppEx.cpp.

References VERIFY.

CWinAppEx::~CWinAppEx (  ) 


Member Function Documentation

void CWinAppEx::AddMenuIcon ( UINT  nID,
LPCTSTR  lpszFileName 
)

void CWinAppEx::AddMenuIcon ( UINT  nID,
HICON  hIcon 
)

void CWinAppEx::AddMenuIcon ( CMapUIntToInt mapIDToImage,
UINT  nBitmapID,
COLORREF  clrMask = RGB(255, 0, 255) 
)

void CWinAppEx::AddMenuIcon ( UINT  nID,
LPCTSTR  lpszFileName 
)

Definition at line 202 of file WinAppEx.cpp.

References ASSERT, GetMenuImageList(), m_mapFileIcons, m_mapIDToImage, and VERIFY.

void CWinAppEx::AddMenuIcon ( UINT  nID,
HICON  hIcon 
)

Definition at line 195 of file WinAppEx.cpp.

References ASSERT, GetMenuImageList(), and m_mapIDToImage.

void CWinAppEx::AddMenuIcon ( CMapUIntToInt mapIDToImage,
UINT  nBitmapID,
COLORREF  clrMask = RGB(255, 0, 255) 
)

Definition at line 179 of file WinAppEx.cpp.

References ASSERT, GetMenuImageList(), m_mapIDToImage, and VERIFY.

Referenced by CRobotControlMenu::init(), CFrame::OnCreate(), ReplaceMenuIcon(), and CRecentFileListEx::UpdateMenu().

CWinAppEx::DECLARE_DYNAMIC ( CWinAppEx   )  [private]

CWinAppEx::DECLARE_DYNAMIC ( CWinAppEx   )  [private]

bool CWinAppEx::GetBitmappedMenus (  )  const

bool CWinAppEx::GetBitmappedMenus (  )  const

Definition at line 174 of file WinAppEx.cpp.

References m_bBitmappedMenus.

Referenced by CBmpMenuOwnerWnd< TBase >::OnDrawItem(), CBmpMenuOwnerWnd< TBase >::OnMeasureItem(), and SetMenuIcons().

DWORD CWinAppEx::GetComCtlVersion (  )  const [inline]

Definition at line 115 of file WinAppEx.h.

References m_dwComCtlVer.

Referenced by CRobotControlApp::InitInstance().

bool CWinAppEx::GetFlatMenu (  )  const

Definition at line 178 of file WinAppEx.cpp.

References ASSERT, IsWinXP(), m_bFlatMenu, and m_bUIEffects.

static CWinAppEx* CWinAppEx::GetInstance (  )  [static]

CWinAppEx * CWinAppEx::GetInstance (  )  [inline, static]

Definition at line 111 of file WinAppEx.h.

Referenced by CMenuBarButton::GetButtonSize(), CRobotControlMenu::init(), CSizableReBar::OnContextMenu(), CFrame::OnCreate(), CMenuBar::OnCreate(), CMenuBar::OnCustomDraw(), CBmpMenuOwnerWnd< TBase >::OnDrawItem(), CBmpMenuOwnerWnd< TBase >::OnInitMenuPopup(), CMDIClientWndEx::OnMDIRefreshMenu(), CBmpMenuOwnerWnd< TBase >::OnMeasureItem(), CToolBarEx::OnReBarChevronPushed(), CFrameWndBase< TBase >::OnSettingChange(), CMenuBar::OnToolHitTest(), CMenuBar::OnUpdateCmdUI(), CToolBarPopup::Show(), CMenuBar::TrackChevronMenu(), CMenuBar::TrackPopupMenu(), CRecentFileListEx::UpdateMenu(), and CMenuBar::UpdateMenuBar().

bool CWinAppEx::GetMenuAnimation (  )  const

bool CWinAppEx::GetMenuAnimation (  )  const

Definition at line 149 of file WinAppEx.cpp.

References ASSERT, IsWin2K(), IsWin98_2K(), m_bMenuAnimation, and m_bUIEffects.

bool CWinAppEx::GetMenuFade (  )  const

bool CWinAppEx::GetMenuFade (  )  const

Definition at line 161 of file WinAppEx.cpp.

References ASSERT, IsWin2K(), m_bMenuFade, and m_bUIEffects.

int CWinAppEx::GetMenuImage ( UINT  nID  )  const

int CWinAppEx::GetMenuImage ( UINT  nID  )  const

Definition at line 318 of file WinAppEx.cpp.

References m_mapIDToImage.

Referenced by CBmpMenuOwnerWnd< TBase >::OnDrawItem(), and SetMenuIcons().

CImageList* CWinAppEx::GetMenuImageList (  ) 

CImageList * CWinAppEx::GetMenuImageList (  ) 

Definition at line 307 of file WinAppEx.cpp.

References m_imageList, szMenuIcon(), and VERIFY.

Referenced by AddMenuIcon(), CBmpMenuOwnerWnd< TBase >::OnDrawItem(), and ReplaceMenuIcon().

bool CWinAppEx::GetMenuUnderlines (  )  const

bool CWinAppEx::GetMenuUnderlines (  )  const

Definition at line 155 of file WinAppEx.cpp.

References ASSERT, IsWin2K(), m_bMenuUnderlines, and m_bUIEffects.

Referenced by CMenuBar::OnUpdateCmdUI().

const NONCLIENTMETRICS& CWinAppEx::GetNonClientMetrics (  )  const

const NONCLIENTMETRICS & CWinAppEx::GetNonClientMetrics (  )  const [inline]

Definition at line 121 of file WinAppEx.h.

References m_info.

Referenced by CMenuBarButton::GetButtonSize(), and CMenuBar::UpdateMenuBar().

EOs CWinAppEx::GetOs (  )  const

CWinAppEx::EOs CWinAppEx::GetOs (  )  const [inline]

Definition at line 113 of file WinAppEx.h.

References m_eOs.

bool CWinAppEx::IsWin2K (  )  const

bool CWinAppEx::IsWin2K (  )  const [inline]

Definition at line 119 of file WinAppEx.h.

References m_eOs, and osWin2K.

Referenced by GetMenuAnimation(), GetMenuFade(), GetMenuUnderlines(), CMenuBar::OnUpdateCmdUI(), CMenuBar::TrackPopupMenu(), and UpdateSystemParameters().

bool CWinAppEx::IsWin50 (  )  const [inline]

Definition at line 121 of file WinAppEx.h.

References m_eOs, osWin2K, osWin98, and osWinXP.

bool CWinAppEx::IsWin98_2K (  )  const [inline]

Definition at line 117 of file WinAppEx.h.

References m_eOs, osWin2K, and osWin98.

Referenced by GetMenuAnimation(), SetBitmappedMenus(), CMenuBar::TrackChevronMenu(), CMenuBar::TrackPopupMenu(), and UpdateSystemParameters().

bool CWinAppEx::IsWinNT (  )  const [inline]

Definition at line 123 of file WinAppEx.h.

References m_eOs, osWin2K, osWinNT, and osWinXP.

bool CWinAppEx::IsWinXP (  )  const [inline]

Definition at line 127 of file WinAppEx.h.

References m_eOs, and osWinXP.

Referenced by GetFlatMenu().

void CWinAppEx::LoadStdProfileSettings ( UINT  nMaxMRU = _AFX_MRU_COUNT  ) 

void CWinAppEx::LoadStdProfileSettings ( UINT  nMaxMRU = _AFX_MRU_COUNT  ) 

Definition at line 125 of file WinAppEx.cpp.

Referenced by CApp::InitInstance().

void CWinAppEx::RemoveMenuIcon ( UINT  nID  ) 

void CWinAppEx::RemoveMenuIcon ( UINT  nID  ) 

Definition at line 241 of file WinAppEx.cpp.

References m_mapIDToImage.

Referenced by CMDIClientWndEx::OnMDIRefreshMenu().

void CWinAppEx::ReplaceMenuIcon ( UINT  nID,
HICON  hIcon 
)

void CWinAppEx::ReplaceMenuIcon ( UINT  nID,
HICON  hIcon 
)

Definition at line 226 of file WinAppEx.cpp.

References AddMenuIcon(), ASSERT, GetMenuImageList(), and m_mapIDToImage.

Referenced by CMDIClientWndEx::OnMDIRefreshMenu().

void CWinAppEx::SetBitmappedMenus ( bool  bBitmappedMenus  ) 

void CWinAppEx::SetBitmappedMenus ( bool  bBitmappedMenus  ) 

Definition at line 168 of file WinAppEx.cpp.

References ASSERT, IsWin98_2K(), and m_bBitmappedMenus.

void CWinAppEx::SetMenuIcons ( CMenu *  pMenu,
bool  bSubmenus = false 
)

void CWinAppEx::SetMenuIcons ( CMenu *  pMenu,
bool  bSubmenus = false 
)

Definition at line 246 of file WinAppEx.cpp.

References GetBitmappedMenus(), GetMenuImage(), GetMenuInfoWin50(), HBMMENU_CALLBACK, MENUITEMINFO_WIN50::hbmpItem, MIIM_BITMAP, MIM_STYLE, MNS_CHECKORBMP, SetMenuInfoWin50(), TRUE, and VERIFY.

Referenced by CSizableReBar::OnContextMenu(), and CBmpMenuOwnerWnd< TBase >::OnInitMenuPopup().

static BOOL CWinAppEx::TrackPopupMenuEx ( HMENU  hMenu,
UINT  nFlags,
int  x,
int  y,
CWnd *  pWnd,
LPTPMPARAMS  lptpm = 0 
) [static]

BOOL CWinAppEx::TrackPopupMenuEx ( HMENU  hMenu,
UINT  nFlags,
int  x,
int  y,
CWnd *  pWnd,
LPTPMPARAMS  lptpm = 0 
) [static]

Definition at line 108 of file WinAppEx.cpp.

References BOOL().

Referenced by CMenuBar::TrackChevronMenu(), and CMenuBar::TrackPopupMenu().

void CWinAppEx::UpdateSystemParameters (  ) 

void CWinAppEx::UpdateSystemParameters (  ) 

Definition at line 131 of file WinAppEx.cpp.

References IsWin2K(), IsWin98_2K(), m_bMenuAnimation, m_bMenuFade, m_bMenuUnderlines, m_bUIEffects, m_info, SPI_GETMENUANIMATION, SPI_GETMENUFADE, SPI_GETMENUUNDERLINES, SPI_GETUIEFFECTS, and VERIFY.

Referenced by CFrameWndBase< TBase >::OnSettingChange().


Member Data Documentation

bool CWinAppEx::m_bBitmappedMenus [protected]

Definition at line 102 of file WinAppEx.h.

Referenced by GetBitmappedMenus(), and SetBitmappedMenus().

BOOL CWinAppEx::m_bFlatMenu [protected]

Definition at line 106 of file WinAppEx.h.

Referenced by GetFlatMenu().

BOOL CWinAppEx::m_bMenuAnimation [protected]

Definition at line 97 of file WinAppEx.h.

Referenced by GetMenuAnimation(), and UpdateSystemParameters().

BOOL CWinAppEx::m_bMenuFade [protected]

Definition at line 99 of file WinAppEx.h.

Referenced by GetMenuFade(), and UpdateSystemParameters().

BOOL CWinAppEx::m_bMenuUnderlines [protected]

Definition at line 98 of file WinAppEx.h.

Referenced by GetMenuUnderlines(), and UpdateSystemParameters().

BOOL CWinAppEx::m_bUIEffects [protected]

Definition at line 100 of file WinAppEx.h.

Referenced by GetFlatMenu(), GetMenuAnimation(), GetMenuFade(), GetMenuUnderlines(), and UpdateSystemParameters().

DWORD CWinAppEx::m_dwComCtlVer [protected]

Definition at line 95 of file WinAppEx.h.

Referenced by GetComCtlVersion().

EOs CWinAppEx::m_eOs [protected]

Definition at line 94 of file WinAppEx.h.

Referenced by GetOs(), IsWin2K(), IsWin50(), IsWin98_2K(), IsWinNT(), and IsWinXP().

CImageList CWinAppEx::m_imageList [protected]

Definition at line 103 of file WinAppEx.h.

Referenced by GetMenuImageList().

NONCLIENTMETRICS CWinAppEx::m_info [protected]

Definition at line 96 of file WinAppEx.h.

Referenced by GetNonClientMetrics(), and UpdateSystemParameters().

CMapIntToInt CWinAppEx::m_mapFileIcons [protected]

Definition at line 105 of file WinAppEx.h.

Referenced by AddMenuIcon().

CMapUIntToInt CWinAppEx::m_mapIDToImage [protected]

Definition at line 104 of file WinAppEx.h.

Referenced by AddMenuIcon(), GetMenuImage(), RemoveMenuIcon(), and ReplaceMenuIcon().


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