Subclassing controls in a composite control within the container class. 
Author Message
 Subclassing controls in a composite control within the container class.

    I am trying to create a composite control that has a number of regular
Win32 controls on my form.  I would like to intercept certain messages that
go to the windows contained within my control (some of the drag window
messages, for example), and perform actions on them, without having to take
on all of the functionality of the control (i.e. handling ALL of the
messages).

    What I am lost on is whether or not I want to have contained windows, or
do I want to subclass the windows?  The documentation in MSDN indicates that
there is a distinct difference.

    How would I go about this?

    The reason I want to do this to handle drag and drop window's messages
that might be sent to an edit control on my composite control.

    Thanks in advance.

--
                         - Nicholas Paldino



Tue, 20 May 2003 03:00:00 GMT  
 Subclassing controls in a composite control within the container class.
You need to subclass your child windows. CContainedWindow has a method
SubclassWindow just for this purpose, and you can direct the messages you
want back to your control's message map.
--
With best wishes,
    Igor Tandetnik


Quote:
>     I am trying to create a composite control that has a number of regular
> Win32 controls on my form.  I would like to intercept certain messages
that
> go to the windows contained within my control (some of the drag window
> messages, for example), and perform actions on them, without having to
take
> on all of the functionality of the control (i.e. handling ALL of the
> messages).

>     What I am lost on is whether or not I want to have contained windows,
or
> do I want to subclass the windows?  The documentation in MSDN indicates
that
> there is a distinct difference.

>     How would I go about this?

>     The reason I want to do this to handle drag and drop window's messages
> that might be sent to an edit control on my composite control.

>     Thanks in advance.

> --
>                          - Nicholas Paldino




Tue, 20 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. retrieve handle of the control from within the control when the container is vb

2. A composite control calling another composite control in web browser

3. Composite control hosted by a composite control.

4. Subclassing in a composite ATL control

5. ATL composite controls inside an MFC container

6. How to detect container dialog is moved in composite control

7. ATL composite controls inside an MFC container

8. Using Rich Edit Control or ip address control in a composite control

9. How to trap a container event within an ActiveX Control

10. Container of class defined within another class

11. Container of class defined within another class

12. Need help with Owner Drawn Button Class in ATL composite Control

 

 
Powered by phpBB® Forum Software