⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ew_menu.h

📁 基于Windml2.0的窗口系统原代码 , 以及和MFC CDC兼容的CDC
💻 H
字号:
#ifndef EW_Menu_H
#define EW_Menu_H
#include "vector"
#include "EW_Framework.h"
#include "cdc_objects.h"

typedef vector<char *> MENU_STRING_LIST;

class EW_Menu : public EW_Window
{
public:
	EW_Menu(int xPos , int yPos , WORD wID = 0);
	virtual ~EW_Menu();
	
	    
public:	
	void OnMouseMove(EW_Message * pMsg);
	
	void OnKeyDown(EW_Message * pMsg);
		
	void OnDraw(EW_OSAdaptor * pAdaptor);
	
	void AddMenuItem(char *szMenuText , int index = -1);
	
	void DeleteItem(int index);
	
private:

	void MoveUp();
	
	void MoveDown();
	
	void AdjustifySize();
	
	void SetSelectedItem(int xPos , int yPos);
	
	void OpenLayer();
	void LayerControl();
	void ShowAnnotation();
	void ShowCompass();
	void ShowScale();
	void OnExit();
		
public:	
	//左上角x坐标
	int m_nxPos;
	
	//左上角y坐标
	int m_nyPos;
	
	//当前选择项索引
	int m_nSelectedIndex;	
	
	//菜单项高度
	int m_nMenuItemHeight;
	
	//菜单宽度
	int m_nMenuWidth;
	
	//菜单高度
	int m_nMenuHeight;
	
	MENU_STRING_LIST m_menuStringList;		
	
	DECLARE_MESSAGE_MAP()
};

#endif //EW_Menu_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -