I have created a HTML resource but I am not getting the web browser functions. Also how to modify OnInitialUpdate() so that its derived from CHtmlView.<br><br>Zulfi
Dear Zulfi,<br><br>Well to start, you can't derive from anything in OnIntialUpdate(). Actually you can't derive from any function since derivation is a C++ compile time feature not a runtime feature. <br><br>So either you need to brush up on your C++ or your question is confusing. <br><br>If you wanted your view class to be derived from CHtmlView you should have done that in the 'App Wizard' steps. It can be done manually by creating a new class derived from CHtmlView and replacing it with your original view in the document template constructor in your application class's InitInstance(). If that last sentence is confusing then you probably are not ready to try that method yet, so hopefully you just started the project and you can start over and select CHtmlView in the App Wizard step.<br><br>Hope this helps<br>-pete<br><br><br>
I want something like that <br>void CIEAppView::OnInitialUpdate()<br>{<br> CHtmlView::OnInitialUpdate();<br><br> // Load initial HTML content from resource.<br> //LoadFromResource(IDR_HTML1);(Please ignore it)<br>}<br><br>BOOL CIEAppView:reCreateWindow(CREATESTRUCT& cs)<br>{<br> // TODO: Modify the Window class or styles here by modifying<br> // the CREATESTRUCT cs<br><br> return CView:reCreateWindow(cs);<br>}<br><br>but I am getting <br><br>void CIEAppView::OnInitialUpdate()<br>{<br> CView::OnInitialUpdate();<br><br> // Load initial HTML content from resource.<br> LoadFromResource(IDR_HTML1);<br>}<br><br>BOOL CIEAppView:reCreateWindow(CREATESTRUCT& cs)<br>{<br> // TODO: Modify the Window class or styles here by modifying<br> // the CREATESTRUCT cs<br><br> return CView:reCreateWindow(cs);<br>}<br><br><br><br>I have added a HTML resource .<br>I also want the browser functionality i.e <br>void CIEAppView::OnViewRefresh() <br>{<br> // Defer to base function<br> Refresh(); <br>}<br><br>void CIEAppView::OnViewStop() <br>{<br> // Defer to base function<br> Stop(); <br>}<br><br>void CIEAppView::OnGoBack() <br>{<br> // Defer to base function<br> GoBack(); <br>}<br><br>void CIEAppView::OnGoForward() <br>{<br> // Defer to base function<br> GoForward(); <br>}<br><br>void CIEAppView::OnGoHome() <br>{<br> // Defer to base function<br> GoHome(); <br>}<br><br>Will the above functions & the toolbar similar to IE would be coming implicitly<br>just by adding the HTML resource or I have to do something more.<br><br>Zulfi.
Sorry I wrongly used the word derive:<br>Actually I am looking for browser functions & the toolbar similar to IE. I think I can get it simply by adding the HTML resource<br>void CIEAppView::OnViewRefresh() <br>{<br> // Defer to base function<br> Refresh(); <br>}<br><br>void CIEAppView::OnViewStop() <br>{<br> // Defer to base function<br> Stop(); <br>}<br><br>void CIEAppView::OnGoBack() <br>{<br> // Defer to base function<br> GoBack(); <br>}<br><br>void CIEAppView::OnGoForward() <br>{<br> // Defer to base function<br> GoForward(); <br>}<br><br>void CIEAppView::OnGoHome() <br>{<br> // Defer to base function<br> GoHome(); <br>}<br>
has examples of what you are looking for, though from the look of 'your' sample code above you might have already found it.<br><br>....<br><br>I have a question that you might be able to help with palbano. Do you know a way of trapping when a user Right mouse clicks on a HTML page and clicks Refresh. Or presses F5 to refresh.<br><br>The problem i have is that i don't want specific pages to refresh, or refresh in some specific way and when a user clicks on RMB then chooses refresh it seems that it doesn't call any event handlers.<br><br>Know any way around this?<br><br>Thanks,<br><br>keelwan<br><br><br><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.