深入浅出MFC学习笔记 第三章 MFC六大关键技术之仿真
0:mfc类层次结构
1:mfc程序的初始化过程
cwinapp::initapplication()
cmywinapp::initinstance()
cmyframewnd::cmyframewnd()
cframewnd::create()
cwnd:createex()
cframewnd::precreatewindow()
cwinapp::run()
cwinthread::run()
2:rtti[cruntimeclass]
declare_dynamic
implement_dynamic
3:动态创建
declare_dyncreate
implement_dyncreate
4:永久保存
declare_serial
implement_serial
5:message map
declare_message_map
begin_message_map
on_command
end_message_map
沿着基类传递,注意cwinthread并不属于消息传递网
6:command routing
wm_command消息(其他消息沿基类传递)
cframewnd消息:cview/cdocument/cframewnd/cwinapp
cview消息:cview/cdocument
代码执行流程:
afxwndproc()
afxcallwndproc()
cwnd::windowproc()
cframewnd::oncommand()
cwnd::oncommand()
cframewnd::oncmdmsg()
cframewnd::getactiveview()
cview::oncmdmsg()
ccmdtarget::oncmdmsg()
...
上一篇: Go学习笔记04-函数