afxwin.h在win32应用程序中 [英] afxwin.h in a win32 applicaion

查看:74
本文介绍了afxwin.h在win32应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI.

我如何在基于Win32的应用程序中使用afxwin.h ...
我想使用CBitmap加载图像..
我想在基于Win32的应用程序中使用CBitmap时该怎么办...

_

帮助我..

HI.

how can i use afxwin.h in a win32 based application...
I want to use CBitmap to load an image..
what i;ve to do if i want to use CBitmap in win32 based application...

_

help me out..

推荐答案

为了使用CBitmap,在创建项目时必须指定应用程序基于MFC.如果您已经拥有要在MFC应用程序中使用的代码,则可以构建MFC应用程序外壳,然后直接插入代码.这样做并非难事.如果您不想使用MFC,则可以按照cpallini的说明直接连接到GDI API.
In order to use CBitmap, you must specify that the application is MFC based when creating a project. If you have code that you already have that you want to use within an MFC application, you can build an MFC application shell then just pull your code in. Shouldn''t be terribly hard to do so. If you don''t want to use MFC, you can interface directly to the GDI API as cpallini stated.


据我所知,不使用MFC就不能使用CBitmap.但是,您可以使用功能强大的GDI +图像类,例如,参见加载和显示位图 [ ^ ].
:-)
As far as I know you cant use CBitmap without using MFC. However you may use the powerful Image class of GDI+, see, for instance Loading and Displaying Bitmaps[^].
:-)


仅需添加一点便笺即可添加到Albert所说的内容:您可以与MFC进行静态链接,因此MFC DLL不需要位于您要在其中运行应用程序的机器.
Just a note to add to what Albert said: you can statically link with MFC, so that the MFC DLLs do not need to be on the machine where you want to run your app.


这篇关于afxwin.h在win32应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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