在文本框中找到字符串的x,y点 [英] Find the x, y point of a string within a text box

查看:48
本文介绍了在文本框中找到字符串的x,y点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以在文本框中为字符串返回一个点?我发现了一个COM函数 GetTextExtentPoint 将返回字符串的长度,但是我想知道字符串的起始点.

Is there a way to return a point for a string within a text box? I found a COM function GetTextExtentPoint that will return the length of a string, but I want to know the point where the string starts.

推荐答案

您正在寻找

You're looking for the GetPositionFromCharIndex method.

这篇关于在文本框中找到字符串的x,y点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