Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am making simple game in c++. So i have to use multiple Window in My Game.
Eg.
on my first window I drop it in options like "start game","Diffiulty level","Exit".
And When User Select any option he move on Second window.

What I have tried:

i tried first from you tube channel VCR games.
like,
int window1,window2;
setcurrentwindow(window1);

but i am getting error in this.
So pls help..
Posted
Updated 7-Oct-18 22:22pm
v2
Comments
Rick York 7-Oct-18 15:27pm    
We need a little more information like what development environment you are using and what API. Is this Win32? something on Linux or the Mac?

If this is Win32 you could use a modeless dialog to accomplish the same thing.
KarstenK 8-Oct-18 3:31am    
For high performance it often makes sense not have many windows, but draw the text direct on screen (better screenbuffer).

It really depends on your framework. So we need it - or ask in a specialized forum for that framework.

1 solution

Start with a frame window that has a client area to hold the actual game windows. Start by showing the first window in the client area. Then as the game progresses remove the current window and add the next in sequence. See http://winprog.org/tutorial/[^] and Win32 Programming - FunctionX[^] for some useful tutorials.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900