网站首页  词典首页

请输入您要查询的函数:

 

术语 setcaretpos
释义 SetCaretPos
语法:
BOOL SetCaretPos( int X,
int Y
);
SetCaretPos功能
该SetCaretPos函数移动插入到指定的坐标。如果窗口拥有插入符创建与CS_OWNDC类的样式,然后指定坐标受到与该窗口的设备上下文关联的映射模式。
参数
X
[in]指定新的x坐标插入符。
y
[in]指定新的y坐标插入符。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
SetCaretPos移动插入是否插入符号是隐藏的。
该系统提供每个队列插入。窗口应建立一个插入只有当它具有键盘焦点或处于活动状态。窗口前应销毁失去键盘焦点变为非活动状态或插入符。窗口可以设置插入符位置只有当它拥有插入符。
例如
有关示例,请参阅创建和显示光标。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
插入号概况,GetCaretPos,HideCaret,ShowCaret
==英文原文==SetCaretPos Function
The SetCaretPos function moves the caret to the specified coordinates. If the window that owns the caret was created with the CS_OWNDC class style, then the specified coordinates are subject to the mapping mode of the device context associated with that window.
Syntax
BOOL SetCaretPos( int X,
int Y
);
Parameters
X
[in] Specifies the new x-coordinate of the caret.
Y
[in] Specifies the new y-coordinate of the caret.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
SetCaretPos moves the caret whether or not the caret is hidden.
The system provides one caret per queue. A window should create a caret only when it has the keyboard focus or is active. The window should destroy the caret before losing the keyboard focus or becoming inactive. A window can set the caret position only if it owns the caret.
Example
For an example, see Creating and Displaying a Caret .
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
Carets Overview , GetCaretPos , HideCaret , ShowCaret
==原始网址==http://msdn.microsoft.com/en-us/library/ms648405(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:17:57