Click here to Skip to main content
15,911,306 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to load a BMP from a resource dll Pin
sstainba22-Jun-07 10:07
sstainba22-Jun-07 10:07 
AnswerRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 10:25
Mark Salsbery22-Jun-07 10:25 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 11:22
sstainba22-Jun-07 11:22 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:26
Mark Salsbery22-Jun-07 12:26 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 12:32
sstainba22-Jun-07 12:32 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:46
Mark Salsbery22-Jun-07 12:46 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 12:51
sstainba22-Jun-07 12:51 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:59
Mark Salsbery22-Jun-07 12:59 
Gotcha. Only icons can be loaded by an index, AFAIK.

By "name" I mean the ID of a resource - all resources have a name - it's a string. The use of
integer IDs is usually (if not always Smile | :) ) easier but to use an integer it has to be cast to
a string pointer (which is what MAKEINTRESOURCE is for). I'm using "name" to mean the ID of the
resource.

You indicated again you don't want to have to know the name of the resource when you load it.
The only way you can do that is enumerate all the bitmaps in the DLL and pick the bitmap you want
somehow. EnumResourceNames() will enumerate all the bitmap names in the DLL - pick the name you
want and load the bitmap with LoadImage() (or whatever method) using that name Smile | :)

Mark

"I'm the Dude. So that's what you call me. You know, that or, uh, His Dudeness, or uh, Duder, or El Duderino if you're not into the whole brevity thing." The Big Lebowski

GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 13:11
sstainba22-Jun-07 13:11 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 13:20
Mark Salsbery22-Jun-07 13:20 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 13:22
sstainba22-Jun-07 13:22 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 13:31
Mark Salsbery22-Jun-07 13:31 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 13:30
Mark Salsbery22-Jun-07 13:30 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 13:40
sstainba22-Jun-07 13:40 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 13:54
Mark Salsbery22-Jun-07 13:54 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 14:13
sstainba22-Jun-07 14:13 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 14:23
Mark Salsbery22-Jun-07 14:23 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 14:29
Mark Salsbery22-Jun-07 14:29 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 15:05
sstainba22-Jun-07 15:05 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery23-Jun-07 7:30
Mark Salsbery23-Jun-07 7:30 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery23-Jun-07 7:47
Mark Salsbery23-Jun-07 7:47 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba23-Jun-07 11:27
sstainba23-Jun-07 11:27 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery23-Jun-07 13:51
Mark Salsbery23-Jun-07 13:51 
QuestionQuestion About Serial Port in Visual C++ 2005 Pin
Jason Daniel Cohn22-Jun-07 9:35
Jason Daniel Cohn22-Jun-07 9:35 
AnswerRe: Question About Serial Port in Visual C++ 2005 Pin
SimplCodr22-Jun-07 10:15
SimplCodr22-Jun-07 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.