Click a button to create or show a second window.

Oct 12, 2015 at 1:45pm
closed account (9hbfjE8b)
I would like some help on the topic. How can I create a window when I click a button or maybe create two windows in the beginning of the program then immediately hide the second and finally show it when clicking the button.
Last edited on Oct 12, 2015 at 1:49pm
Oct 12, 2015 at 1:50pm
Which graphics library are you using? It should be pretty easy if you're using SFML - just create two sf::RenderWindow objects.
Last edited on Oct 12, 2015 at 1:50pm
Oct 12, 2015 at 1:56pm
closed account (9hbfjE8b)
Uhm... just <Windows.h>
Oct 12, 2015 at 2:01pm
If you're using winapi CreateWindow() will do what you want.
Oct 12, 2015 at 2:03pm
Yep, and ShowWindow() will let you hide or show windows as you please. Though really, why would you want to use the Windows API directly instead of a more high-level graphics library?
Topic archived. No new replies allowed.