在MFC中在PictureBox中绘制矩形 [英] draw rectangle in picturebox in mfc

查看:297
本文介绍了在MFC中在PictureBox中绘制矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在图片框中绘制一个矩形并用颜色填充它.

在此先感谢
CoderDinesh

解决方案

请参见在位图上绘制线条,形状或文本" [ ^ ].


使用Windows图形设备界面(GDI)可以轻松完成此操作...搜索如何使用它(google).

I want to draw a rectangle in picturebox and fill it with color.

Thanks in Advance
CoderDinesh

解决方案

See here[^].


I suppose your Picture Box is a CStatic. You may use its GetBitmap method and then draw on it, as shown, for instance, in the following article: "Drawing lines, shapes, or text on bitmaps"[^].


This is easy to do with the Windows Graphics Device Interface (GDI)... do a search for how to use it (google).


这篇关于在MFC中在PictureBox中绘制矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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