Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CCoolMenu Class Reference

#include <CoolMenu.h>

List of all members.

Public Member Functions

 CCoolMenu ()
virtual ~CCoolMenu ()
BOOL AddMenu (CMenu *pMenu, BOOL bChild=FALSE)
void SetWatermark (HBITMAP hBitmap)
void OnMeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct)
void OnDrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
void EnableHook ()

Static Public Member Functions

static void EnableHook (BOOL bEnable)
static void RegisterEdge (int nLeft, int nTop, int nLength)
static BOOL IsModernVersion ()

Protected Member Functions

void DrawMenuText (CDC *pDC, CRect *pRect, const CString &strText)
void DrawWatermark (CDC *pDC, CRect *pRect, int nOffX, int nOffY)

Static Protected Member Functions

static LRESULT CALLBACK MsgHook (int nCode, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK MenuProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Protected Attributes

CMap< DWORD, DWORD, CString,
CString & > 
m_pStrings
int m_nCheckIcon
CBitmap m_bmWatermark
CDC m_dcWatermark
CSize m_czWatermark
HBITMAP m_hOldMark
BOOL m_bEnable
BOOL m_bUnhook

Static Protected Attributes

static HHOOK m_hMsgHook = NULL
static LPCTSTR wpnOldProc = _T("RAZA_MenuOldWndProc")
static BOOL m_bPrinted = TRUE
static int m_nEdgeLeft = 0
static int m_nEdgeTop = 0
static int m_nEdgeSize = 0


Constructor & Destructor Documentation

CCoolMenu::CCoolMenu  ) 
 

Definition at line 44 of file CoolMenu.cpp.

References m_bEnable, m_bUnhook, and m_nCheckIcon.

CCoolMenu::~CCoolMenu  )  [virtual]
 

Definition at line 51 of file CoolMenu.cpp.

References EnableHook(), m_bUnhook, NULL, and SetWatermark().


Member Function Documentation

BOOL CCoolMenu::AddMenu CMenu *  pMenu,
BOOL  bChild = FALSE
 

Definition at line 74 of file CoolMenu.cpp.

References m_bEnable, m_pStrings, and NULL.

Referenced by CPacketWnd::OnContextMenu(), CBaseMatchWnd::OnContextMenu(), CDownloadMonitorDlg::OnContextMenu(), CLibraryDetailView::OnContextMenu(), CWndTabBar::OnCreate(), CMainWnd::OnInitMenuPopup(), CLibraryHeaderBar::OnLibraryView(), and CWebCtrl::WebWndProc().

void CCoolMenu::DrawMenuText CDC *  pDC,
CRect *  pRect,
const CString &  strText
[protected]
 

Definition at line 326 of file CoolMenu.cpp.

References CShareazaApp::m_bMenuWasVisible, and theApp.

Referenced by OnDrawItem().

void CCoolMenu::DrawWatermark CDC *  pDC,
CRect *  pRect,
int  nOffX,
int  nOffY
[protected]
 

Definition at line 347 of file CoolMenu.cpp.

References m_czWatermark, and m_dcWatermark.

Referenced by OnDrawItem().

void CCoolMenu::EnableHook BOOL  bEnable  )  [static]
 

Definition at line 384 of file CoolMenu.cpp.

References m_hMsgHook, MsgHook(), and NULL.

void CCoolMenu::EnableHook  ) 
 

Definition at line 372 of file CoolMenu.cpp.

References IsModernVersion(), m_bEnable, m_bUnhook, m_hMsgHook, and NULL.

Referenced by CShareazaApp::InitInstance(), and ~CCoolMenu().

BOOL CCoolMenu::IsModernVersion  )  [static]
 

Definition at line 60 of file CoolMenu.cpp.

References theApp.

Referenced by EnableHook().

LRESULT CALLBACK CCoolMenu::MenuProc HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam
[static, protected]
 

Definition at line 445 of file CoolMenu.cpp.

References CoolInterface, m_bPrinted, CCoolInterface::m_crBackNormal, CCoolInterface::m_crDisabled, m_nEdgeLeft, m_nEdgeSize, m_nEdgeTop, and wpnOldProc.

Referenced by MsgHook().

LRESULT CALLBACK CCoolMenu::MsgHook int  nCode,
WPARAM  wParam,
LPARAM  lParam
[static, protected]
 

Definition at line 410 of file CoolMenu.cpp.

References m_hMsgHook, MenuProc(), NULL, and wpnOldProc.

Referenced by EnableHook().

void CCoolMenu::OnDrawItem LPDRAWITEMSTRUCT  lpDrawItemStruct  ) 
 

Definition at line 178 of file CoolMenu.cpp.

References CM_DISABLEDBLEND, CoolInterface, DrawMenuText(), DrawWatermark(), CCoolInterface::GetBuffer(), CCoolInterface::ImageForID(), m_bmWatermark, m_bPrinted, CCoolInterface::m_crBackCheck, CCoolInterface::m_crBackCheckSel, CCoolInterface::m_crBackNormal, CCoolInterface::m_crBackSel, CCoolInterface::m_crBorder, CCoolInterface::m_crCmdText, CCoolInterface::m_crCmdTextSel, CCoolInterface::m_crDisabled, CCoolInterface::m_crMargin, CCoolInterface::m_crShadow, CCoolInterface::m_fntBold, CCoolInterface::m_fntNormal, m_hMsgHook, m_nCheckIcon, CCoolInterface::m_pImages, m_pStrings, and NULL.

