I've got a CAD program that shows mechanical linkages in motion
in the main window, with a second window used to create the
next linkage to be modeled. Some of the drawing operations are
click and drag style and there I use ClipCursor on the initial
click to confine the cursor and again on button up to release it.
Worked fine until just lately, when I started leaving the main
window running while I was drawing in the second. (No reason,
other than it was just interesting to watch while I was thinking.)
When I do this, the click and drag operations don't always keep
the cursor restricted to the client area. They may start that
way, but if you move the cursor up, sometimes you can move thru
the toolbar at the top and on out of the window, after which the
cursor is not restricted at all. OTOH, if you pause the action
in the main window the cursor never escapes.
All I can think of is that when the main window is running, it is
heavy enough in computation and graphics to interfere with some of
the WM_MOUSEMOVE messages getting to the second window, so with
the messages that get through, one message says it's inside and the
next says it's outside and loose.
Any ideas what the trouble is or how to fix it? I really do not
want to use SetCapture, even as a last resort. So I'll live with
the problem if I have to, or try slowing down the processing in
the main window.
Anybody?
Tove