[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Changing the bitmap for the Splash Window

Which parameter have i to pass to LoadBitmap() Function if i want to load a Bitmap file. On the MFC documentation, they
write :
LoadBitmap("logoimage");
This instruction doesn't work !
Thank.
0
hrenaud
Asked:
hrenaud
  • 3
  • 2
1 Solution
 
nil_dibCommented:
Do you use the LoadBitmap from the CBitmap class
or the LoadBitmap from the Win32 API ?
0
 
hrenaudAuthor Commented:
I use the CBitmap class from the MFC.
0
 
nil_dibCommented:
LoadBitmap is NOT for loading a bitmap from a file!
It for laoding a bitmap from a resource.
Resource workshop -> insert new resource -> bitmap ( ID: e.g. IDB_BITMAP1 )
load the bitmap:
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP1);


if you want to load a bitmap from a file look at
http://www.codeguru.com/bitmap/index.shtml
for sample code and bitmap classes.
Or take a look at the MFC sample Diblook.
0
 
hrenaudAuthor Commented:
In order to load a bitmap, i have to use the CFile class.
On the Web site, there is a sample to write a bitmap in a file :
www.codeguru.com/bitmap/window_to_file.shtml

0
 
nil_dibCommented:
I think the one you are searching for is
http://www.codeguru.com/bitmap/draw_bmp.shtml
shows the drawing of bitmaps from BMP files.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now