网站首页  词典首页

请输入您要查询的函数:

 

术语 createcursor
释义 CreateCursor
语法:
HCURSOR CreateCursor( HINSTANCE hInst,
int xHotSpot,
int yHotSpot,
int nWidth,
int nHeight,
const VOID *pvANDPlane,
const VOID *pvXORPlane
);
CreateCursor功能
该CreateCursor函数创建一个游标具有指定的大小,位模式和热点。
参数
hInst
[in]句柄的创建游标应用程序的当前实例。
xHotSpot
[in]指定光标的热点Level位置。
yHotSpot
[in]指定光标的热点垂直位置。
nWidth
[in]指定的宽度,以像素为单位的光标。
nHeight
[in]指定的高度,以像素为单位的光标。
pvANDPlane
[in]指向一个字节数组,它包含了与掩盖光标在一个设备,依赖单色位的位值。
pvXORPlane
[in]指向一个字节数组,包含光标的异或掩盖位值,如在依赖于设备的单色位图。
返回值
如果函数成功,返回值是一个光标句柄。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
在nWidth和nHeight参数必须指定一个宽度和高度,是由当前的显示驱动程序支持,因为系统无法创建其他大小游标。要确定的宽度和高度显示驱动支持,使用GetSystemMetrics函数,指定SM_CXCURSOR或SM_CYCURSOR价值。
在结束前,应用程序必须调用DestroyCursor函数来释放任何系统与光标相关的资源。
例如
有关示例,请参阅创建光标。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
游标概述,CreateIcon,DestroyCursor,GetModuleHandle,GetSystemMetrics,SetCursor
==英文原文==CreateCursor Function
The CreateCursor function creates a cursor having the specified size, bit patterns, and hot spot.
Syntax
HCURSOR CreateCursor( HINSTANCE hInst,
int xHotSpot,
int yHotSpot,
int nWidth,
int nHeight,
const VOID *pvANDPlane,
const VOID *pvXORPlane
);
Parameters
hInst
[in] Handle to the current instance of the application creating the cursor.
xHotSpot
[in] Specifies the horizontal position of the cursor's hot spot.
yHotSpot
[in] Specifies the vertical position of the cursor's hot spot.
nWidth
[in] Specifies the width, in pixels, of the cursor.
nHeight
[in] Specifies the height, in pixels, of the cursor.
pvANDPlane
[in] Pointer to an array of bytes that contains the bit values for the AND mask of the cursor, as in a device-dependent monochrome bitmap.
pvXORPlane
[in] Pointer to an array of bytes that contains the bit values for the XOR mask of the cursor, as in a device-dependent monochrome bitmap.
Return Value
If the function succeeds, the return value is a handle to the cursor.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The nWidth and nHeight parameters must specify a width and height that are supported by the current display driver, because the system cannot create cursors of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXCURSOR or SM_CYCURSOR value.
Before closing, an application must call the DestroyCursor function to free any system resources associated with the cursor.
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 Unicode version.
See Also
Cursors Overview , CreateIcon , DestroyCursor , GetModuleHandle , GetSystemMetrics , SetCursor
==原始网址==http://msdn.microsoft.com/en-us/library/ms648385(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:26:36