SetClassLongPtr 是替代SetClassLong这个函数,具体可以查查CSDN,
////////////////////////////////////////////////////////////////////////////////////////////////
The
SetClassLongPtr function replaces the specified value at the specified offset in the extra class memory or the
WNDCLASSEX structure for the class to which the specified window belongs
This function supersedes the SetClassLong function. To write code that is compatible with both 32-bit and 64-bit Microsoft Windows, use SetClassLongPtr.
- hWnd
- [in] Handle to the window and, indirectly, the class to which the window belongs.
- nIndex
- [in] Specifies the value to replace. To set a value in the extra class memory, specify the positive, zero-based byte offset of the value to be set. Valid values are in the range zero through the number of bytes of extra class memory, minus eight; for example, if you specified 24 or more bytes of extra class memory, a value of 16 would be an index to the third integer. To set a value other than the WNDCLASSEX structure, specify one of the following values.
- GCL_CBCLSEXTRA
- Sets the size, in bytes, of the extra memory associated with the class. Setting this value does not change the number of extra bytes already allocated.
- GCL_CBWNDEXTRA
- Sets the size, in bytes, of the extra window memory associated with each window in the class. Setting this value does not change the number of extra bytes already allocated. For information on how to access this memory, see SetWindowLongPtr.
- GCLP_ HBRBACKGROUND
- Replaces a handle to the background brush associated with the class.
- GCLP_HCURSOR
- Replaces a handle to the cursor associated with the class.
- GCLP_HICON
- Replaces a handle to the icon associated with the class.
- GCLP_HICONSM
- Retrieves a handle to the small icon associated with the class.
- GCLP_HMODULE
- Replaces a handle to the module that registered the class.
- GCLP_MENUNAME
- Replaces the pointer to the menu name string. The string identifies the menu resource associated with the class.
- GCL_STYLE
- Replaces the window-class style bits.
- GCLP_WNDPROC
- Replaces the pointer to the window procedure associated with the class.
- dwNewLong
- [in] Specifies the replacement value.
[此贴子已经被作者于2007-11-15 20:04:21编辑过]