Referenced by CPacketWnd::OnDrawItem(), CMainWnd::OnDrawItem(), CBaseMatchWnd::OnDrawItem(), CWndTabBar::OnDrawItem(), CLibraryHeaderBar::OnDrawItem(), CLibraryDetailView::OnDrawItem(), CDownloadTabBar::OnDrawItem(), and CWebCtrl::WebWndProc().

void CCoolMenu::OnMeasureItem LPMEASUREITEMSTRUCT  lpMeasureItemStruct  ) 
 

Definition at line 146 of file CoolMenu.cpp.

References CoolInterface, ID_SEPARATOR, CCoolInterface::m_fntNormal, m_hMsgHook, m_pStrings, and NULL.

Referenced by CPacketWnd::OnMeasureItem(), CMainWnd::OnMeasureItem(), CBaseMatchWnd::OnMeasureItem(), CWndTabBar::OnMeasureItem(), CLibraryHeaderBar::OnMeasureItem(), CLibraryDetailView::OnMeasureItem(), CDownloadTabBar::OnMeasureItem(), and CWebCtrl::WebWndProc().

void CCoolMenu::RegisterEdge int  nLeft,
int  nTop,
int  nLength
[static]
 

Definition at line 400 of file CoolMenu.cpp.

References m_nEdgeLeft, m_nEdgeSize, and m_nEdgeTop.

Referenced by CWndTabBar::OnRButtonUp(), CDownloadTabBar::OnRButtonUp(), CCoolMenuBarCtrl::ShowMenu(), and CCoolBarCtrl::ThrowMenu().

void CCoolMenu::SetWatermark HBITMAP  hBitmap  ) 
 

Definition at line 116 of file CoolMenu.cpp.

References m_bmWatermark, CShareazaApp::m_bRTL, m_czWatermark, m_dcWatermark, m_hOldMark, NULL, and theApp.

Referenced by CWebCtrl::EnableCoolMenu(), CSkin::Finalise(), CPacketWnd::OnContextMenu(), CBaseMatchWnd::OnContextMenu(), CLibraryDetailView::OnContextMenu(), CLibraryHeaderBar::OnLibraryView(), and ~CCoolMenu().


Member Data Documentation

BOOL CCoolMenu::m_bEnable [protected]
 

Definition at line 55 of file CoolMenu.h.

Referenced by AddMenu(), CCoolMenu(), and EnableHook().

CBitmap CCoolMenu::m_bmWatermark [protected]
 

Definition at line 50 of file CoolMenu.h.

Referenced by OnDrawItem(), and SetWatermark().

BOOL CCoolMenu::m_bPrinted = TRUE [static, protected]
 

Definition at line 367 of file CoolMenu.cpp.

Referenced by MenuProc(), and OnDrawItem().

BOOL CCoolMenu::m_bUnhook [protected]
 

Definition at line 56 of file CoolMenu.h.

Referenced by CCoolMenu(), EnableHook(), and ~CCoolMenu().

CSize CCoolMenu::m_czWatermark [protected]
 

Definition at line 52 of file CoolMenu.h.

Referenced by DrawWatermark(), and SetWatermark().

CDC CCoolMenu::m_dcWatermark [protected]
 

Definition at line 51 of file CoolMenu.h.

Referenced by DrawWatermark(), and SetWatermark().

HHOOK CCoolMenu::m_hMsgHook = NULL [static, protected]
 

Definition at line 365 of file CoolMenu.cpp.

Referenced by EnableHook(), MsgHook(), OnDrawItem(), and OnMeasureItem().

HBITMAP CCoolMenu::m_hOldMark [protected]
 

Definition at line 53 of file CoolMenu.h.

Referenced by SetWatermark().

int CCoolMenu::m_nCheckIcon [protected]
 

Definition at line 48 of file CoolMenu.h.

Referenced by CCoolMenu(), and OnDrawItem().

int CCoolMenu::m_nEdgeLeft = 0 [static, protected]
 

Definition at line 368 of file CoolMenu.cpp.

Referenced by MenuProc(), and RegisterEdge().

int CCoolMenu::m_nEdgeSize = 0 [static, protected]
 

Definition at line 370 of file CoolMenu.cpp.

Referenced by MenuProc(), and RegisterEdge().

int CCoolMenu::m_nEdgeTop = 0 [static, protected]
 

Definition at line 369 of file CoolMenu.cpp.

Referenced by MenuProc(), and RegisterEdge().

CMap<DWORD, DWORD, CString, CString&> CCoolMenu::m_pStrings [protected]
 

Definition at line 47 of file CoolMenu.h.

Referenced by AddMenu(), OnDrawItem(), and OnMeasureItem().

LPCTSTR CCoolMenu::wpnOldProc = _T("RAZA_MenuOldWndProc") [static, protected]
 

Definition at line 366 of file CoolMenu.cpp.

Referenced by MenuProc(), and MsgHook().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:05 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2