Archived

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

LeeDawg

a simple window question

Recommended Posts

LeeDawg    122
I''d like to create a small popup window with a video settings button and a few more. When the user is finished with this window I want to destroy it and create the main game window. What is the best way to do this. I know how to create the windows I need. I just need help with the transition from the popup window to the main game window.

Share this post


Link to post
Share on other sites
Hippokrates    122
If you like messy code you can do it like this:

switch(CurrentState) {
case POPUP:
ReceiveInput();
DoThings();
if(UserHasFinished) {
CurrentState = AFTERPOPUP;
}
break;
case AFTERPOPUP:
DoGame();
break;
}

Otherwise you could use a function stack which simply pushes the function for the game after having finished with the popup window.

Share this post


Link to post
Share on other sites
LeeDawg    122
I more specifically wanted to know how to destroy the first window so it no longer exists. I can then create my game window. So I guess my question is how do you destroy a window?

Share this post


Link to post
Share on other sites
LessBread    1415
DestroyWindow(hwnd);



"Beautiful maiden," answered Candide, "when a man is in love, is jealous, and has been flogged by the Inquisition, he becomes lost to all reflection."

Share this post


Link to post
Share on other sites
TheBlackJester    142
I''m pretty sure the most common way to do what you want is to use a dialog window for all the options in the beginning. It (grossly oversimplified) has the same functionality a message box. You know, tell it what you want, the click ok and it goes away automatically.



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites