Full Screen Dialog Bug
-
I don't understand what is happening here. Anyone able to elucidate? I have a full screen window. (a vanilla CWnd derivative) This works fine. It covers the task bar and all ok. The problem comes when it creates a full screen modal dialog. That dialog assumes full screen in OnInitDialog (via SetWindowPos). The problem is that where the task bar would have been shown, had this not been a full screen window, the parent window shows through instead! I have worked around the problem, by hiding the parent window. But I'd really like to know what is going on here. ..especially why the work around of hiding the parent window should fix it!
-
I don't understand what is happening here. Anyone able to elucidate? I have a full screen window. (a vanilla CWnd derivative) This works fine. It covers the task bar and all ok. The problem comes when it creates a full screen modal dialog. That dialog assumes full screen in OnInitDialog (via SetWindowPos). The problem is that where the task bar would have been shown, had this not been a full screen window, the parent window shows through instead! I have worked around the problem, by hiding the parent window. But I'd really like to know what is going on here. ..especially why the work around of hiding the parent window should fix it!
Without playing around with this, I suspect that you'd have to override the OnSize() method for the dialog's CWnd. The original is probably taking into account the size of the taskbar. That's the first place I would look. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
-
Without playing around with this, I suspect that you'd have to override the OnSize() method for the dialog's CWnd. The original is probably taking into account the size of the taskbar. That's the first place I would look. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
I check the size of the window in OnPaint. The dialog is sized as it should be-- full screen. It paints that region where the parent shows through as well. It's as if the parent window were made up of two parts, with the region where the taskbar would have been, behaving as if it were topmost. Most strange-- enough that I suspect some unknown OS behavior or a bug. (I'm running on XP here.)
-
I don't understand what is happening here. Anyone able to elucidate? I have a full screen window. (a vanilla CWnd derivative) This works fine. It covers the task bar and all ok. The problem comes when it creates a full screen modal dialog. That dialog assumes full screen in OnInitDialog (via SetWindowPos). The problem is that where the task bar would have been shown, had this not been a full screen window, the parent window shows through instead! I have worked around the problem, by hiding the parent window. But I'd really like to know what is going on here. ..especially why the work around of hiding the parent window should fix it!
I see this same problem. I am creating a full screen borderless window with flags TOPMOST for my screen saver window. On Windows 98 when I call the password verification dialog, the dialog only sometimes draws above the screen saver window. MS screen savers work fine, but they must be doing some magic thing to get theirs to work? I have tried several things, none of which seem to work including: 1) Setting my full screen window to the bottom of the Z order. 2) Creating the dialog in another thread. 3) Disabling the full screen window painting when the dialog is active, thinking it might be painting over the dialog. But none of these things seem to work, any ideas here, I imagine it might be the same problem as Scott H. Settlemier is having. Stop playing AC2 and please help us oh great Win32 gurus...
-
I don't understand what is happening here. Anyone able to elucidate? I have a full screen window. (a vanilla CWnd derivative) This works fine. It covers the task bar and all ok. The problem comes when it creates a full screen modal dialog. That dialog assumes full screen in OnInitDialog (via SetWindowPos). The problem is that where the task bar would have been shown, had this not been a full screen window, the parent window shows through instead! I have worked around the problem, by hiding the parent window. But I'd really like to know what is going on here. ..especially why the work around of hiding the parent window should fix it!
I've had your same problem last week... It's due to the system workarea. You must resize the workarea at the beggining of your app. and resize again at the end of your app. here's the code:
CRect rectWorkArea; rectWorkArea.left = 0; rectWorkArea.top = 0; rectWorkArea.right = ::GetSystemMetrics(SM_CXSCREEN); rectWorkArea.bottom = ::GetSystemMetrics(SM_CYSCREEN); SystemParametersInfo(SPI_SETWORKAREA,0,&rectWorkArea,SPIF_SENDCHANGE);
then you can resize your dialogs and windows as always... NOTE: I had to resize the windows using this:this->SetWindowPos(&wndTopMost,0,0,::GetSystemMetrics(SM_CXSCREEN),::GetSystemMetrics(SM_CYSCREEN),SWP_SHOWWINDOW);
TopMostFlag is an option... this had to be done in order to avoid flickering when I used the common way of resizing... Hope this helps... -
I don't understand what is happening here. Anyone able to elucidate? I have a full screen window. (a vanilla CWnd derivative) This works fine. It covers the task bar and all ok. The problem comes when it creates a full screen modal dialog. That dialog assumes full screen in OnInitDialog (via SetWindowPos). The problem is that where the task bar would have been shown, had this not been a full screen window, the parent window shows through instead! I have worked around the problem, by hiding the parent window. But I'd really like to know what is going on here. ..especially why the work around of hiding the parent window should fix it!
NEW INFO: I checked the clip box in OnPaint. It was 0,30 to 1024,768!!! But the area showing through was at the bottom. It looked like the window had been somehow moved from where I set it with SetWindowPos. So I checked the window rect and the window was now 0,-30 to 1024,738!! I had set the coordinates to 0,0 to 1024,768. The SetWindowPos call did not use SWP_SHOWWINDOW since I wanted to wait until all of my initialization had completed in OnInitDialog. When I added SWP_SHOWWINDOW, the problem cleared up. So it looks to me that there may indeed be a Windows bug here. Something shifted my window up, just the amount that is the size of the taskbar. If I place the taskbar to the side, the window will get shifted to the side. Very perplexing... Any clues as to what is happening?
-
NEW INFO: I checked the clip box in OnPaint. It was 0,30 to 1024,768!!! But the area showing through was at the bottom. It looked like the window had been somehow moved from where I set it with SetWindowPos. So I checked the window rect and the window was now 0,-30 to 1024,738!! I had set the coordinates to 0,0 to 1024,768. The SetWindowPos call did not use SWP_SHOWWINDOW since I wanted to wait until all of my initialization had completed in OnInitDialog. When I added SWP_SHOWWINDOW, the problem cleared up. So it looks to me that there may indeed be a Windows bug here. Something shifted my window up, just the amount that is the size of the taskbar. If I place the taskbar to the side, the window will get shifted to the side. Very perplexing... Any clues as to what is happening?
That is most likely the task bar shifting the window about. The taskbar must always be visable and will move windows accordingly if they get in the way. Try setting the taskbar to 'AutoHide' then see if you have these same issues, I bet you won't. But I wonder if the taskbar should even be moving your window since you are manually forcing it be fullscreen, I would think the taskbar should only move windows that are maximized, not that set the window position and size directly.
-
That is most likely the task bar shifting the window about. The taskbar must always be visable and will move windows accordingly if they get in the way. Try setting the taskbar to 'AutoHide' then see if you have these same issues, I bet you won't. But I wonder if the taskbar should even be moving your window since you are manually forcing it be fullscreen, I would think the taskbar should only move windows that are maximized, not that set the window position and size directly.
Right, I don't think anyone should be moving the window after I have set its position. It is not a maximized window, merely a full screen window. That the problem does not occur if I pass SWP_SHOWWINDOW in the call to SetWindowPos, makes me suspect that this is not just unexpected behavior, but a bug. (after all, it shouldn't matter a lick to the OS whether the window has been painted already or not!)