#pragma once | |
002 | #include "PngImage.h" |
003 | #include <vector> |
004 | using namespace std; |
005 | enum BUTTON鼠标左键失灵怎样修复_STATE |
006 | { |
007 | BUTTON_ENABLE = 0, |
008 | BUTTON_HOVER = 1, |
009 | BU鼠标宏怎么设置TTON_CLICK = 2, |
010 | BUTTON_CHECK = 3, |
011 | BUTTON_DISABLE= 4, |
012 | }; //按钮状态 |
013 | // PngButton.h |
014 | class ButtonCall鼠标右键快捷键back |
015 | { |
016鼠标宏怎么设置 | publ鼠标宏ic: |
017 | ButtonCallback(){}; |
018 | virt鼠标右键不能用ual void callbackI事件查看器d(int id, WPARAM wParam = 0, LPARAM l鼠标宏Param = 0) =N鼠标右键ULL;按钮开关接线图 |
019 | }; |
020 | |
021 | class PngButton |
022 | { |
023 | public: |
024 | PngBut事件暴露法治意识缺位ton(ButtonCallback* pbtnCallback); |
025 | virtual ~PngButton(); |
026 | public: |
027 | INT GetWi事件研究法dt按钮英文h(){return m_nSliceWid鼠标左键按下去没反应th;}; |
028 | INT GetHeight(){retur鼠标左键叫什么n m_nHeight;}; |
029 | void SetButtonImage(LPCTSTR pszFileName,int picStateNum =5); |
030 | void Set鼠标左键双击变为打开属性ButtonImage(HINSTANCE hInstance, LPCTSTR pszResourceName,int picStateNum =5); |
031 | void DrawButton(CDC * pDC); |
032 | void OnLButtonUp(UINT nFlags, C事件脉络Point point); |
03按钮符号3 | void OnLButtonDown(UINT nFla鼠标宏怎么设置gs, CPoint point鼠标手); |
034 | void OnMouseHover(WPARAM wparam, LPARAM lparam); |
035 | void OnMouseLeave(WPARAM wparam,按钮的文字符号 LPARAM lparam); |
036 | |
037 | void setButtonPos(int x,int y); |
038 | CPoint getButtonPos(){return m_Point;}; |
039 | void setEnable(bool enable =鼠标右键菜单在左边true)鼠标垫{m_bEnable = enable;} |
040 | BOOL getEnable(){return m_bEnable;}; |
041 | void setVisable(bool visable =true){ m_bVisable = visable;}事件脉络; |
042 | B鼠标宏OOL getVisable(){return m_bVisable;}; |
043 | BUTTON_STATE getbuttonState(){return m_but鼠标tonState;}; |
044 | void setbtnCheck(bool bc事件脉络heck =false); |
045 | vo鼠标左键失灵怎样修复id setBtnID(int id){m_buttonID = id;}; |
046 | |
047 | //鼠标移动事件 |
048 | b鼠标dpi是什么ool按钮开关接线图 OnMouseMoveEvent(CPoint ClientPoint); |
049 | //鼠标左键事件 |
050 | bool OnLMouseDownEvent按钮(CPoint ClientPoint); |
051 | //鼠标左键事件 |
052事件研究法 | bool OnLMouseUpE鼠标哪个牌子好vent(CPoint ClientPoint); |
053 | //鼠标左键事件 |
054 | boo事件营销l OnLMouseDoubleEvent(CPoint ClientPoint); |
055 | //鼠标右键事件 |
056 | bool OnRMo鼠标左键失灵怎样修复useDownEvent(CPoint ClientPo事件暴露法治意识缺位int); |
057 | /按钮/鼠标右键事件 |
058 | bool OnRMouseUpEvent(CPoint ClientPoint); |
059 | //鼠标右键事件 |
060 | bool OnRMouseDoubleEven鼠标左键失灵怎样修复t(CPoint ClientPoint); |
061 | |
062 | private: |
063 | BOOL m_bEnable; // 按钮是否禁用 |
064 | BOOL m_bCursorOnButton; // 鼠标是否在按钮上事件战法兑换表 |
065 | B按钮开关OOL m_bPress; // 按钮是否被按下 |
066 | BOOL m_bChecked; // checkbutton check状态 |
067 | |
068 | BOOL m_bV按钮开关接线方法isable; |
069 | int m_nWidth; //图片宽 |
070 | int m_nHeight; //图片高 |
071 | int m_st鼠标左键偶尔失灵怎么办atePicNum; |
072 | int m_nSliceWidth; //每一块图片的宽 |
073 | CPngImage m_btnImage; //按钮图片 |
074 | CRect m_rectButto按钮开关n; //按钮区域 |
075 | CPoint m_Point; |
076 | ButtonCallb鼠标垫脏了怎么清理ack* m_鼠标手pbtn按钮开关接线图Callback; |
077 | BUTTON_S鼠标右键菜单怎么设置TATE m_buttonState; |
078 | int m_butt鼠标右键用键盘哪个代替onID; |
079 | |
080 | }; |
081 | |
082 | typedef vector<pngbutton *> VpngBtn; |
083 | typedef vector</pngbutton><pngbutton *>::iterator VpngBtnItem; |
084 | class PngBtnManager |
085 | { |
086 | publ鼠标左键点一下就双击ic: |
087 | Png鼠标右键失灵怎么办BtnManager(){}; |
088 | ~PngBtnManage鼠标宏怎么设置r(); |
089 | void addBtn(PngButton* btn); |
090 | void DrawBtn(CDC *pDc); |
091 | |
092 | //鼠标移动事事件脉络件 |
093 | bool OnMouseMoveEvent(CPoint ClientPoint); |
094 | //鼠标左键事件 |
095 | bool On鼠标左键一直处于按着状态LMouseDownEvent(CPoint ClientPoint); |
096 | //鼠标左键事件 |
097 | bool OnLMouseUpEvent(CPoint ClientPoint); |
098 | //鼠标左键事件 |
099 | bool OnLMouseDoubleEvent(CPoint ClientPoint); |
100 | //鼠标右键事件 |
101 | bool OnRMouseDow按钮开关nEvent(CPoint ClientPoint); |
102 | /鼠标左键失灵右键正常/鼠标右键事件 |
103 | bool OnRMouseUpEvent(CPoint ClientPoint); |
104 | //鼠标右键事件 |
105 | bool OnRMouseDoubleEvent按钮英文(CPoint ClientPoint); |
106 | private: |
107 | VpngBtn m_png事件视界btnManager;鼠标左键一直处于按着状态 |
108 | }; |
109 | |
110 | 可以鼠标左键不灵敏很方便的添加纯PNG按钮,不需要再用鼠标左键变成右键了属性到一个bmp背景啦。按钮图为5张png图片</pngbutton></vector> |
网狐添加纯PNG按钮类功能原文链接:https://qipaiyuanmaxiazai.com/5444.html,转载请注明出处~~~
评论0