On Sat, Jan 7, 2012 at 9:52 AM, Oliver Sims <
[email protected]> wrote:
> **
> This is a question on drag/drop.
>
> I have two dialogs A and B running in the same process (i.e. both started
> by a single script).
> Both dialogs are "mouse-enabled" (that is, both connect to mouse events,
> and A also sets the mouse cursor on Button1Down).
>
> So, I pick up on A and drag the cursor over B.
> When dragging over B, I get no messages sent to either A or B.
>
This doesn't sound right to me. If you captured the mouse in A when you
did the 'pick up' all mouse messages should be sent to A, until you release
the mouse. On the face of it, I don't think you captured the mouse. If
you did, then I guess I'll need to play with this a bit to see what is
happening.
> So I cannot set the cursor appropriately.
> When I drop on B, I get a MouseMove event sent to B.
>
> However, when the cursor is over B, I want to change it to an "OkayToDrop"
> cursor. But with no messages sent to either A or B, I conclude that I
> cannot set the cursor to OK on the basis of a message being receive by B.
>
>
The conclusion is wrong, you can set the cursor. You should be getting
messages sent to A, I think, as explained above.
>
> My question: Is this the only way to determine when the mouse is over the
> target? That is (ref the A and B example above) have the A determine, on a
> MouseMove message sent to it, whether the cursor is over B or not?
>
>
The answer to the question is: Yes, this would be the only *reliable* way.
But, you *have* to capture the mouse.
Think about a scenario using your first approach. We have A and B dialogs
again
mouse moves over A, detect button down, detect mouse leaves A and detect
button still down;
detect mouse enters B and detect button still down, detect button goes up,
do drop
This would work, provided the user does not drag the mouse over a
drag-enabled window between leaving your A and entering your B, because the
drag enabled window will take control of the mouse.
But, of course you can not count on the user doing that, so your first
approach while reasonable, is not reliable.
I'll try to a look at the 2 dialog scenario. I still believe it is doable.
--
Mark Miesfeld
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users