我如何处理鼠标点击 [英] How Can I Handling Mouse Clicks

查看:105
本文介绍了我如何处理鼠标点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我在C和C ++中遇到鼠标处理功能问题。

例如我在指定位置有一个音符(例如X = 10,Y = 10)我想要的时候鼠标指针进入该位置并单击它(左键单击),注意更改的颜色。

i使用Visual Studio 2012和我研究该baut的库,我没有找到任何东西。 :||

解决方案

阅读 MSDN 。在lParam中是坐标,所以你可以在消息处理程序中处理它。



提示:使用PostMessage和用户定义的消息处理你的用例。

hey guys, i have problem with mouse handling functions in C and C++.
for example i have a note in Specified position (for example X=10,Y=10) and i wanna when mouse Pointer go in that positin and click on it (left click) , the color of note change.
i use Visual studio 2012 and i research in libries of that baut i dont found any thing. :||

解决方案

Read the MSDN. In the lParam are the coordinates, so you can handle it in the message handler.

Tip: Use PostMessage with a user defined message to handler your use case.


这篇关于我如何处理鼠标点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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