Displaying external bitmap files at runtime.

Hi,

I have used a static frame control to display a bitmap resource like:

 LoadBitmap(IDB_BITMAP1)       //THIS WORKS

I need to load from a file like:
CBitmap m_bjg;
LCTSTR bm;
bm="\\windows\\bitm.bmp";
m_bjg.LoadBitmap(bm);  //does not load

The bitmap file does not load?  
binstarAsked:
Who is Participating?
 
mjswartConnect With a Mentor Commented:
m_bjg.Attach(::LoadImage(NULL, sFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE));

Will work

Good luck
0
 
binstarAuthor Commented:
Edited text of question.
0
 
binstarAuthor Commented:
Thank you mjswart.
0
All Courses

From novice to tech pro — start learning today.