Like Tree2Likes
  • 1 Post By Lesshardtofind
  • 1 Post By VirtualAce

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

This is a discussion on Visual Studio 2010 C++......how to access .bmp images from a *rc file in code? within the Game Programming forums, part of the General Programming Boards category; The topic pretty much says it here. I have searched for hours for information on how to accomplish this and ...

  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
    407
    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

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    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.
    Lesshardtofind likes this.

  4. #4
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    407
    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.

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, 02: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, 08: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, 01:51 PM
  4. Visual Studio 2010 Help
    By dnelsalty in forum C++ Programming
    Replies: 15
    Last Post: 08-30-2009, 07: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, 02:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21