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. Bitmap in parent overlaps child dialog.

Bitmap in parent overlaps child dialog.

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestion
9 Posts 3 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.
  • A Offline
    A Offline
    aquawicket
    wrote on last edited by
    #1

    I've got a parent dialog with a picture control linked to a .bmp file. Then I've got a child dialog that opens in the parent. When I open the child dialog the bitmap of the parent overlaps the child window. Any ideas?

    M 1 Reply Last reply
    0
    • A aquawicket

      I've got a parent dialog with a picture control linked to a .bmp file. Then I've got a child dialog that opens in the parent. When I open the child dialog the bitmap of the parent overlaps the child window. Any ideas?

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      What are the style and extended style flags used when creating the child dialog? Mark

      "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

      A 1 Reply Last reply
      0
      • M Mark Salsbery

        What are the style and extended style flags used when creating the child dialog? Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        A Offline
        A Offline
        aquawicket
        wrote on last edited by
        #3

        childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

        M N 3 Replies Last reply
        0
        • A aquawicket

          childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          I meant the window styles :) Try using wndTop as the first parameter to childDlg->SetWindowPos(). You may also want to try editing the child dialog resource and set the clip siblings property to true. Mark

          "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

          1 Reply Last reply
          0
          • A aquawicket

            childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

            N Offline
            N Offline
            Naveen
            wrote on last edited by
            #5

            aquawicket wrote:

            childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

            if you specify the first parameter as NULL, you must specify the SWP_NOZORDER flag also.

            nave [OpenedFileFinder]

            1 Reply Last reply
            0
            • A aquawicket

              childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);

              N Offline
              N Offline
              Naveen
              wrote on last edited by
              #6

              Also call childDlg->BringWindowToTop()

              nave [OpenedFileFinder]

              A 1 Reply Last reply
              0
              • N Naveen

                Also call childDlg->BringWindowToTop()

                nave [OpenedFileFinder]

                A Offline
                A Offline
                aquawicket
                wrote on last edited by
                #7

                Hmmm... So far I've tried all of the above, nothing does it yet... In the resource editor, the dialog type is set to child. All of my other modal and modeless dialogs overlap the bitmap on the parent ok. It's just these child dialogs.

                M 1 Reply Last reply
                0
                • A aquawicket

                  Hmmm... So far I've tried all of the above, nothing does it yet... In the resource editor, the dialog type is set to child. All of my other modal and modeless dialogs overlap the bitmap on the parent ok. It's just these child dialogs.

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  You stated "Then I've got a child dialog that opens in the parent." How is this dialog created? Modal? Modeless? Try using MoveWindow() instead of SetWindowPos(). MoveWindow doesn't mess with Z-order and your most recent created child should be at the top of the z-order unless you've made another child alwaysontop. Mark

                  "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

                  A 1 Reply Last reply
                  0
                  • M Mark Salsbery

                    You stated "Then I've got a child dialog that opens in the parent." How is this dialog created? Modal? Modeless? Try using MoveWindow() instead of SetWindowPos(). MoveWindow doesn't mess with Z-order and your most recent created child should be at the top of the z-order unless you've made another child alwaysontop. Mark

                    "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

                    A Offline
                    A Offline
                    aquawicket
                    wrote on last edited by
                    #9

                    Good man mark... It was definetly a Z-order issue.. MoveWindow() works it out.. :) Thank you very very much..

                    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