Gdk::Screen



Hi,.
I wanne search on the pc if there are monitors with a specified resolution are connected. If so my app has to run there in fullscreen on it, if not the user has to be informed about it.
some ex code:
m_refScreen = get_screen(); // m_refScreen is RefPtr to a Gdk::Screen, get_screen() is called on a Gtk::Window std::cout << "Aantal monitors: " << m_refScreen->get_n_monitors() << "\n";
  std::cout << "x: " << m_refScreen->get_width() << "\n";
  std::cout << "y: " << m_refScreen->get_height() << "\n";
I develop on windows, I prefere to use gtkmm because I can easy port to linux. If it don't go with gtkmm the windows api calls are also ok I will search the linux variant later.

Grts Bart





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]