Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Windows API function SetClassLong

Shulou Source: shulou.com Published: 2022-06-03 05:36:54 11月17日 Update

How to use the Windows API function SetClassLong? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

Windows API function: SetClassLong

SetClassLong is often used to replace cursor styles to add aesthetics.

DWORD SetClassLong (

HWND hWnd, / / handle of window (window handle)

Int nIndex, / / index of value to change (property set)

LONG dwNewLong / / new value (the value of the property set)

);

Nlndex attribute index GCL_CBCLSEXTRA:

/ / sets the byte size of the size associated with the class. Setting this value does not change the number of additional bytes that have been allocated.

GCL_CBWNDEXTRA:

/ / sets the byte size of the size associated with each window in the class. Setting this value does not change the number of additional bytes allocated. To see how to get into this memory, see SetWindowLOng.

GCL_HERBACKGROUND:

/ / replace the handle to the background brush associated with the class.

GCL_HCURSOR:

/ / replace the handle to the cursor associated with the class. {replace the cursor icon in the specified window, and dwNewLong reads the cursor position such as' 1.ani'}

GCL_HICON:

/ / replace the handle to the icon associated with the class. {replace the program icon in the specified window, dwNewLong read icon location such as' 1.ico'}

GCL_HMODULE:

/ / replace the handle to the module of the registered class.

GCL_STYLE:

/ / replace the style bit of the window class.

CGL_MENUNAME:

/ / replace the address of the menu name string. The string identifies the menu resource associated with the class.

GCL_WNDPROC:

/ / replace the address of the window procedure associated with the window class.

The answer to the question about how to use the Windows API function SetClassLong is shared here. I hope the above content can be of some help to everyone. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Tags: Handles related cursors icons bytes functions properties questions locations addresses sizes characters strings dimensions more menus assignments help answers easy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn Shulou Technology Docker Xiaomi