Skip to main content
GameDev.net gamedev.net
🔒 Locked

maximize window

Started by penetrator Jan 25, 2003 at 6:57 AM 3 replies 400+ views
Original Post
penetrator
penetrator
Hi, i''m trying to maximize a window at startup (i''m using nehe''s code). In the CreateGLWindow() function, i use these parameters: dwExnostyle= WS_EX_APPWINDOW | WS_EX_WINDOWEDGE ;// Window Extended Style dwnostyle= WS_OVERLAPPEDWINDOW | WS_MAXIMIZE;// Windows Style Also if i specified to maximize the window, when i run the application i get the width/height specified, but it is not maximized, i.e. i have to click on the maximize box to do it ...
penetrator
penetrator
ok i found it, i had to modify

ShowWindow(hWnd,SW_SHOW);

to

ShowWindow(hWnd,SW_SHOWMAXIMIZED);

sorry... still learning :D

penetrator
penetrator
However, how can i get the current Windows system screen resolution ?

Dactylos
Dactylos
quote:
Original post by penetrator
However, how can i get the current Windows system screen resolution ?

Call GetSystemMetrics with the SM_CXSCREEN/SM_CYSCREEN flags.
penetrator
penetrator
And what would be the real window width and height of my app if it runs not fullscreen ? Because i have a title bar, a menu bar, and my window toolbar is always on top, if i create a window of 1024x768, the real application height is reduced from 676 pixels. How do i take into account of those parameters ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.