From: jmvalente on 15 Mar 2005 13:50 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 15 Mar 2005 16:07 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 >
|
Pages: 1 Prev: How to use Balloon Tool tips Next: MFC Application and Crystal Reports |