Solved

Changing the bitmap for the Splash Window

Posted on 1999-01-13
5
167 Views
Last Modified: 2010-04-16
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
Comment
Question by:hrenaud
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:nil_dib
ID: 1182004
Do you use the LoadBitmap from the CBitmap class
or the LoadBitmap from the Win32 API ?
0
 

Author Comment

by:hrenaud
ID: 1182005
I use the CBitmap class from the MFC.
0
 
LVL 4

Accepted Solution

by:
nil_dib earned 10 total points
ID: 1182006
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
 

Author Comment

by:hrenaud
ID: 1182007
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
 
LVL 4

Expert Comment

by:nil_dib
ID: 1182008
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now