Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

SkyRaign

Member Since 23 Dec 2012
Offline Last Active Dec 24 2012 02:35 PM
-----

Topics I've Started

Using bitmap resources (*.rc) in Visual Studio 2010

23 December 2012 - 03:31 AM

Hi, I am trying to find a way to use bitmaps in my game without having to load files from the hard disk at runtime.  I can include bitmap files into a *.rc, but I have searched on the web for hours and cannot find a way to access the images from code.  Nothing I have tried has worked.

 

This is the "name" that my file "TryRes.rc" has given my bitmap:

 

IDB_BITMAP1

 

This identified throws a compiler error, saying it is "undeclared". 

 

I am using DirectX10 for graphics; my intention is to use "CreateTextureFromResource" once I am able to access the images...unless someone knows a better way to do this.  The idea is to be able to port the executable over to another computer and still be able to run it without all the extra graphics files.


PARTNERS