关于WM_CREATE消息的问题
在SDK风格的程序中总有一个逻辑顺序是注册窗口类-创建窗口-显示窗口-更新窗口-消息循环,然后窗口的回调函数用switch来响应不同的消息。但在MFC中却是用Oncrea...
在SDK风格的 程序中 总有一个逻辑顺序是 注册窗口类-创建窗口-显示窗口-更新窗口-消息循环 ,然后窗口的回调函数用switch来响应不同的消息。
但在MFC中却是用Oncreate()函数来响应WM_CREATE消息创建窗口。+那在SDK风格的程序中怎么没见哪里响应WM_CREATE消息的就成功创建了窗口? 展开
但在MFC中却是用Oncreate()函数来响应WM_CREATE消息创建窗口。+那在SDK风格的程序中怎么没见哪里响应WM_CREATE消息的就成功创建了窗口? 展开
2个回答
展开全部
MSDN写得很清楚:
WM_CREATE Notification
The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.
A window receives this message through its WindowProc function.
WM_CREATE Notification
The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.
A window receives this message through its WindowProc function.
追问
也就是说在SDK风格的程序中也受到了WM_CREATE消息,只是窗口过程函数的switch没写怎么处理它就default处理了。但还是响应了,对吧。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询