请问下点击选择是怎么实现的?

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
happybamboo
Knows some wx things
Knows some wx things
Posts: 27
Joined: Tue Sep 16, 2008 4:19 am

请问下点击选择是怎么实现的?

Post by happybamboo » Mon Nov 23, 2009 8:33 am

比如说我在canvas上画了一些线(黑色),怎么样才能实现点击一下某条线,此线的颜色变成红色。是每条线都定好坐标,然后按鼠标点击的坐标来判断选择的哪条线,然后重画那条线吗?有没有其他方法?

auronc
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Nov 13, 2009 7:40 am

Post by auronc » Tue Nov 24, 2009 1:46 am

Reference below link:
http://www.codeproject.com/KB/GDI/CSimpleDraw.aspx

But the code is written by MFC. :lol:

happybamboo
Knows some wx things
Knows some wx things
Posts: 27
Joined: Tue Sep 16, 2008 4:19 am

Post by happybamboo » Mon Nov 30, 2009 12:52 am

auronc wrote:Reference below link:
http://www.codeproject.com/KB/GDI/CSimpleDraw.aspx

But the code is written by MFC. :lol:
这个下载不了代码啊。。。。。

auronc
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Nov 13, 2009 7:40 am

Post by auronc » Mon Nov 30, 2009 7:39 am

Sign up first.

Post Reply