Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Html page won't open

Status
Not open for further replies.

bracoute

Programmer
Mar 27, 2002
1
MU
Hello programmers

I've tried all i can to make my HtmlEditor work but with no success...
i always have the assert debug ERROR....

Let me xplain:

i use MFC app Wiz to make an MDI form with splitter bar (Explorer styles)
then i use HtmlView as my base class for the right part of the splitter bar
i modified the CLeftView (what MFC app wiz gave me) by replacing all the CTreeView with
CEditView. So now i have CEditView to write on the left and CHtmlView to display what
i've written on the left. I've included a serialization function in
the CHEditView (on the right derived from CHtmlView)... it is as follows:

[ccode]

POSITION pos = GetFirstViewPosition();
CEditView *pView = (CEditView*) GetNextView(pos);
pView->SerializeRaw(ar);

[/ccode]

It saves and loads a files from and to CEditView ok
Now i want to open an html file in my CHtmlView (the view on the right CHEditorView)
so i included these 2 functions:

void CMainFrame::OnOpenhtml()
{
// TODO: Add your command handler code here
MessageBox("We are in the MainFrame fx");

CHEditorView* pView2 = new CHEditorView;
pView2->OnOpenView();


}

and -------------------------

void CHEditorView::OnOpenView()
{
// TODO: Add your command handler code here

CFileDialog dlg(true);
if(dlg.DoModal() == IDOK)
Navigate2(dlg.GetPathName(),0,NULL);

}

i linked the CMainFrame::OnOpenhtml() to a menu of my menu bar |Open html|

Now i try to open an html file with the menu bar |Open html| but gets an assert debug
fail error.... i'm desperate can someone plz help

I've uploaded a copy of my project (very small one) HEditor.zip in source code on the following website
bytein@netfirms.com ---> please check it and tell me what's wrong plzzzz!

Thanks in advance, i know it was long
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top