GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Apr 18, 2014 9:02 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How I maximize the window when app startup?
PostPosted: Thu Nov 23, 2006 8:03 pm 
Offline
Familiar Face

Joined: Wed Nov 22, 2006 10:22 pm
Posts: 12
Hi, all. I need your help.

I made a app and hope it would maximize to the screen size such as 1024x768 or 800x600, according to the system setting. How to do this?

_________________
I am new in GTK+, help me in any way. THANKS!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 25, 2006 6:25 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
Code:
GdkScreen *screen;
gint width, height;

screen = gdk_screen_get_default ();
width = gdk_screen_get_width (screen);
height = gdk_screen_get_height (screen);


You can read more about GdkScreen at: http://developer.gnome.org/doc/API/2.0/ ... creen.html

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject: Thanks.
PostPosted: Sun Nov 26, 2006 8:02 pm 
Offline
Familiar Face

Joined: Wed Nov 22, 2006 10:22 pm
Posts: 12
Thank you.

How about if I change the screen to 800x600 as my app window size and then return to system default size when my app exit?

_________________
I am new in GTK+, help me in any way. THANKS!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 9:31 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
Use the "size-changed" signal to monitor the size of the screen. As for changing the size of the screen from within your application, if that's what you are saying, I don't think that's a GTK+ thing ...

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group