术语 | loadcursor |
释义 | LoadCursor 语法: HCURSOR LoadCursor( HINSTANCE hInstance, LPCTSTR lpCursorName ); LoadCursor函数 该LoadCursor函数加载的可执行(。exe指定的光标资源)文件与一个应用程序实例。 注意:此功能已被取代的LoadImage函数。 参数 hInstance [in]句柄模块的可执行文件的实例包含光标移动到加载。 lpCursorName [in]指向一个空结束的字符串,其中包含光标资源的名称被加载。另外,此参数可以包括在低位字资源标识符和高位字为零。该MAKEINTRESOURCE宏也可以用来创建此值。要使用预定义的游标一,应用程序必须HINSTANCE参数设置为NULL和lpCursorName参数之一以下值: IDC_APPSTARTING 标准的箭头和小沙漏 IDC_ARROW 标准的箭头 IDC_CROSS 十字线 IDC_HAND Windows 98/Me中时,Windows 2000/XP的:手 IDC_HELP 箭头和问号 IDC_IBEAM 工字钢 IDC_ICON 过期标志申请4.0或更高版本。 IDC_NO 削减圈 IDC_SIZE 过期标志申请4.0或更高版本。使用IDC_SIZEALL。 IDC_SIZEALL 四向箭头指向北,南,东,西 IDC_SIZENESW 双箭头指出,东北和西南 IDC_SIZENS 双箭头指出,北方和南方 IDC_SIZENWSE 双箭头指出,西北和东南 IDC_SIZEWE 双箭头指出,西部和东部地区 IDC_UPARROW 垂直箭头 IDC_WAIT 沙漏 返回值 如果函数成功,返回值是处理到新加载的光标。 如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。 备注 该LoadCursor函数加载光标资源仅当它有没有被加载,否则,它检索处理现有的资源。这个函数返回一个有效的光标句柄只有当lpCursorName参数是一个光标资源的指针。如果lpCursorName是任何资源比游标(如图标),返回值不为NULL,即使它不是一个有效的游标处理其他类型的指针。 该LoadCursor功能搜索最光标资源为当前光标适当的显示设备。光标资源可以是彩色或黑白位图。 在Windows 95/98/Me:LoadCursorW是支持的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版本。 参见 简介游标,的LoadImage,MAKEINTRESOURCE,SetCursor,SetCursorPos,ShowCursor ==英文原文==LoadCursor Function The LoadCursor function loads the specified cursor resource from the executable (.EXE) file associated with an application instance. Note This function has been superseded by the LoadImage function. Syntax HCURSOR LoadCursor( HINSTANCE hInstance, LPCTSTR lpCursorName ); Parameters hInstance [in] Handle to an instance of the module whose executable file contains the cursor to be loaded. lpCursorName [in] Pointer to a null-terminated string that contains the name of the cursor resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCE macro can also be used to create this value. To use one of the predefined cursors, the application must set the hInstance parameter to NULL and the lpCursorName parameter to one the following values: IDC_APPSTARTING Standard arrow and small hourglass IDC_ARROW Standard arrow IDC_CROSS Crosshair IDC_HAND Windows 98/Me, Windows 2000/XP: Hand IDC_HELP Arrow and question mark IDC_IBEAM I-beam IDC_ICON Obsolete for applications marked version 4.0 or later. IDC_NO Slashed circle IDC_SIZE Obsolete for applications marked version 4.0 or later. Use IDC_SIZEALL. IDC_SIZEALL Four-pointed arrow pointing north, south, east, and west IDC_SIZENESW Double-pointed arrow pointing northeast and southwest IDC_SIZENS Double-pointed arrow pointing north and south IDC_SIZENWSE Double-pointed arrow pointing northwest and southeast IDC_SIZEWE Double-pointed arrow pointing west and east IDC_UPARROW Vertical arrow IDC_WAIT Hourglass Return Value If the function succeeds, the return value is the handle to the newly loaded cursor. If the function fails, the return value is NULL. To get extended error information, call GetLastError . Remarks The LoadCursor function loads the cursor resource only if it has not been loaded; otherwise, it retrieves the handle to the existing resource. This function returns a valid cursor handle only if the lpCursorName parameter is a pointer to a cursor resource. If lpCursorName is a pointer to any type of resource other than a cursor (such as an icon), the return value is not NULL, even though it is not a valid cursor handle. The LoadCursor function searches the cursor resource most appropriate for the cursor for the current display device. The cursor resource can be a color or monochrome bitmap. Windows 95/98/Me: LoadCursorW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems . Example For an example, see Creating a Cursor . 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 Cursors Overview , LoadImage , MAKEINTRESOURCE , SetCursor , SetCursorPos , ShowCursor ==原始网址==http://msdn.microsoft.com/en-us/library/ms648391(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。