Loading Bitmaps
-
Hi Folks , i want to load and display bitmaps in my MFC(CView) derived class. i have tried quite a bit functions(LoadBitmap () etc..) but it does not work for me. plz help me in this regard thanx in advance
FieldHawk wrote: but it does not work for me. Define "does not work." Are you getting compiler/linker error(s), run-time error(s), or does
LoadBitmap()
return an invalid handle.
A rich person is not the one who has the most, but the one that needs the least.
-
Hi Folks , i want to load and display bitmaps in my MFC(CView) derived class. i have tried quite a bit functions(LoadBitmap () etc..) but it does not work for me. plz help me in this regard thanx in advance
Here is a simple code to load and siplay any bitmap from resource file. d is a pointer to CDC , while IDB_BITMAP1 is name of BITMAP resource which u want to display..
//d is pointer to CDC CDC dc; CBitmap bitmap; bitmap.LoadBitmap(IDB_BITMAP1); dc.CreateCompatibleDC(d); d->SelectObject(&bitmap); d->BitBlt(0,0,100,100,&dc,0,0,SRCCOPY);
Muhammad Shoaib Khan http://geocities.com/lansolution