MY problem is creating a simple dialog based
container application with VS C++ 6 that will support a
windowless control.
I created a very simple control with the AppWizzard
which is windowless when inserted into Microsoft's
ActiveX Control Test Container. When I insert that
same control into my simple dialog created again with
the AppWizzard the control is instanciated with a
window. I used Spy++ to test for the existence of a
window.
How do I convince a simple MFC dialog to instanciate
an ActiveX control windowless?
Thanks,
Peter Mac Neil
"Peter Mac Neil" <pe...@screentime.com> wrote in message
news:7ebb01c2bb43$d6e6fb60$8bf82ecf@TK2MSFTNGXA05...
Rob
"Peter Mac Neil" <pe...@screentime.com> wrote in message
news:7ebb01c2bb43$d6e6fb60$8bf82ecf@TK2MSFTNGXA05...
Microsoft's ActiveX Control Test Container hosts my simple
control witout a window the same size as my control.
Any other ideas?
Thanks,
Pete
---------
> Rob at r...@dptechnology.com wrote on 1/13/03 12:57 PM:
I'm sorry but you are mistaken. If you want to know how ActiveX control
containment works in MFC, please reference the ATL implementation of
CAxHostWindow. I know this code well since I've been developing a custom
container for our application.
The way MFC dialogs host windowless ActiveX controls is they create a window
the size of your windowless control. If the window wasn't the same size
then they wouldn't be able to handle the mouse over events properly.
Understand, the target of mouse message is dependent on whether the mouse
position is within the window's rectangle. The term windowless does not
mean that there is no window at all.
The reason Microsoft created the windowless control framework was because
previously control containment actually required two windows. The window of
the container plus the window of the control itself. Now with windowless
controls, the control can share the window of the container.
Rob
"Peter Mac Neil" <pe...@screentime.com> wrote in message
news:BA49CF88.B09%pe...@screentime.com...
If I can add just one more thing. I think the confusion here is that you
believe that the dialog box itself is a container. The truth is that the
dialog box is not a container. What an MFC dialog box does to contain
ActiveX controls is it creates a "host window" for each ActiveX control that
it parents. It's the "host window" that is the container.
I realize that the framework provides the ability to host multiple controls
within a container, however Microsoft's implementation of the "host window"
only supports one control. To the dialog box, the "host window" looks like
any other common control, ie. button, combobox, editbox. Only the "host
window" knows that there is an ActiveX control being instantiated.
Again, as I stated in my previous posting, if you investigate the
implementation of the CAxHostWindow template in the ATL you'll understand
better how this containment works.
Rob
"Rob" <r...@dptechnology.com> wrote in message
news:#mKP3aDvCHA.2488@TK2MSFTNGP12...