|
-
February 18th, 2010, 04:46 PM
#16
Re: Splash screen
I don't think there is any standard for a splash screen size. Personally, I do everything I can to avoid the need for one. If I'm doing so much initialization that the user might be concerned that the program hasn't started, then something is wrong with my design.
If you must, I'd keep it as unobtrusive as possible. Perhaps no more than 320x240 (in case you're users are like my Mom and still run in 640x480). As for centering, that's just arithmetic; do you not know how to calculate that?
-
February 18th, 2010, 05:42 PM
#17
Re: Splash screen
First I'd need to know how to retrieve screen size. then I would I would divede width / 2 and height / 2. If my sreensplash window is 320x240 then I shoule place it (screen width / 2) - (window size / 2) the same goes for height...is that ok?
-
February 18th, 2010, 08:58 PM
#18
Re: Splash screen
That's correct. You can get the desktop window rectangle for the screen size. You can call GetDesktopWindow() to get a HWND to the desktop window, and call GetWindowRect() on that handle, or just combine them:
Code:
RECT r;
::GetWindowRect(::GetDesktopWindow(),&r);
-
February 19th, 2010, 01:21 AM
#19
Re: Splash screen
See.. If you want to show a splash screen then just use my attached file. though its written in mfc you would not have to put so much effort. Just use SplashClient.cpp file to show your bitmap as splash. And about center of screen:: this is also implemented in that piece of code so u dont need to worry about it. Finally, if you have a strong hold determination that you personally have to write a code for Splash screen in Win32API then I can't help you.
-
February 19th, 2010, 01:35 AM
#20
Re: Splash screen
Actually, I am forced to use regular win32 API instead of MFC.
-
February 19th, 2010, 09:02 AM
#21
Re: Splash screen
Forced by whom (or what)? Just say the word and we can send in the black helicopters.
-
February 19th, 2010, 07:44 PM
#22
Re: Splash screen
By the way, this works great as a splash screen:
Code:
//
// Splash Screen
//
IDD_SPLASH DIALOG 0, 0, 300, 200
STYLE DS_3DLOOK | DS_ABSALIGN | DS_CENTER | DS_FIXEDSYS | WS_VISIBLE | WS_POPUP
FONT 8, "Ms Shell Dlg 2"
BEGIN
LTEXT "Splash Screen", IDC_STATIC, 127, 96, 46, 8, SS_LEFT
END
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|