DUILib学习笔记---消息处理
2016-12-11 16:11
330 查看
WIN32下窗口消息循环
1.消息循环,在CPaintManagerUI::MessageLoop()
--------duilib中增加了一个消息预处理,类似MFC::PreTranslateMessage()
MSG msg = { 0 };
while( ::GetMessage(&msg, NULL, 0, 0) )
{
if( !CPaintManagerUI::PreTranslateMessage(&msg) )//自己更改,原源码为TranslateMessage(&msg)
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
如下图:
2.CPaintManagerUI::PreTranslateMessage(&msg)处理做了什么事情
---2.1判断是否具有WS_CHILD属性
---2.2具有WS_CHILD风格属性时,先判断m_aPreMessages有无数据
MSG msg = { 0 }; while( ::GetMessage(&msg, NULL, 0, 0) ) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); }
1.消息循环,在CPaintManagerUI::MessageLoop()
--------duilib中增加了一个消息预处理,类似MFC::PreTranslateMessage()
MSG msg = { 0 };
while( ::GetMessage(&msg, NULL, 0, 0) )
{
if( !CPaintManagerUI::PreTranslateMessage(&msg) )//自己更改,原源码为TranslateMessage(&msg)
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
如下图:
2.CPaintManagerUI::PreTranslateMessage(&msg)处理做了什么事情
---2.1判断是否具有WS_CHILD属性
---2.2具有WS_CHILD风格属性时,先判断m_aPreMessages有无数据
相关文章推荐
- VC++学习笔记之消息处理机制和窗口过程函数
- Android应用开发学习笔记之多线程与Handler消息处理机制
- MFC学习笔记——CDialog(为控件添加消息处理函数)
- [原创]java WEB学习笔记69:Struts2 学习之路-- 消息处理与国际化,概述,配置国际资源文件,访问国际化消息,通过超链接切换语言
- Akka学习笔记:Actor消息处理-请求和响应(2)
- Android消息处理学习笔记
- 【Darwin学习笔记】之QTSSReflectorModule的Setup消息处理
- 第108讲:Akka中的Actor消息的处理、消息回复、消息转发学习笔记
- C++ Primer 学习笔记_56_类与数据抽象 -消息处理示例
- SOAP消息的创建,传递,处理的学习笔记
- mfc学习笔记之如何修改mfc消息机制处理顺序
- Win32学习笔记——消息处理
- DXUT 学习笔记(3)对键盘鼠标的响应 及 消息处理
- Socket网络编程学习笔记(4):TCP消息边界处理
- 【VS2010学习笔记】【函数学习】一(MFC+OpenCV2.4.7读取摄像头之WM_TIMER消息处理函数的添加问题)
- Android应用开发学习笔记之多线程与Handler消息处理机制
- Akka学习笔记:Actor消息处理-请求和响应(1)
- 【Darwin学习笔记】之QTSSReflectorModule的Announce消息处理
- 解析duilib 消息处理函数-笔记1
- Akka学习笔记:Actor消息处理-请求和响应(1)