借助工具栏在MFC中画一条线 [英] Draw a line in mfc with help of toolbar

查看:103
本文介绍了借助工具栏在MFC中画一条线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用visul basic c ++ 6.0在MFC中制作绘画应用程序,我已经使用Create函数创建了一个窗口,并且还创建了一个带有工具行的工具栏,但是我仍然坚持如何为该行编写代码,因为我知道的函数就像d.lineTo(x,y)和d.Moveto(x2,y2)一样,但是它位于行函数的下方,我如何使用OnLButtonDown来捕获共坐标,或者还有其他方法可以绘制线 ..?任何帮助都会有用

I am trying to make a paint application in MFC using visul basic c++ 6.0 i have already created a window using Create function and also have created a toolbar with a tool line but i am stuck on how to code for the line because the function i know goes like d.lineTo(x,y) and d.Moveto(x2,y2) but it comes under the line function how do i use OnLButtonDown to Trap the co-ordiantes or is there any other way i can draw a line ..? any help will be useful

推荐答案

看看MFC Scribble教程: http://msdn.microsoft.com/en -us/library/aa716527%28v = vs.60%29.aspx )

have a look at the MFC Scribble tutorial : http://msdn.microsoft.com/en-us/library/aa716527%28v=vs.60%29.aspx)

它将帮助您开始如何处理鼠标单击以及鼠标移动和绘制.

It will get you started on how to handling mouse click and mouse move and drawing.

M.

这篇关于借助工具栏在MFC中画一条线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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