Load a resource with a string

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.
Who is Participating?
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
skirmish76Author Commented:
Short, sharp and 100% correct.  Thanks mate.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.