鼠标消息处理流程

类别:VC语言 点击:0 评论:0 推荐:

                                                                                                                                        

                                                                                                            
 当用户在画板上按下鼠标时,WINDOWS将鼠标消息放在主框架窗口消息队列中
MFC接收到此消息后,先将其转化,然后最先传送鼠标消息给视图
对象,若视图类没有在视图类消息映射表中对此消息进行映射
(即视图没有提供处理器),则MFC重发消息给文档对象。若文档类
消息映射表中没有对此消息进行映射,则MFC重发该消息给主窗口类处理,
若主窗口也没有,则发给应用程序。若还没有映射处理,则按缺省处理。
 因此,应在视图中添加鼠标消息处理函数。
        

                                                                                                                       

                                                                                                                                                                                                                                         

本文地址:http://com.8s8s.com/it/it3216.htm