通过资源在图片框中更改多张图片 [英] Change Multiple pictures in a picturebox via Resource

查看:86
本文介绍了通过资源在图片框中更改多张图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个程序,我在资源文件中添加了4个JPEG.

我有1个PictureBox.

我有4个按钮.


我需要知道如何通过使用资源文件中的JPEG存储而不是使用本地存储的图片来使每个按钮更改显示的图片吗?

Visual Studio 2008 C ++

So I have a program that I added 4 JPEGs to the resource files.

I have 1 pictureBox.

I have 4 Buttons.


I need to know how to make each button change the picture displayed via using the JPEGs store in the resource files, not using pictures stored locally, can it be done?

Visual Studio 2008 C++

推荐答案

确定-只需从资源中读取图像即可.如果您搜索Google在资源中存储图像,就可以了.当然,您应该为我们做不做的事情,指定您使用的是MFC还是C ++/CLI,因为C ++本身对您所做的任何事情都零支持.
Sure - just read the images from your resources. If you search google for storing images in resources, you''ll be fine. Of course, you should do what you didn''t do for us, specify if you''re using MFC, or C++/CLI, given that C++ itself has zero support for anything you;re doing.


这篇关于通过资源在图片框中更改多张图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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