WM_COMMAND 消息控制函数
映射入口 函数原型
ON_COMMAND(, ) afx_msg void FUN();
ON_COMMAND_EX(, ) afx_msg bool FUN(UINT);
子窗口通知消息控制函数
映射入口 函数原型
一般的控制通知代码
ON_CONTROL(,, ) afx_msg void FUN();
ON_NOTIFY(,, ) afx_msg void FUN();
用户按钮通知代码
ON_BN_CLICKED(, ) afx_msg void FUN();
ON_BN_DISABLE(, ) afx_msg void FUN();
ON_BN_DOUBLECLICKED(, ) afx_msg void FUN();
ON_BN_HILITE(, ) afx_msg void FUN();
ON_BN_PAINT(, ) afx_msg void FUN();
ON_BN_ONHILITE(, ) afx_msg void FUN();
组合框通知代码
ON_CBN_CLOSEUP(, ) afx_msg void FUN();
ON_CBN_DBLCLK(, ) afx_msg void FUN();
ON_CBN_DROPDOWN(, ) afx_msg void FUN();
ON_CBN_EDITUPDATE(, ) afx_msg void FUN();
ON_CBN_ERRSPACE(, ) afx_msg void FUN();
ON_CBN_KILLFOCUS(, ) afx_msg void FUN();
ON_CBN_SELCHANGE(, ) afx_msg void FUN();
ON_CBN_SELENDCANCEL(, ) afx_msg void FUN();
ON_CBN_SELENDOK(, ) afx_msg void FUN();
ON_CBN_SETFOCUS(, ) afx_msg void FUN();
编辑框通知代码
ON_EN_CHANGE(, ) afx_msg void FUN();
ON_EN_ERRSPACE(, ) afx_msg void FUN();
ON_EN_HSCROLL(, ) afx_msg void FUN();
ON_EN_KILLFOCUS(, ) afx_msg void FUN();
ON_EN_MAXTEXT(, ) afx_msg void FUN();
ON_EN_SETFOCUS(, ) afx_msg void FUN();
ON_EN_UPDATE(, ) afx_msg void FUN();
ON_EN_VSCROLL(, ) afx_msg void FUN();
列表框通知代码
ON_LBN_DBLCLK(, ) afx_msg void FUN();
ON_LBN_ERRSPACE(, ) afx_msg void FUN();
ON_LBN_KILLFOCUS(, ) afx_msg void FUN();
ON_LBN_SELCHANGE(, ) afx_msg void FUN();
ON_LBN_SETFOCUS(, ) afx_msg void FUN();
列表视图通知代码
LVN_BEGINDRAG(, ) afx_msg void FUN();
LVN_BEGINLABLEEDIT(, ) afx_msg void FUN();
LVN_BEGINRDRAG(, ) afx_msg void FUN();
LVN_COLUMNCLICK(, ) afx_msg void FUN();
LVN_DELETEALLITEMS(, ) afx_msg void FUN();
LVN_DELETEITEM(, ) afx_msg void FUN();
LVN_ENDLABLEEDIT(, ) afx_msg void FUN();
LVN_GETDISPINFOR(, ) afx_msg void FUN();
LVN_INSERTITEM(, ) afx_msg void FUN();
LVN_ITEMCHANGED(, ) afx_msg void FUN();
LVN_KEYDOWN(, ) afx_msg void FUN();
LVN_PEN(, ) afx_msg void FUN();
LVN_SETDISPINFO(, ) afx_msg void FUN();
树视图通知代码
TVN_BEGINDRAG(, ) afx_msg void FUN();
TVN_BEGINLABLEEDIT(, ) afx_msg void FUN();
TVN_BEGINRDRAG(, ) afx_msg void FUN();
TVN_DELETEITEM(, ) afx_msg void FUN();
TVN_ENDLABLEEDIT(, ) afx_msg void FUN();
TVN_GETDISPINFOR(, ) afx_msg void FUN();
TVN_ITEMEXPENDED(, ) afx_msg void FUN();
TVN_KEYDOWN(, ) afx_msg void FUN();
TVN_SELCHANGED(, ) afx_msg void FUN();
TVN_SELCHANGING(, ) afx_msg void FUN();
列表控制通知代码
TCN_KEYDOWN(, ) afx_msg void FUN();
TCN_SELCHANGED(, ) afx_msg void FUN();
TCN_SELCHANGING(, ) afx_msg void FUN();
WINDOWS通知消息控制函数
映射入口 函数原型
ON_WM_ACTIVATE() afx_msg void OnActivate(UINT,CWnd*,bool);
ON_WM_ACTIVATEAPP() afx_msg void ONActivateApp(bool,HANDLB);
ON_WM_ASKBFORMATNAME() afx_msg void OnAskCbFormatName(UINT,LPSTR);
ON_WM_CANCELMODE() afx_msg void OnCancelmode();
ON_WM_CHANGECBCHAIN() afx_msg void OnChangeCbChain(HWND,HWND);
ON_WM_CHAR() afx_msg void OnChar(UINT,UINT,UINT);
ON_WM_CHARTOITEM() afx_msg int OnCharToItem(UINT,CWnd*,UINT);
ON_WM_CHILDACTIVATE() afx_msg void OnChildActivate();
ON_WM_CLOSE() afx_msg void OnClose();
ON_WM_COMPACTING() afx_msg void OnCompacting(UINT);
ON_WM_COMPAREITEM() afx_msg int OnCompareItem(LPDELETEITEMSTRUCT);
ON_WM_CREATE() afx_msg int OnCreate(LPCREATESTRUCT);
ON_WM_CTLCOLOR() afx_msg HBRUSH OncTLCOLOR(CDC*,CWnd*,UINT);
ON_WM_DEADCHAR() afx_msg void OnDeadChar(UINT,UINT,UINT);
ON_WM_DELETEITEM() afx_msg void OnDeleteItem(LPDELETEITEMSTRUCT);
ON_WM_DESTROY() afx_msg void OnDestroy();
ON_WM_DESTROYCLIPBOARD() afx_msg void OnDestroyClipboard();
ON_WM_DEVMODE_CHANGE() afx_msg void OnDevModeChande(LPSTR);
ON_WM_DRAWCLIPBOARD() afx_msg void OnDrawClipboard();
ON_WM_DRAWITEM() afx_msg void OnDrawItem(LPDRAWITEMSTRUCT);
ON_WM_DROPFILES() afx_msg void OnDropFiles(HANDLE);
ON_WM_ENABLE() afx_msg void OnEnable(bool);
ON_WM_ENDSESSION() afx_msg void OnEndSession(bool);
ON_WM_ENTERIDLE() afx_msg void OnEnterIdle(UINT,CWnd*);
ON_WM_ERASEBKGND() afx_msg bool OnEraseBkgnd(CDC*);
ON_WM_FONTCHANGE() afx_msg void OnFontChange();
ON_WM_GETDLGCODE() afx_msg UINT OnGetDlgCode();
ON_WM_GETMINMAXINFO() afx_msg void OnGetMinMaxInfo(LPPOINT);
ON_WM_HSCROLL() afx_msg void OnHScroll(UINT,UINT,CWnd*);
ON_WM_HSCROLLCLIPBOARD() afx_msg void OnHScrollClipboard(CWnd*,UINT,UINT);
ON_WM_ICONERASEBKGND() afx_msg void OnIconEraseBkgnd(CDC*);
ON_WM_INITMENU() afx_msg void OnInitMenu(CMenu*);
ON_WM_INITMENUPOPUP() afx_msg void OnInitMenuPopup(CMenu*,UINT,UINT);
ON_WM_KEYDOWN() afx_msg void OnKeyDown(UINT,UINT,UINT);
ON_WM_KEYUP() afx_msg void OnKeyUp(UINT,UINT,UINT);
ON_WM_KILLFOCUS() afx_msg void OnKillFocus(CWnd*);
ON_WM_LBOTTONDBLCLK() afx_msg void OnLBottonDBlclk(UINT,CPoit);
ON_WM_LBOTTONDOWN() afx_msg void OnLBottonDown(UINT,CPoit);
ON_WM_LBOTTONUP() afx_msg void OnLBottonUp(UINT,CPoit);
ON_WM_MBOTTONDBLCLK() afx_msg void OnMBottonDBlclk(UINT,CPoit);
ON_WM_MBOTTONDOWN() afx_msg void OnMBottonDown(UINT,CPoit);
ON_WM_MBOTTONUP() afx_msg void OnMBottonUp(UINT,CPoit);
ON_WM_RBOTTONDBLCLK() afx_msg void OnRBottonDBlclk(UINT,CPoit);
ON_WM_RBOTTONDOWN() afx_msg void OnRBottonDown(UINT,CPoit);
ON_WM_RBOTTONUP() afx_msg void OnRBottonUp(UINT,CPoit);
ON_WM_MDIACTIVTE() afx_msg void OnMDIActivate(bool,CWnd*,CWnd*);
ON_WM_MEASUREITEM() afx_msg void OnMeasureItem(LPMEASUREITEMSTRUCT);
ON_WM_MENUCHAR() afx_msg LONG OnMenuChar(UINT,UINT,CMenu*);
ON_WM_MENUSELECT() afx_msg void OnMenuSelect(UINT,UINT,HMENU);
ON_WM_MOUSEACTIVATE() afx_msg void OnMouseActivate(CWnd*,UINT,UINT);
ON_WM_MOUSEMOVE() afx_msg void OnMouseMove(UINT,CPoint);
ON_WM_MOVE() afx_msg void OnMove(int,int);
ON_WM_NCATIVATE() afx_msg bool OnNcAtivate(bool);
ON_WM_NCCALCSIZE() afx_msg void OnNcCalcSize(LPRECT);
ON_WM_NCCREATE() afx_msg void OnNcCreate(LPCREATESTRUCT);
ON_WM_NCDESTROY() afx_msg void OnNcDestroy();
ON_WM_NCHITTEST() afx_msg UINT OnNcHitTest(CPoint);
ON_WM_NCPAINT() afx_msg void OnNcPaint();
ON_WM_NCLBOTTONDBLCLK() afx_msg void OnNcLBottonDBlclk(UINT,CPoit);
ON_WM_NCLBOTTONDOWN() afx_msg void OnNcLBottonDown(UINT,CPoit);
ON_WM_NCLBOTTONUP() afx_msg void OnNcLBottonUp(UINT,CPoit);
ON_WM_NCMBOTTONDBLCLK() afx_msg void OnNcMBottonDBlclk(UINT,CPoit);
ON_WM_NCMBOTTONDOWN() afx_msg void OnNcMBottonDown(UINT,CPoit);
ON_WM_NCMBOTTONUP() afx_msg void OnNcMBottonUp(UINT,CPoit);
ON_WM_NCRBOTTONDBLCLK() afx_msg void OnNcRBottonDBlclk(UINT,CPoit);
ON_WM_NCRBOTTONDOWN() afx_msg void OnNcRBottonDown(UINT,CPoit);
ON_WM_NCRBOTTONUP() afx_msg void OnNcRBottonUp(UINT,CPoit);
ON_WM_PAINT() afx_msg void OnPaint();
ON_WM_PAINTCLIPBOARD() afx_mag void OnPaintClipboard(CWnd*,HANDLE);
ON_WM_PALETTECHANGED() afx_mag void OnPaletteChanged(CWnd*);
ON_WM_PALETTECHANGING() afx_mag void OnPaletteChanging(CWnd*);
ON_WM_PARENTNOTIFY() afx_mag void OnParentNotify(UINT,LONG);
ON_WM_QUERYDRAGICON() afx_msg HCURSOR OnQueryDragIcon();
ON_WM_QUERYDRAGPALETTE() afx_msg bool OnQueryDragPalette();
ON_WM_QUERYENDSESSION() afx_msg bool OnQueryEndSesion();
ON_WM_QUERYOPEN() afx_msg bool OnQueryOpen();
ON_WM_RENDERALLFORMATS() afx_msg void OnRenderAllFormats();
ON_WM_RENDERFORMAT() afx_msg void OnRenderFormat(UINT);
ON_WM_SETFOCUS() afx_msg void OnSetFocus(CWnd*);
ON_WM_SHOWWINDOW() afx_msg void OnShowWindow(bool,UINT);
ON_WM_SIZE() afx_msg void OnSize(UINT,int,int);
ON_WM_SIZECLIPBOARD() afx_msg void OnSizeClipboard(CWnd*,HANDLE);
ON_WM_SPOOLERSTATUS() afx_msg void OnSpoolerStatus(UINT,UINT);
ON_WM_SYSCHAR() afx_msg void OnSysChar(UINT,UINT,UINT);
ON_WM_SYSCOLORCHANGE() afx_msg void OnSysColorChange();
ON_WM_SYSDEADCHAR() afx_msg void OnSysDeadChar(UINT,UINT,UINT);
ON_WM_SYSKEYDOWN() afx_msg void OnSysKeyDown(UINT,UINT,UINT);
ON_WM_SYSKEYUP() afx_msg void OnSysKeyUp(UINT,UINT,UINT);
ON_WM_TIMECHANGE() afx_msg void OnTimeChange();
ON_WM_VKEYTOITEM() afx_msg void OnVKeyToItem(UINT,CWnd*,UINT);
ON_WM_TIMER() afx_msg void OnTimer(UINT);
ON_WM_VSCROLL() afx_msg void OnVScroll(UINT,UINT,CWnd*);
ON_WM_VSCROLLCLIPBOARD() afx_msg void OnVScrollClipboard(CWnd*,UINT,UINT);
ON_WM_WINDOWPOSCHANGED() afx_msg void OnWindowPosChanged(WINDOWPOS FAR *);
ON_WM_WINDOWPOSCHANGING() afx_msg void OnWindowPosChanging(WINDOWPOS FAR *);
ON_WM_WININICHANGE() afx_msg void OnWinIniChange(LPSTR);
用户自定义消息代码
映射入口 函数原型
ON_MESSSAGE(, ) afx_msg LONG FUN(UINT,LONG);
ON_REGISTERED_MESSAGE(, ) afx_msg LONG FUN(UINT,LONG);
注意:“<>”中的内容为自定义内容。
阅读(2658) | 评论(0) | 转发(0) |