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