MFC:将图像添加到矩形 [英] MFC: Adding image to a rectangle

查看:156
本文介绍了MFC:将图像添加到矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在编写MFC应用程序.我有一个CRect对象,想要向该矩形添加.gif图像.
您能告诉我该怎么做吗?


问候
paryj

Hi,
I am writing an MFC application. I have a CRect object and want to add an .gif image to this rectangle.
Can you please show me how that can be done.


Regards
paryj

推荐答案

嘿,这个傻瓜,
以下示例可能会对您有所帮助,

Gif图片显示

一个简单的显示鼠标gif的mfc应用程序.
Hey this santosh,
following example may help you,

Gif Image display

simple mfc application that shows mouse gif.


您可以使用 ^ ]类(或直接GDI+ Image类),然后绘制(使用绘制 [ ^ ]方法)位于OnPaint处理程序.
You may load the GIF image using CImage[^] class (or directly GDI+ Image class) and then draw (use the Draw[^] method) in inside the OnPaint handler.


这篇关于MFC:将图像添加到矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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