Hi
I didn't know about WM_CAPTURECHANGED but it read as similar. I used
CancelMode simply because that was what was in my example controls.
I just did a quick test and it doesn't seem to trigger on the same
events (It seemed to only trigger when clicking on my control). Not
really thoroughly tested though. I will stick wilt CancelMode as I have
it working well :)
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
Karl @ Work wrote:
You learn something every day. Guess my hooking code was OTT.
I notice that although some effort has obviously been made to implement
CM_CANCELMODE, its effects look very similar to those of WM_CAPTURECHANGED
(Rob, mightn't that work for you as well?). Can anyone enlighten me as to
the difference?
Cheers,
Carl
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Robert martin
Sent: Tuesday, September 05, 2006 7:42 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Component creation
Hi all
I have this beaten now !!!!
The required message is CM_CANCELMODE ....
procedure CMCancelMode(var Message: TCMCancelMode); message
CM_CANCELMODE;
I found this using my expert skills (or looking at some third party
components we use and putting breakpoints in) ;-)
I had tried this earlier but my component actually creates a child
component when expanded and I needed to better provide communication
between them. I am not an expert component creator (far from it) but
what I have is both components checking for this event and using the
ScreenToClient code provided by Todd to ensure the mouse isn't within
either component. If not it closes the 'component'.
CM_CANCELMODE and its friend WM_CANCELMODE are really strangely
described my MS and others as 'providing special functionality in
certain circumstances' or some such. But essentially it seems to be
when a non focusable control or window is selected.
Will test further but it seems this has hit the nail on the
head. A big
thanks to all who have contributed.
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi