BleepingComputer.com: C++ LoadBitmap

Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

C++ LoadBitmap *check title*

#1 User is offline   chx101 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 31
  • Joined: 20-February 09
  • Gender:Male
  • Location:MI

  Posted 30 August 2009 - 04:45 PM

Hie ,
I need some help on loading a bitmap as a Splash screen in C++. I am using wXDev-C++ v 7.

When i use LoadBitmap it works fine but doesn't load.
Any help or suggestion will be greatly appreciated.
Thanks. :thumbsup:
CHX101

#2 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,814
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 31 August 2009 - 01:21 PM

LoadBitmap just loads a bitmap resource into memory and return the handle.
If you want to load an image from a file, use LoadImage() instead.

To show splash screen, you need a window (a dialog window is good) on which you would display that image.
Then do BitBlt() to paint the loaded bitmap onto that window. The prcoess requires getting DC and releasng it.
You need a

For more information see MSDN : http://msdn.microsoft.com/en-us/library/dd...28VS.85%29.aspx
Also this article is good : http://www.winprog.org/tutorial/bitmaps.html
[url="http://www.avast.com/"]avast! free antivirus[/url]

#3 User is offline   chx101 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 31
  • Joined: 20-February 09
  • Gender:Male
  • Location:MI

Posted 01 September 2009 - 11:14 AM

So if i want to display a Splash screen i just set the window with no caption right ?
BTW thanks for those links, they are good.
CHX101

#4 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,814
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 01 September 2009 - 02:40 PM

Yes, create a window with no caption, no border etc. Do BitBlt(). Then use SetTimer() counter or just use SleepEx() to set the number of seconds the splash screen would be displayed.
[url="http://www.avast.com/"]avast! free antivirus[/url]

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users