Advertisement

a simple window question

Started by October 01, 2002 11:39 AM
4 comments, last by LeeDawg 22 years, 3 months ago
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.
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.
Im Anfang war die Tat...Faust
Advertisement
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?
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."
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
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 ]

"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 Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance

Thanks! That''s what I needed.

This topic is closed to new replies.

Advertisement