?? mycoolmenu.h
字號:
// MyCoolMenu.h: interface for the CMyCoolMenu class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYCOOLMENU_H__061B4615_4569_4278_9F86_6DFF6FCEA45F__INCLUDED_)
#define AFX_MYCOOLMENU_H__061B4615_4569_4278_9F86_6DFF6FCEA45F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef Public_Area
#define Public_Area 20 //左邊灰色區域寬度
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
class CMenuItemContext
{
public:
CMenuItemContext();
virtual ~CMenuItemContext();
public:
UINT U_icon;
int nMenuID; //-2:頂層菜單條 -1:彈出菜單 0:分隔條 >0:一般的菜單
CString strText;//menu text
};
class CMyCoolMenu : public CMenu
{
public:
CMyCoolMenu();
virtual ~CMyCoolMenu();
public:
CMenuItemContext lpMenu[100];
int index;
CUIntArray m_menuIDs; // store the menu ids
CImageList m_ImageList; // store the menu icons
public:
void show();
//method
int GetIconIndexByID(UINT uID);
BOOL ChangeMenuStyle(HMENU hMenu, BOOL bTop);
BOOL AttachMenu(HMENU hMenu,UINT uToolBarID,CSize sz);
void DrawBestRect(CDC *pDC, CRect rect, COLORREF cr1,COLORREF cr2, BOOL bHor);
void DrawTop(CDC *pDC,CRect rect,BOOL bSelected);
void DrawBGColor(CDC* pDC, CRect rect, BOOL bSelected);
void DrawIcon(CDC* pDC, CRect rect, UINT uIndex, BOOL IsEnabled);
void DrawText(CDC* pDC, CRect rect, CString sText);
void DrawGray(CDC* pDC, CRect rect, CString sText);
virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
};
#endif // !defined(AFX_MYCOOLMENU_H__061B4615_4569_4278_9F86_6DFF6FCEA45F__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -