how to Clip window to primary display monitor
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: how to Clip window to primary display monitor

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    90

    how to Clip window to primary display monitor

    dear respected members.

    if a computer is connected with another monitor(extended display), as we know we can move a window to secondary (extended) display, while still using primary monitor workarea for other tasks. i use it all the time when i want to watch movie while still want to work on something. .

    what i want to do is, that even with extended display, i would like to confine the window to primary monitor only, i was using clipping(SetWindowRgn) for it by calculating the primary corrdinates. but sadly this approach disables the aero effect.

    i have asked this quesiton in other thread, but the context was not clear i think,

    regards
    D
    Last edited by Deepak_Sharma; June 15th, 2012 at 01:09 AM.

  2. #2
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,526

    Re: how to Clip window to primary display monitor

    Instead of clipping, process the WM_WINDOWPOSCHANGING message
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...

  3. #3
    Join Date
    Jan 2007
    Posts
    90

    Re: how to Clip window to primary display monitor

    hello VladimirF,

    thanks for your input,

    i think i did not explain the problem correctly. i do NOT want to confine App to primary monitor,but when user moves apps to the other monitor(secondary), he should be able to move, just like in single monitor case, but the portion of area which is painted in the other monitor, should not be visible. that is why i was using setwindowRgn to clip the area outside the primary monitor workarea.

    do you have any other way to acheive it?

    regards
    D

  4. #4
    Join Date
    Feb 2012
    Location
    Fremont,CA
    Posts
    36

    Re: how to Clip window to primary display monitor

    This step-by-step article describes how to configure and use multiple monitors in Windows XP.

    Windows XP makes it possible for you to increase your productivity by using multiple monitors to expand the size of your desktop. With the use of up to ten individual monitors connected to a single computer, you can create a desktop that is large enough to hold numerous programs or windows. You can easily work on more than one task at a time by moving items from one monitor to another or by stretching them across numerous monitors. You can edit images or text on one monitor while you view Web activity on another monitor. Or you could open multiple pages of a single, long document, and then drag them across several monitors to easily view the layout of text and graphics. You could also stretch a Microsoft Excel spreadsheet across two monitors so you can view numerous columns without scrolling.

    http://support.microsoft.com/kb/307873
    Make sure you check out my >>Facebook Development Blog and Website<<

  5. #5
    Join Date
    Feb 2012
    Location
    Fremont,CA
    Posts
    36

    Re: how to Clip window to primary display monitor

    This step-by-step article describes how to configure and use multiple monitors in Windows XP.

    Windows XP makes it possible for you to increase your productivity by using multiple monitors to expand the size of your desktop. With the use of up to ten individual monitors connected to a single computer, you can create a desktop that is large enough to hold numerous programs or windows. You can easily work on more than one task at a time by moving items from one monitor to another or by stretching them across numerous monitors. You can edit images or text on one monitor while you view Web activity on another monitor. Or you could open multiple pages of a single, long document, and then drag them across several monitors to easily view the layout of text and graphics. You could also stretch a Microsoft Excel spreadsheet across two monitors so you can view numerous columns without scrolling.

    http://support.microsoft.com/kb/307873
    Make sure you check out my >>Facebook Development Blog and Website<<

  6. #6
    Join Date
    Aug 2012
    Posts
    20

    Re: how to Clip window to primary display monitor

    View Same Desktop in Multiple Monitors

    * On the Settings tab of the Display Properties dialog box, click the monitor icon that represents the monitor you want to use in addition to your primary monitor.
    * Click to select the Extend my Windows desktop onto this monitor check box. After you enable this feature, you can drag items across your screen onto alternate monitors. Or, you can resize a window to stretch it across more than one monitor.

    Move Items Between Monitors

    * On the Settings tab of the Display Properties dialog box, click Identify to display a large number on each of your monitors. This shows which monitor corresponds with each icon.
    * Click the monitor icons and drag them to positions that represent how you want to move items from one monitor to another, and then click OK or Apply.
    * Drag an item on your desktop across your screen until it appears on the alternate monitor. Or, you can resize a window to stretch it across more than one monitor.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center