Thread: Visual Studio 2010 C++......how to access .bmp images from a *rc file in code?

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    27

    Visual Studio 2010 C++......how to access .bmp images from a *rc file in code?

    The topic pretty much says it here. I have searched for hours for information on how to accomplish this and have turned up empty handed. This is getting EXTREMELY frustrating.

    I am using DirectX10 to handle graphics. I am working towards not having to rely on external image files for graphics; i.e. all of the graphics image that I need is embedded in the program at runtime. I can create the *.rc file, and add bitmaps to it, but that's where I hit a dead stop.

    The goal at this point is to be able to create a texture because once I am able to do that I should be "home free".

    Any help would be GREATLY appreciated.

  2. #2
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428
    Tutorial: Using Resources

    If I understand you correctly I used this tutorial to get the bitmaps into my resource file and

    Bitmaps, Device Contexts and BitBlt

    That one to learn how to work with a device context for getting them to the screen. The bitmap loading is only halfway through the second link. As far as there to the texture I have not manually done that in Direct X yet. I just did a little reading though and

    DirectX10 Tutorial 3: Textures « Taking Initiative

    seems like it gets the job done without using a *.rc
    Virtual reality hello world http://www.rodneybrothers.com/vr/vrh...rld/index.html in html and javascript.
    Viewable with dodocase, google cardboard, OR, and other compatible VR gear.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I would not use the resource section of an executable or dynamic link library to store game resources. Use separate files or group the files into a larger file using some type of chunk or RIFF type methodology.

  4. #4
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428
    Use separate files or group the files into a larger file using some type of chunk or RIFF type methodology.
    Thanks! I've never heard of that method before.
    Virtual reality hello world http://www.rodneybrothers.com/vr/vrh...rld/index.html in html and javascript.
    Viewable with dodocase, google cardboard, OR, and other compatible VR gear.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visual Studio 2010 .exe help
    By omGeeK in forum Game Programming
    Replies: 4
    Last Post: 03-20-2011, 01:36 PM
  2. C in Visual Studio 2010, simple code fails
    By Jaymond Flurrie in forum C Programming
    Replies: 13
    Last Post: 07-01-2010, 07:27 AM
  3. Visual Studio 2010 - so where is it now?
    By Devils Child in forum C++ Programming
    Replies: 9
    Last Post: 04-12-2010, 12:51 PM
  4. Visual Studio 2010 Help
    By dnelsalty in forum C++ Programming
    Replies: 15
    Last Post: 08-30-2009, 06:07 PM
  5. Windows 7 RC, Visual Studio 2010 Beta, Office 2010 beta, anyone in?
    By indigo0086 in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-20-2009, 01:57 PM