 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jirayu Guest
|
Posted: Sun Nov 16, 2003 6:05 am Post subject: Tracking Parent |
|
|
How can my visual component detect parent form or owner form "close down" ,
"sized" or "moved" without messing with WndProc or CN_Command Notification.
It's already D7 and it should be easier now isn't it.
Jirayu
|
|
| Back to top |
|
 |
Jirayu Guest
|
Posted: Sun Nov 16, 2003 9:50 am Post subject: Re: Tracking Parent |
|
|
Oh, I found it under CM_CancelMode;
procedure CMCancelMode(var Message: TCMCancelMode); message CM_CANCELMODE;
Jirayu
"Jirayu" <jirayu (AT) sunncity (DOT) com> wrote
| Quote: | How can my visual component detect parent form or owner form "close down"
,
"sized" or "moved" without messing with WndProc or CN_Command
Notification.
It's already D7 and it should be easier now isn't it.
Jirayu
|
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Sun Nov 16, 2003 10:47 am Post subject: Re: Tracking Parent |
|
|
In article <3fb713bb (AT) newsgroups (DOT) borland.com>, Jirayu wrote:
| Quote: | How can my visual component detect parent form or owner form "close down" ,
"sized" or "moved" without messing with WndProc or CN_Command Notification.
|
Since the control does not get the relevant messages itself there are only
two options:
a) require the host form to actively pass the messages or some kind of
notification to your control.
b) subclass the host form to intercept the messages.
| Quote: | It's already D7 and it should be easier now isn't it.
|
The recommended way for subclassing VCL controls has been the WindowProc
property, for a long time now (since D3 i think). Do not use API-style
subclassing (SetWindowLong) with VCL controls since such a control may
recreate its window handle if certain changes are made to its properties
or even to properties of a control up the parent chain.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|