Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Full Screen Dialog Bug

Full Screen Dialog Bug

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Scott H Settlemier
    wrote on last edited by
    #1

    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!

    realJSOPR M J S 4 Replies Last reply
    0
    • S Scott H Settlemier

      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!

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • realJSOPR realJSOP

        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

        S Offline
        S Offline
        Scott H Settlemier
        wrote on last edited by
        #3

        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.)

        1 Reply Last reply
        0
        • S Scott H Settlemier

          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!

          M Offline
          M Offline
          mediamaster40
          wrote on last edited by
          #4

          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...

          1 Reply Last reply
          0
          • S Scott H Settlemier

            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!

            J Online
            J Online
            Joan M
            wrote on last edited by
            #5

            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...

            https://www.robotecnik.com freelance robots, PLC and CNC programmer.

            1 Reply Last reply
            0
            • S Scott H Settlemier

              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!

              S Offline
              S Offline
              Scott H Settlemier
              wrote on last edited by
              #6

              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?

              M 1 Reply Last reply
              0
              • S Scott H Settlemier

                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?

                M Offline
                M Offline
                mediamaster40
                wrote on last edited by
                #7

                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.

                S 1 Reply Last reply
                0
                • M mediamaster40

                  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.

                  S Offline
                  S Offline
                  Scott H Settlemier
                  wrote on last edited by
                  #8

                  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!)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups