vc++ 6.0 不同的消息有不同的类来响应

说出详细内容,重谢!... 说出详细内容,重谢! 展开
 我来答
禽线韩V
2011-10-28
知道答主
回答量:18
采纳率:0%
帮助的人:7.1万
展开全部
ON_COMMAND 指明将由哪个函数处理指定的命令消息
ON_CONTROL 指明将由哪个函数处理指定的控件通知消息
ON_MESSAGE 指明将由哪个函数处理用户自定义的消息
ON_OLECMD 指明将由哪个函数处理DocObject或其容器发出的菜单命令
ON_REGISTERED_MESSAGE 指明将由哪个函数处理注册的用户自定义消息
ON_REGISTERED_THREAD_MESSAGE 指明当你拥有一个CWinThread类时,将由哪个函数处理注册的用户自定义消息
ON_THREAD_MESSAGE 指明当你拥有一个CWinThread类时,将由哪个函数处理用户自定义消息
ON_UPDATE_COMMAND_UI 指明将由哪个函数处理指定的用户界面更新命令消息
普通控件处理函数:ON_CONTROL( <wNotifyCode>,<id>,<memberFxn> ) afx_msg void memberFxn( );
用户按钮处理函数:
ON_BN_CLICKED( <id>, <memberFxn> ) afx_msg void memberFxn( )
ON_BN_DISABLE( <id>, <memberFxn> ) afx_msg void memberFxn( )
ON_BN_DOUBLECLICKED( <id>,<memberFxn> ) afx_msg void memberFxn( )
ON_BN_HILITE( <id>, <memberFxn> ) afx_msg void memberFxn( )
ON_BN_PAINT( <id>, <memberFxn> ) afx_msg void memberFxn( )
ON_BN_UNHILITE( <id>, <memberFxn> ) afx_msg void memberFxn( )
组合框处理函数:
ON_CBN_CLOSEUP(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_DBLCLK(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_DROPDOWN(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_EDITCHANGE(<id>,<memberFxn> ) afx_msg void memberFxn( )
ON_CBN_EDITUPDATE(<id>,<memberFxn> ) afx_msg void memberFxn( )
ON_CBN_ERRSPACE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_KILLFOCUS(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_SELCHANGE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_SELENDCANCEL(<id>,<memberFxn> ) afx_msg void memberFxn( )
ON_CBN_SELENDOK(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_CBN_SETFOCUS(<id>, <memberFxn> ) afx_msg void memberFxn( )
编辑控件处理函数:
ON_EN_CHANGE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_ERRSPACE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_HSCROLL(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_KILLFOCUS(<id>,<memberFxn> ) afx_msg void memberFxn( )
ON_EN_MAXTEXT(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_SETFOCUS(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_UPDATE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_EN_VSCROLL(<id>, <memberFxn> ) afx_msg void memberFxn( )
列表控件处理函数:
ON_LBN_DBLCLK(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_LBN_ERRSPACE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_LBN_KILLFOCUS(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_LBN_SELCHANGE(<id>, <memberFxn> ) afx_msg void memberFxn( )
ON_LBN_SETFOCUS(<id>, <memberFxn> ) afx_msg void memberFxn( )
WM_消息处理函数:
ON_WM_ACTIVATE( ) afx_msg void OnActivate( UINT, CWnd*,BOOL )
ON_WM_ACTIVATEAPP( ) afx_msg void OnActivateApp( BOOL,HANDLE )
ON_WM_ASKCBFORMATNAME( ) afx_msg void OnAskCbFormatName( UINT,LPSTR )
ON_WM_CANCELMODE( ) afx_msg void OnCancelMode( )
ON_WM_CAPTURECHANGED( ) afx_msg void OnCaptureChanged( CWnd* )
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( LPCOMPAREITEMSTRUCT )
ON_WM_CONTEXTMENU( ) afx_msg void OnContextMenu( CWnd*, CPoint )
ON_WM_COPYDATA( ) afx_msg BOOL OnCopyData( CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct )
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_DEVICECHANGE( ) afx_msg void OnDeviceChange( UINT, DWORD )
ON_WM_DEVMODECHANGE( ) afx_msg void OnDevModeChange( LPSTR )
ON_WM_DRAWCLIPBOARD( ) afx_msg void OnDrawClipboard( )
ON_WM_DRAWITEM( ) afx_msg void OnDrawItem( LPDRAWITEMSTRUCT )
ON_WM_DROPFILES( ) afx_msg void OnDropFiles( HDROP )
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_HELPINFO( ) afx_msg BOOL OnHelpInfo( HELPINFO* )
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, BOOL )
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_LBUTTONDBLCLK( ) afx_msg void OnLButtonDblClk( UINT, Cpoint )
ON_WM_LBUTTONDOWN( ) afx_msg void OnLButtonDown( UINT, CPoint )
ON_WM_LBUTTONUP( ) afx_msg void OnLButtonUp( UINT, CPoint )
ON_WM_MBUTTONDBLCLK( ) afx_msg void OnMButtonDblClk( UINT, CPoint )
ON_WM_MBUTTONDOWN( ) afx_msg void OnMButtonDown( UINT, CPoint )
ON_WM_MBUTTONUP( ) afx_msg void OnMButtonUp( UINT, CPoint )
ON_WM_MDIACTIVATE( ) 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 int OnMouseActivate( CWnd*, UINT, UINT )
ON_WM_MOUSEMOVE( ) afx_msg void OnMouseMove( UINT, CPoint )
ON_WM_MOUSEWHEEL( ) afx_msg BOOL OnMouseWheel( UINT, short, CPoint )
ON_WM_MOVE( ) afx_msg void OnMove( int, int )
ON_WM_MOVING( ) afx_msg void OnMoving( UINT, LPRECT )
ON_WM_NCACTIVATE( ) afx_msg BOOL OnNcActivate( BOOL )
ON_WM_NCCALCSIZE( ) afx_msg void OnNcCalcSize( BOOL, NCCALCSIZE_PARAMS FAR* )
ON_WM_NCCREATE( ) afx_msg BOOL OnNcCreate( LPCREATESTRUCT )
ON_WM_NCDESTROY( ) afx_msg void OnNcDestroy( )
ON_WM_NCHITTEST( ) afx_msg UINT OnNcHitTest( CPoint )
ON_WM_NCLBUTTONDBLCLK( ) afx_msg void OnNcLButtonDblClk( UINT, CPoint )
ON_WM_NCLBUTTONDOWN( ) afx_msg void OnNcLButtonDown( UINT, CPoint )
ON_WM_NCLBUTTONUP( ) afx_msg void OnNcLButtonUp( UINT, CPoint )
ON_WM_NCMBUTTONDBLCLK( ) afx_msg void OnNcMButtonDblClk( UINT, CPoint )
ON_WM_NCMBUTTONDOWN( ) afx_msg void OnNcMButtonDown( UINT, CPoint )
ON_WM_NCMBUTTONUP( ) afx_msg void OnNcMButtonUp( UINT, CPoint )
ON_WM_NCMOUSEMOVE( ) afx_msg void OnNcMouseMove( UINT, CPoint )
ON_WM_NCPAINT( ) afx_msg void OnNcPaint( )
ON_WM_NCRBUTTONDBLCLK( ) afx_msg void OnNcRButtonDblClk( UINT, CPoint )
ON_WM_NCRBUTTONDOWN( ) afx_msg void OnNcRButtonDown( UINT, Cpoint )
ON_WM_NCRBUTTONUP( ) afx_msg void OnNcRButtonUp( UINT, CPoint )
ON_WM_PAINT( ) afx_msg void OnPaint( )
ON_WM_PAINTCLIPBOARD( ) afx_msg void OnPaintClipboard( CWnd*, HANDLE )
ON_WM_PALETTECHANGED( ) afx_msg void OnPaletteChanged( CWnd* )
ON_WM_PALETTEISCHANGING( ) afx_msg void OnPaletteIsChanging( CWnd* )
ON_WM_PARENTNOTIFY( ) afx_msg void OnParentNotify( UINT, LONG )
ON_WM_QUERYDRAGICON( ) afx_msg HCURSOR OnQueryDragIcon( )
ON_WM_QUERYENDSESSION( ) afx_msg BOOL OnQueryEndSession( )
ON_WM_QUERYNEWPALETTE( ) afx_msg BOOL OnQueryNewPalette( )
ON_WM_QUERYOPEN( ) afx_msg BOOL OnQueryOpen( )
ON_WM_RBUTTONDBLCLK( ) afx_msg void OnRButtonDblClk( UINT, CPoint )
ON_WM_RBUTTONDOWN( ) afx_msg void OnRButtonDown( UINT, CPoint )
ON_WM_RBUTTONUP( ) afx_msg void OnRButtonUp( UINT, CPoint )
ON_WM_RENDERALLFORMATS( ) afx_msg void OnRenderAllFormats( )
ON_WM_RENDERFORMAT( ) afx_msg void OnRenderFormat( UINT )
ON_WM_SETCURSOR( ) afx_msg BOOL OnSetCursor( CWnd*, UINT, 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_SIZING( ) afx_msg void OnSizing( UINT, LPRECT )
ON_WM_SPOOLERSTATUS( ) afx_msg void OnSpoolerStatus( UINT, UINT )
ON_WM_STYLECHANGED( ) afx_msg void OnStyleChanged( int, LPSTYLESTRUCT )
ON_WM_STYLECHANGING( ) afx_msg void OnStyleChanging( int,LPSTYLESTRUCT )
ON_WM_SYSCHAR( ) afx_msg void OnSysChar( UINT, UINT, UINT )
ON_WM_SYSCOLORCHANGE( ) afx_msg void OnSysColorChange( )
ON_WM_SYSCOMMAND( ) afx_msg void OnSysCommand( UINT, LONG )
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_TCARD( ) afx_msg void OnTCard( UINT, DWORD )
ON_WM_TIMECHANGE( ) afx_msg void OnTimeChange( )
ON_WM_TIMER( ) afx_msg void OnTimer( UINT )
ON_WM_VKEYTOITEM( ) afx_msg int OnVKeyToItem( UINT, CWnd*, 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* lpwndpos )
ON_WM_WINDOWPOSCHANGING( ) afx_msg void OnWindowPosChanging( WINDOWPOS* lpwndpos )
ON_WM_WININICHANGE( ) afx_msg void OnWinIniChange( LPSTR )
追问
可是这与类有什么关系。
追答
仔细看了下你的问题,发现你根本就没把问题说清楚,你到底想问什么呢?
webcq
2011-10-27
知道答主
回答量:10
采纳率:0%
帮助的人:7.1万
展开全部
消息都是首先发送到目标窗口,所以首先由系统分发到达窗口类,在窗口类的消息处理回调函数中再自行分发给不同的类来响应。
追问
我想得到答案的形式是:什么样的消息具体由什么类来响应,最好都列举出来。
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式