GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How I maximize the window when app startup?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
kingsz1
Familiar Face


Joined: 22 Nov 2006
Posts: 12

PostPosted: Thu Nov 23, 2006 8:03 pm    Post subject: How I maximize the window when app startup? Reply with quote

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?
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 387
Location: Fairfax, Virginia

PostPosted: Sat Nov 25, 2006 6:25 pm    Post subject: Reply with quote

Code: (Plaintext)
1
2
3
4
5
6
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/gdk/GdkScreen.html
Back to top
kingsz1
Familiar Face


Joined: 22 Nov 2006
Posts: 12

PostPosted: Sun Nov 26, 2006 8:02 pm    Post subject: Thanks. Reply with quote

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?
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 387
Location: Fairfax, Virginia

PostPosted: Sun Nov 26, 2006 9:31 pm    Post subject: Reply with quote

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 ...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP