Solved

Changing the bitmap for the Splash Window

Posted on 1999-01-13
5
166 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
Comment Utility
Do you use the LoadBitmap from the CBitmap class
or the LoadBitmap from the Win32 API ?
0
 

Author Comment

by:hrenaud
Comment Utility
I use the CBitmap class from the MFC.
0
 
LVL 4

Accepted Solution

by:
nil_dib earned 10 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

762 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

13 Experts available now in Live!

Get 1:1 Help Now