cpubbs论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

LabVIEW+单片机学习套件全套教程资料下载[免费]LabVIEW论坛精华列表贴USB0816数据采集卡《LabVIEW宝典》
LabWindows/CVI论坛精华贴NET0816以太网数据采集卡RC0210远程设备授权系统 关闭关停锁定打开设备 户外分布式数据采集
NET1624低速高精度以太网数据采集卡WIFI0824SD无线WIFI网络数据采集卡脱机运行 SD存储 小尺寸微型 串口采集远程采集 安卓 手持移动采集 纪录仪
查看: 1539|回复: 6

请问如何获取图形控件上鼠标所到点的坐标值?

[复制链接]
发表于 2008-6-14 16:47:54 | 显示全部楼层 |阅读模式
请问如何获取图形控件上鼠标所到点的坐标值?
发表于 2008-6-14 16:50:21 | 显示全部楼层
兄弟说的是哪个控件?
发表于 2008-6-14 17:05:41 | 显示全部楼层
Obtains information about the state of the mouse cursor. xCoordinate and yCoordinate return the position of the mouse relative to the top and left coordinates of a specific control. If you pass zero as the controlID, the coordinate information references the top and left coordinates of the panel, excluding the panel frame and title bar. GetRelativeMouseState returns the coordinates even if the mouse is not over the control or the panel.



Prototype

int GetRelativeMouseState (int Panel_Handle, int Control_ID, int *XCoordinate, int *YCoordinate, int *Left_Button_Down, int *Right_Button_Down, int *Key_Modifiers);
发表于 2008-6-14 17:06:08 | 显示全部楼层
兄弟可以看看这个,不知道您要的是不是这样的!
发表于 2008-6-14 17:38:36 | 显示全部楼层
还有就是可以用这个图形控件的事件,鼠标事件的event data中就有鼠标坐标的信息
 楼主| 发表于 2008-6-14 21:35:34 | 显示全部楼层
谢谢以上各位,这个问题我自己解决了
发表于 2008-6-14 22:11:35 | 显示全部楼层


解决了得共享经验给大家学习,呵呵!多谢兄弟!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|cpubbs论坛. ( 粤ICP备09171248号 )

GMT+8, 2025-4-21 05:02 , Processed in 0.594183 second(s), 7 queries , Gzip On, File On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表