术语 | getclasslong |
释义 | GetClassLong 语法: DWORD GetClassLong( HWND hWnd, int nIndex ); GetClassLong功能 该GetClassLong函数检索指定的32位(长)从指定的窗口关联的WNDCLASSEX结构的价值。 参数 hWnd [in]的窗口句柄,并间接地类所属的窗口。 nIndex [in]指定的32位值来检索。从该增加课时内存32位的值,指定的积极,从零开始的字节偏移的价值要检索。有效值范围在零通过额外的类内存的字节数,再减去4,例如,如果您指定了12个或多个字节内存的增加课时,为8价值将是第三个32位整数指数。要检索的任何WNDCLASSEX结构,其他值指定以下值之一。 GCW_ATOM 检索一个原子值唯一标识窗口类。这是相同的原子是RegisterClassEx函数返回。 GCL_CBCLSEXTRA 检索的大小,以字节为单位,与类相关的额外的内存。 GCL_CBWNDEXTRA 检索的大小,以字节为单位,额外的窗口,类中的每个窗口相关的内存。有关如何访问此内存的信息,请参阅GetWindowLong。 GCL_HBRBACKGROUND 检索的句柄与背景刷类关联。 GCL_HCURSOR 检索句柄与类相关的光标。 GCL_HICON 检索句柄与类相关的图标。 GCL_HICONSM 检索的句柄小图标与类相关联。 GCL_HMODULE 检索模块句柄注册类。 GCL_MENUNAME 检索的地址菜单名称字符串。该字符串标识菜单资源与类相关联。 GCL_STYLE 获取窗口类样式位。 GCL_WNDPROC 检索的地址窗口过程,或办理代表窗口过程的地址。您必须使用CallWindowProc函数来调用窗口过程。 返回值 如果函数成功,返回值是所要求的32位值。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 通过指定储备在与RegisterClassEx函数所使用的WNDCLASSEX结构cbClsExtra成员非零值增加课时的内存。 在Windows 95/98/Me:GetClassLongW是支持的Unicode(MSLU)微软层。请注意,此功能后续调用将覆盖以前呼吁的结果,所以您必须保存任何结果,您要使用更高版本。若要使用此版本,您必须添加一些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。 功能信息 最低DLL版本 user32.dll 在Winuser.h中HeaderDeclared,头文件:winuser.h import libraryUser32.lib 最低操作系统Windows 95,Windows NT 3.1 UnicodeImplemented为ANSI和Unicode版本。 参见 窗口类的概述,GetClassLongPtr,GetWindowLong,RegisterClassEx,SetClassLong,窗口类 ==英文原文==GetClassLong Function The GetClassLong function retrieves the specified 32-bit (long) value from the WNDCLASSEX structure associated with the specified window. Syntax DWORD GetClassLong( HWND hWnd, int nIndex ); Parameters hWnd [in] Handle to the window and, indirectly, the class to which the window belongs. nIndex [in] Specifies the 32-bit value to retrieve. To retrieve a 32-bit value from the extra class memory, specify the positive, zero-based byte offset of the value to be retrieved. Valid values are in the range zero through the number of bytes of extra class memory, minus four; for example, if you specified 12 or more bytes of extra class memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value from the WNDCLASSEX structure, specify one of the following values. GCW_ATOM Retrieves an ATOM value that uniquely identifies the window class. This is the same atom that the RegisterClassEx function returns. GCL_CBCLSEXTRA Retrieves the size, in bytes, of the extra memory associated with the class. GCL_CBWNDEXTRA Retrieves the size, in bytes, of the extra window memory associated with each window in the class. For information on how to access this memory, see GetWindowLong . GCL_HBRBACKGROUND Retrieves a handle to the background brush associated with the class. GCL_HCURSOR Retrieves a handle to the cursor associated with the class. GCL_HICON Retrieves a handle to the icon associated with the class. GCL_HICONSM Retrieves a handle to the small icon associated with the class. GCL_HMODULE Retrieves a handle to the module that registered the class. GCL_MENUNAME Retrieves the address of the menu name string. The string identifies the menu resource associated with the class. GCL_STYLE Retrieves the window-class style bits. GCL_WNDPROC Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure. Return Value If the function succeeds, the return value is the requested 32-bit value. If the function fails, the return value is zero. To get extended error information, call GetLastError . Remarks Reserve extra class memory by specifying a nonzero value in the cbClsExtra member of the WNDCLASSEX structure used with the RegisterClassEx function. Windows 95/98/Me: GetClassLongW is supported by the Microsoft Layer for Unicode (MSLU). Note that subsequent calls to this function will overwrite the results of previous calls, so you must save any results that you want to use later. To use this version, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems . Function Information Minimum DLL Versionuser32.dll HeaderDeclared in Winuser.h, include Windows.h Import libraryUser32.lib Minimum operating systemsWindows 95, Windows NT 3.1 UnicodeImplemented as ANSI and Unicode versions. See Also Window Classes Overview , GetClassLongPtr , GetWindowLong , RegisterClassEx , SetClassLong , WNDCLASSEX ==原始网址==http://msdn.microsoft.com/en-us/library/ms633580(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。