In VC6.0, you can do this by adding the splash component and then providing the function in the project invocation component. But there is no such component in the VS2008 (I have been looking for a long time, I did not find it, and there is no relevant information on the Internet). After reviewing the relevant information summarized as follows: 1, you need to add a special Class C Splashwnd. The code is as follows:
SplashWnd.h #ifndef _splash_header _ #define_SPLASH_HEADER_
Voidcsplashwnd::showsplashscreen (Cwnd*pparentwnd)
{
if (!c_bshowsplashwnd| | C_psplashwnd! = NULL)
Return
Allocate A new splash screen, and create the window.
c_psplashwnd= new Csplashwnd;
if (!c_psplashwnd->create (pParentWnd))
Delete C_psplashwnd;
Else
C_psplashwnd->updatewindow ();
}
BOOL Csplashwnd::P retranslateappmessage (msg*pmsg)
{
if (c_psplashwnd== NULL)
Returnfalse;
If we get a keyboard or mouse message, hide the splash screen.
if (pmsg->message== wm_keydown | |
pmsg->message== Wm_syskeydown | |
pmsg->message== Wm_lbuttondown | |
pmsg->message== Wm_rbuttondown | |
pmsg->message== Wm_mbuttondown | |
pmsg->message== Wm_nclbuttondown | |
pmsg->message== Wm_ncrbuttondown | |
pmsg->message== Wm_ncmbuttondown)
{
C_psplashwnd->hidesplashscreen ();
Returntrue; Message handled here
}
Returnfalse; Message not handled
}
BOOL csplashwnd::create (Cwnd*pparentwnd)
{
if (!m_bitmap. LoadBitmap (Idb_splash))
Returnfalse;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.