Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function replaces the specified 32-bit ( LONG) value at the specified offset into the extra class memory of the WNDCLASSstructure for the class to which the specified window belongs.
DWORD SetClassLong( HWND hWnd , int nIndex , LONG dwNewLong );
Parameters
If a mouse cursor is supported, this parameter can be set to the following value:
Value | Description |
---|---|
GCL_HCURSOR | Replaces a handle to the cursor associated with the
class.
Windows CE versions that support mouse cursors include the Iconcurs and Mcursor components rather than the Icon and Cursor components. |
Return Values
The previous value of the specified 32-bit integer indicates success. Zero indicates that the value was not previously set or that the function failed. To get extended error information, call GetLastError.
Remarks
Reserve extra class memory by specifying a nonzero value in the cbClsExtramember of the WNDCLASSstructure used with the RegisterClassfunction.
Unaligned access is not supported.
Use the SetClassLongfunction with care. For example, it is possible to change the background color for a class by using SetClassLong, but this change does not immediately repaint all windows belonging to the class.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
GetClassLong, GetLastError, RegisterClass, SetWindowLong, WindowProc, WNDCLASS