Print Page | Close Window

CXTHtmlView and AfxEnableControlContainer

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=986
Printed Date: 17 July 2025 at 5:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTHtmlView and AfxEnableControlContainer
Posted By: Italo
Subject: CXTHtmlView and AfxEnableControlContainer
Date Posted: 27 July 2004 at 12:31pm

I’m creating and instance of CXTHtmlView with a custom COleControlSite. The problem is that CXTHtmlView::Create calls AfxEnableControlContainer which sets the default control site. Can this be removed from the method? I don’t see a problem having the user call AfxEnableControlContainer before creating an instance of CXTHtmlView.

Thanks, Italo




Replies:
Posted By: Ark42
Date Posted: 27 July 2004 at 12:53pm

I'm not sure what the point of CXTHtmlView is compared to CHtmlView.  I hear in MFC 7 there is a lot more functionality in CHtmlView, but if you are stuck with MFC 6, you are better off creating your own CHtmlView class.
I made my own that includes the fixes from Q241750 and also uses the control site modifications to disable the context menu and drag-and-drop URL feature. There are tons of samples around the web on how to do this, some with even tons more features like if you want to program window.external from javascript. Personally I just stick to forms in the html.  Its pretty easy to use OnBeforeNavigate2 to get the form values and OnDownloadComplete to set them.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net