maximize window
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 ...
ok i found it, i had to modify
ShowWindow(hWnd,SW_SHOW);
to
ShowWindow(hWnd,SW_SHOWMAXIMIZED);
sorry... still learning :D
ShowWindow(hWnd,SW_SHOW);
to
ShowWindow(hWnd,SW_SHOWMAXIMIZED);
sorry... still learning :D
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.
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 ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement