CreateWindow失败的原因

Before returning, CreateWindow sends a WM_CREATE message to the window procedure. For overlapped, pop-up, and child windows, CreateWindow sends WM_CREATE, WM_GETMINMAXINFO, and WM_NCCREATE messages to the window. The lParam parameter of the WM_CREATE message contains a pointer to a CREATESTRUCT structure. If the WS_VISIBLE style is specified, CreateWindow sends the window all the messages required to activate and show the window.
If the created window is a child window, its default position is at the bottom of the Z-order. If the created window is a top-level window, its default position is at the top of the Z-order (but beneath all topmost windows unless the created window is itself topmost).
For information on controlling whether the Taskbar displays a button for the created window, see Managing Taskbar Buttons.
For information on removing a window, see the DestroyWindow function.
The following predefined system classes can be specified in the lpClassName parameter. Note the corresponding control styles you can use in the dwStyle parameter.


在返回之前,CreateWindow会向窗口过程发送WM_CREATE消息。对于重叠,弹出窗口和子窗口,CreateWindow将WM_CREATE,WM_GETMINMAXINFO和WM_NCCREATE消息发送到窗口。 WM_CREATE消息的lParam参数包含指向CREATESTRUCT结构的指针。如果指定了WS_VISIBLE样式,则CreateWindow会向窗口发送激活和显示窗口所需的所有消息。
如果创建的窗口是子窗口,则其默认位置位于Z顺序的底部。如果创建的窗口是顶级窗口,则其默认位置位于Z顺序的顶部(但在所有最顶层窗口之下,除非创建的窗口本身位于最顶层)。
有关控制任务栏是否显示已创建窗口的按钮的信息,请参阅管理任务栏按钮。
有关删除窗口的信息,请参阅DestroyWindow函数。
可以在lpClassName参数中指定以下预定义的系统类。请注意可以在dwStyle参数中使用的相应控件样式。


但是在CreateWindow创建窗口时,系统回调窗口过程,需要窗口过程返回非0值,CreateWindow才能创建成功。

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值