[comp.windows.ms.programmer] Mouse Capture Oddities

lwilliam@asc.slb.com (Laird Williams) (06/28/91)

Hi folks, here's a doozy for you.

I have 2 programs running, and both are linked to a common
DLL. The "main" program is just Petzold's STRPROG program
from his dynalink chapter. I modified the DLL to send a message
to another window (another program actually) using SendMessage.
That program responds by putting up a message box. No problem,
that works. Here's where it gets strange:

   1) Run dialog box in main program
   2) Hit OK button (after doing whatever)
   3) As a result, main program makes a call to the dynalink
   4) Dynalink send message to auxiliary program window
   5) Auxiliary program window displays the correct message box.

   At this point, the mouse cursor will move, but pressing the left
mouse button does nothing to the OK button the message box. Pressing
the SPACE bar does depress the OK button on the message box, at which
point everything apparently returns to normal.

Q: What happens that I lose the mouse click like that?

   Here's even MORE strangeness:
   If I press the SPACE BAR to close the dialog box in the
   scenario above, then I CAN use the mouse on the OK
   button in the auxiliary window's message box.

Any ideas? This is a REAL stumper for me, and I thought that I
understood this stuff!

    Thanks in advance:    -Laird Williams
                           lwilliam@magnesium.asc.slb.com
                           Transcript show: (Smalltalk at: #StandardDisclaimer).