Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Multiple windows  (Read 12281 times)

0 Members and 1 Guest are viewing this topic.

Wine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Multiple windows
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multiple windows
« Reply #1 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 ;)
Laurent Gomila - SFML developer

Wine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Multiple windows
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multiple windows
« Reply #3 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.
Laurent Gomila - SFML developer

Wine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Multiple windows
« Reply #4 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multiple windows
« Reply #5 on: March 29, 2010, 01:26:06 pm »
Yes.
Laurent Gomila - SFML developer

Wine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Multiple windows
« Reply #6 on: March 30, 2010, 04:31:26 pm »
I have been tring to do that, But it this 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multiple windows
« Reply #7 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.
Laurent Gomila - SFML developer