BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tracking Parent

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Jirayu
Guest





PostPosted: Sun Nov 16, 2003 6:05 am    Post subject: Tracking Parent Reply with 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
Jirayu
Guest





PostPosted: Sun Nov 16, 2003 9:50 am    Post subject: Re: Tracking Parent Reply with quote



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





PostPosted: Sun Nov 16, 2003 10:47 am    Post subject: Re: Tracking Parent Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.