Thanks Max Currently I have a 'hacky' version that works by having the child control 'forward' WM_MOUSEMOVE and WM_LBUTTONDOWN to the parent, but its not ideal, I got the impression that SetCapture forwarded all messages to the TWincontrol even when not 'hot' so would I have to just call ReleaseCapture when the mouse went 'out of bounds', Wouldn't I just have to call ReleaseCapture on a WM_CANCELMODE message? When would I have to generate a WM_CANCELMODE message?
N ----- Original Message ----- From: "Max Nilson" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Thursday, July 31, 2003 8:49 AM Subject: RE: [DUG]: Previewing mouse events in a panel > Neven MacEwan said: > > > No what I'm doing is a panel which can layout the TWincontrols > > within it, but I'm using MouseMove to change the cursor to the relevant > > drag cursor, but as I hit a control, mousemove ceases for the panel! > > So I was wondering if there was some method for previewing mouse events > > What you want to do then is to have the panel capture the mouse so that all > mouse actions go to it rather than the window handle under the mouse. Have a > look at the Windows SetCapture and ReleaseCapture API's, and Delphi use of > these in places like the Mouse.Capture property, and the SetCaptureControl > function in Controls.pas. > > You will also need to handle WM_CANCELMODE messages appropiately, and in > some cases generate your own WM_CAPTUREMODE messages to ensure that all of > your capture state handling remains correct. > > Cheers, Max. > > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/