<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:??; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
通过子类化的方式,子类化之后,对象类跟窗口被绑定在一起,同时被子类化的会接管 windowProc 的消息处理。
2. windowProc:
windowProc 消息是 MFC 中消息处理函数,该函数会检查消息映射表,通过检查消息映射表来查寻是否有待处理的信息,如果有派生类,基类的存在,会逐一从派生类到基类的消息映射表中查询,是一种分散的消息处理机制。
3. windows message send/receive
Window message 是一种统一的消息处理机制,跟上述的 windowProc 消息不一样。通过 getMessge,pretransalateMessage, transform message, dispatch message 的流程进行检测及处理。没有处理的消息会被放入到一个消息队列中,也可以通过 send message, post message 发送, send message 是同步处理会被放入消息队列, post message 是异步处理,直接传递给指定的窗口。