SFML community forums

Help => Window => Topic started by: Wine on March 23, 2010, 04:23:31 pm

Title: Multiple windows
Post by: Wine on March 23, 2010, 04:23:31 pm
Hi,

Does SFML 1.5 support multiple windows? If yes there are any tutorials for this - I can't find it.

-Wine
Title: Multiple windows
Post by: Laurent on March 23, 2010, 04:35:57 pm
Hi

Quote
Does SFML 1.5 support multiple windows?

Yes.

Quote
If yes there are any tutorials for this - I can't find it.

You don't need a tutorial, creating N windows is just creating 1 window N times ;)
Title: Multiple windows
Post by: Wine on March 23, 2010, 05:06:42 pm
It works, but the windows are on status bar. I rather want to don't show it on the status bar - 2 windows per application whit 1 on status bar.
Title: Multiple windows
Post by: Laurent on March 23, 2010, 05:14:36 pm
This is a different thing. What you want is MDI, which is not supported by SFML.

However you can use a GUI framework like Qt to create the MDI windows, and then embed SFML into them.
Title: Multiple windows
Post by: Wine on March 29, 2010, 10:37:40 am
Quote from: "Laurent"

However you can use a GUI framework like Qt to create the MDI windows, and then embed SFML into them.
So if I create window with MDI, will can I connect HWND with SFML?
Title: Multiple windows
Post by: Laurent on March 29, 2010, 01:26:06 pm
Yes.
Title: Multiple windows
Post by: Wine on March 30, 2010, 04:31:26 pm
I have been tring to do that, But it this (http://www.sfml-dev.org/tutorials/1.5/graphics-win32.php) tutorial you've just create static controls and 'put' into them sf::RenderWindow class and then in "real-time loop" you have update it. But I won't have control to many MDI child window. So how to redraw it? I will have HWND only when I will create it. How to do this?

Can I redraw it on WM_PAINT event?
Title: Multiple windows
Post by: Laurent on March 30, 2010, 04:50:24 pm
Quote
Can I redraw it on WM_PAINT event?

Yes, I think that this is the best solution in your situation.