From: jmvalente on
hi,
I've created my own "CCustomControlSite : public COleControlSite".
My aplication uses a "CHtmlWnd : public CHtmlView".

- A CHtmlView acts as a container right?
- If acts like a container it must create COleControlSite?
- Whow can I "replace" the creation of the COleControlSite with my
CCustomControlSite?

I doing the following( but It doesn't work. I'm developing in vc6.
):

BOOL CHtmlDesktopView::CreateControlSite(COleControlContainer*
pContainer,
COleControlSite** ppSite, UINT nID, REFCLSID clsid)
{
ASSERT(ppSite != NULL);
*ppSite = new CCustomControlSite(pContainer);
return TRUE;
}


Thanks for all the help you can give me

Jose Valente

From: Jiangsheng[MVP/VC] on
A CHtmlView is a CFormView with a webbrowser control. To customize this
webbrowser control in VC6, you need to derive COleControlSite and
COleControlContainer and call AfxEnableControlContainer with a derived
COleControlContainer object. In VC7 or higher, you can use
CreateControlSite to customize the control.

For more information,
http://www.beginthread.com/Article/Ehsan/Advanced%20CHtmlView%20Hosting/

also useful: http://support.microsoft.com/kb/329802


"jmvalente" <jmvalente(a)gmail.com>
??????:1110912605.174790.191790(a)l41g2000cwc.googlegroups.com...
> hi,
> I've created my own "CCustomControlSite : public COleControlSite".
> My aplication uses a "CHtmlWnd : public CHtmlView".
>
> - A CHtmlView acts as a container right?
> - If acts like a container it must create COleControlSite?
> - Whow can I "replace" the creation of the COleControlSite with my
> CCustomControlSite?
>
> I doing the following( but It doesn't work. I'm developing in vc6.
> ):
>
> BOOL CHtmlDesktopView::CreateControlSite(COleControlContainer*
> pContainer,
> COleControlSite** ppSite, UINT nID, REFCLSID clsid)
> {
> ASSERT(ppSite != NULL);
> *ppSite = new CCustomControlSite(pContainer);
> return TRUE;
> }
>
>
> Thanks for all the help you can give me
>
> Jose Valente
>