[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Changing the bitmap for the Splash Window

Posted on 1999-01-13
5
Medium Priority
?
193 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 30 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

868 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