Solved

Open a splash screen

Posted on 2003-11-20
2
345 Views
Last Modified: 2010-04-02
How do I open a spash screen window using C++ I am learning this subject on my own not as an assignment. I'd like to open the splash screen and have a timed interval in which it displays then dissappears. Any help?
0
Comment
Question by:johnnys123
[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
2 Comments
 
LVL 1

Accepted Solution

by:
georgiek50 earned 50 total points
ID: 9794298
You would need to load a bitmap (easiest way) and BitBlt it to the screen before you call ShowWindow in WinMain like so

// Get the monitor's device context
HDC hdcDesktop = GetWindowDC(NULL);

// Create a compatible one
HDC hdcSplash   = CreateCompatibleDC(hdcDesktop);

// Select your bitmap into the compatible one
SelectObject(hdcSplash, hBitmap);

// Use BitBlt to output to the screen
(you should look this function up on MSDN, it explains it better than I will)

I am assuming you know how to load a bitmap and clean up after yourself! If not, respond and I'll fill in the gaps.
0
 

Author Comment

by:johnnys123
ID: 9800423
that was very helpful thank you very much
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

705 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