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

Author Topic: How to get a window handle?  (Read 1903 times)

0 Members and 1 Guest are viewing this topic.

pilehead

  • Newbie
  • *
  • Posts: 3
    • View Profile
How to get a window handle?
« on: June 05, 2011, 07:02:23 pm »
Hello!
I have created a renderwindow in my program with App(sf::VideoMode(800, 600, 32), "SFML Window");
How can i get its handle (i need it to use in some winapi functions)?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to get a window handle?
« Reply #1 on: June 05, 2011, 07:03:32 pm »
In SFML 1.6 there's no clean way to do it, you must use FindWindow or something similar.

In SFML 2 there's a new function that returns the OS-specific handle of the window.
Laurent Gomila - SFML developer

pilehead

  • Newbie
  • *
  • Posts: 3
    • View Profile
How to get a window handle?
« Reply #2 on: June 05, 2011, 07:46:03 pm »
thank you!

 

anything