Solved

Changing the bitmap for the Splash Window

Posted on 1999-01-13
5
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

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…
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…
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

749 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