Solved

Dragging Gray Region over multiple windows

Posted on 1999-01-11
2
272 Views
Last Modified: 2013-12-26
I have a "parent" index window which contains three "child" windows: a left pane, a right pane, and a divider pane.  I want the user to be able to mouse-click on the divider pane, drag a gray region of the divider pane anywhere over all three of the "child" windows, release the mouse button, and then have all "child" windows reposition themselves.  I have everything working except for dragging the Gray region over multiple windows.  How can this be done?  DragGrayRgn() does not seem to suffice as it only drags within one window.  I am dragging in the content area of the "parent" window which is covered up by the "child" windows.  How can I see the Dragged region while at the same time showing my "child" windows?  Please Help!
0
Comment
Question by:osibrian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
roov earned 100 total points
ID: 1291704
The easiest way would probably be to track the dragging your self (using StillDown() ).

This code is the skeleton, let me know if you need more...
Point mouseLoc, lastMouseLoc = {-1,-1};
while (::StillDown()) {
      ::GetMouse(&mouseLoc);
      if ((mouseLoc.h != lastMouseLoc.h) ||
            (mouseLoc.v != lastMouseLoc.v))
      {
            // we moved...
            lastMouseLoc = mouseLoc;
            
            // undraw previous region (using xor mode...)
            
            // draw new region, using xor mode...                  
      }
}

0
 

Author Comment

by:osibrian
ID: 1291705
The better solution I found was to Create a Graphics Port (not a Window) the same size as the Entire Desktop under the menu bar. (See GetGrayRgn()). Then I copy some of the info from GetGrayRgn() into my new Graphics Port.  Once this is done, I can use DragGrayRgn() to accomplish the task of dragging my Gray Region over any number of windows at once.  The effect is just what I wanted.  If any of you would like the same code for doing this, send me an E-mail.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question