Re: get_resolution





sundaresh venugopal wrote:
For the below program I get the error get_resolution is not a member of Gdk::Screen.
What is the error ?

int main(int argc, char *argv[]) {
        Gtk::Main kit(argc, argv);
        mywindow window;
        Glib::RefPtr<Gdk::Screen> ptr;
        Gdk::Screen *screen;
        double resolution;

        window.set_decorated(true);
        ptr = window.get_screen();
      resolution = ptr->get_resolution();
        window.fullscreen();
        Gtk::Main::run(window);

        return 0;
}


You could use this:

        MyWindow window;
        std::pair<int, int> res;

        res.first = window.get_screen()->get_width();
        res.second = window.get_screen()->get_height();


Regards,

s.


--
We've Got Your Name at Mail.com <http://www.mail.com/?utm_source=mail_sent_footer&utm_medium=email&utm_term=070621&utm_content=textlink&utm_campaign=we_got_your_name>
Get a *FREE* E-mail Account Today - Choose From 100+ Domains


------------------------------------------------------------------------

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



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