在MFC中在PictureBox中绘制矩形 [英] draw rectangle in picturebox in mfc
本文介绍了在MFC中在PictureBox中绘制矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在图片框中绘制一个矩形并用颜色填充它.
在此先感谢
CoderDinesh
解决方案
请参见 ^ ].
我想您的图片框是CStatic
.您可以使用其GetBitmap
方法,然后在其上进行绘制,例如,如以下文章中所示:在位图上绘制线条,形状或文本" [ ^ ].
使用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 aCStatic
. You may use itsGetBitmap
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屋!
查看全文