如何在MFC C ++中绘制PNG图像 [英] how to draw PNG image in MFC C++

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

问题描述

您好,我想在基于MFC的对话框应用程序上绘制png图像。

任何人都可以帮助我吗? THanks。

Hello, i want to draw png image on my MFC based dialog application.
Can anyone help me? THanks.

推荐答案

我想,VC6仍然可以通过平台SDK访问gDI +。 GDI +可以加载png,以及jpg,gif,tiff。
VC6 still had access to gDI+, I thought, via the platform SDK. GDI+ can load png, as well as jpg, gif, tiff.


你可以使用 CImage [ ^ ]。



从文档页面中类的描述:
You could use CImage[^].

From the description of the class in the documentation page:
CImage provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.


这里 [ ^ ]您将找到使用GDI +技术的解决方案。



1)创建 CStatic 控制您的对话窗口,图片将被放置。



2)使用 CImageCtrl 按照使用代码部分的第一部分中的1)到4.1.3)中的步骤进行操作。
Here[^] you will find a solution using GDI+ technology.

1) Create CStatic control on your dialog window, where image will be placed.

2) Use CImageCtrl class as instructed in steps from 1) to 4.1.3) in the first part of the section "Using the code".


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

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