?
Solved

Load a resource with a string

Posted on 2005-05-12
2
Medium Priority
?
202 Views
Last Modified: 2013-11-20
Here is a simple one:  I need to load bitmaps using the string name of the resource ID of the bitmap in my resource file like so:

m_pBitmap->LoadBitmap("IDB_LAKE");    //not working

Of course if I load it using:
m_pBitmap->LoadBitmap(IDB_LAKE);    //works

but the point is I need the former.  Any help appreciated.
0
Comment
Question by:skirmish76
2 Comments
 
LVL 3

Accepted Solution

by:
NawalKishore1976 earned 300 total points
ID: 13994998
Hi when you define the resource , you can use the "IDB_LAKE", see " this mark.
Go to the properties of resourece and chaneg the ID_LAKE to "ID_LAKE" with quotation make.

then your first code will work
0
 

Author Comment

by:skirmish76
ID: 14015184
Short, sharp and 100% correct.  Thanks mate.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question