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. Displaying child window on dual monitor??

Displaying child window on dual monitor??

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionworkspace
3 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.
  • P Offline
    P Offline
    pavanbabut
    wrote on last edited by
    #1

    Hi, My PC is having dual screen setup and I would to display a child window of my MFC application to be displayed on second screen. Is there any way to make the application to display like tht??? I would also like to know if there is a way to make the main application to be displayed on secondary screen, so that the child window can show up on the primary screen?? thanks, -Pavan -- modified at 22:50 Thursday 12th January, 2006

    R S 2 Replies Last reply
    0
    • P pavanbabut

      Hi, My PC is having dual screen setup and I would to display a child window of my MFC application to be displayed on second screen. Is there any way to make the application to display like tht??? I would also like to know if there is a way to make the main application to be displayed on secondary screen, so that the child window can show up on the primary screen?? thanks, -Pavan -- modified at 22:50 Thursday 12th January, 2006

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      A child window is always within the boundaries of its parent, so you can't have a parent window and a child window on separate screens. You can, however, put a non-child window on a different screen. After all, it's only a change in the position of the window. Use EnumDisplayMonitors() to get the display rectangles of all the installed monitors. Hope this helps,

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      1 Reply Last reply
      0
      • P pavanbabut

        Hi, My PC is having dual screen setup and I would to display a child window of my MFC application to be displayed on second screen. Is there any way to make the application to display like tht??? I would also like to know if there is a way to make the main application to be displayed on secondary screen, so that the child window can show up on the primary screen?? thanks, -Pavan -- modified at 22:50 Thursday 12th January, 2006

        S Offline
        S Offline
        Shraddhan
        wrote on last edited by
        #3

        With two monitors, you just have a larger screen. So if with one monitor you have a screen that is 1024 x 768, with two monitors both set to the same resolution, the screen will be 2048 x 768 if they are arranged side by side, or 1024 x 1536 if one is logically above the other. (I find the vertical arrangement confusing, but very handy for word processing when you want two views on the same document.) Be warned though, that with two monitors the screen coordinates can now be negative. The primary monitor will always have it top left corner at 0, 0 but the secondary monitor (assuming that you ONLY have two) can be placed to cover any rectangle that touches the primary monitor's screen area. So the secondary monitor could be up and to the ledt and have its top left corner at -1024, -700. You will find it tricky to navigate your mouse between the two in this case. Also, now that you have two monitors, make a point of checking out code to handle monitors. Some companies write software that pops up dialogs that can not be moved, and which come up right in the middle of the screen. So the dialog is half on one monitor and half on the other. Make sure this does not happen to your code! Shraddhan

        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