Archived

This topic is now archived and is closed to further replies.

PixolMaster

Win32 Window Creation Problem

Recommended Posts

PixolMaster    302
Hi all, I''ve been working on a game for a little while now, and as it opens it starts by fading in and out a logo and then transitioning to the main menu. My problem is that the fade begins at the moment the program executes, so if a person''s computer is at all slow then by the time the window is displayed the logo might be faded in or, sometimes, partially faded out already. Is there some way that I can know when a window is fully created and being displayed? It doesn''t look very professional to have the opening sequence partially finished by the time the user sees it... Thanks much for you time. --- Alex Broadwin --- Domini Nocti Games

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You could start the fade-in when the window gets the first WM_PAINT message.

Share this post


Link to post
Share on other sites
PixolMaster    302
mikeyrb: Seems you were right, and it got me thinking... So I looked everywhere I could BEFORE the main loop, and the problem was that I was initializing the clock before creating the window, and that time is used to decide how far we are into the fade-sequence... Problem solved! Thanks much!

--- Alex Broadwin
--- Domini Nocti Games

Share this post


Link to post
Share on other sites
sSimontis    100
Even though you solved it, you can always use the sleep() command to pause it for a few seconds.

Scott Simontis
e-mail:ageofscott@comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites