WNDCLASS问题

来源:百度知道 编辑:UC知道 时间:2024/05/30 05:34:12
WNDCLASS结构中的cbClsExtra和cbWndExtra两个类型有什么作用?
预留的空间是用来做什么的

用于在窗口类别结构和Windows内部保存的窗口结构中预留一些额外空间
程序可以根据需要来使用预留的空间 一般把它们值设为0

cbClsExtra
Specifies the number of extra bytes to allocate following the window-class structure. The system initializes the bytes to zero.
cbWndExtra
Specifies the number of extra bytes to allocate following the window instance. The system initializes the bytes to zero. If an application uses WNDCLASS to register a dialog box created by using the CLASS directive in the resource file, it must set this member to DLGWINDOWEXTRA.