- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My Fortran openGL program is using CreateWindowEx like this to create the main window:
hwnd = CreateWindowEx( &
0, & ! Style
szApp, & ! lpClassName
TITLE, & ! lpWindowName
wsflag, & ! dwStyle
CW_USEDEFAULT, & ! X
CW_USEDEFAULT, & ! Y
1200, & ! nWidth
800, & ! nHeight
NULL, & ! hWndParent
NULL, & ! hMenu
hInstance, & ! hInstance
NULL) ! lpParam
! 1366, &
! 768, &
! CW_USEDEFAULT, & ! nWidth
! CW_USEDEFAULT, & ! nHeight
If I use CW_USEDEFAULT for nWidth and nHeight, I still can't get a full screen window. My screen is set at 1920*1080.
How do I set it? Thanks for help.
Cheers,
Cean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have figured out.
After this line, use ShowWindow to change the window size.
nCmdShow=SW_SHOWMAXIMIZED
ignor = ShowWindow(hwnd, nCmdShow) ! show windows
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what have you got set in wsflag, that has an effect on behaviour, do you have the WS_OVERLAPPEDWINDOW flag set. I think you need that with CW_USEDEFAULT?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just grabbed the CUBE demo code.
wsflag = or(or(WS_OVERLAPPEDWINDOW, WS_CLIPCHILDREN),WS_CLIPSIBLINGS)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For fullscreen the dwstyle must contain WS_POPUP and not WS_OVERLAPPEDWINDOW. The required width and height can either be set (1920, 1080 in your case) or, better, be obtained by calls to GetSystemMetrics.
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have figured out.
After this line, use ShowWindow to change the window size.
nCmdShow=SW_SHOWMAXIMIZED
ignor = ShowWindow(hwnd, nCmdShow) ! show windows

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page