justin566 发表于 2008-6-14 16:47:54

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

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

cpubbs 发表于 2008-6-14 16:50:21

兄弟说的是哪个控件?

cpubbs 发表于 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);

cpubbs 发表于 2008-6-14 17:06:08

兄弟可以看看这个,不知道您要的是不是这样的!

sunshuai03 发表于 2008-6-14 17:38:36

还有就是可以用这个图形控件的事件,鼠标事件的event data中就有鼠标坐标的信息

justin566 发表于 2008-6-14 21:35:34

谢谢以上各位,这个问题我自己解决了

cpubbs 发表于 2008-6-14 22:11:35

allqq-mogudiandian-49all

解决了得共享经验给大家学习,呵呵!多谢兄弟!
页: [1]
查看完整版本: 请问如何获取图形控件上鼠标所到点的坐标值?