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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHtmlEditView problem

Status
Not open for further replies.

Macelarul

Programmer
Mar 15, 2005
1
RO
Hi,
I've made a MDI with a view dervied form CHtmlEditView.
The promblem is OnBeforeNavigate2.
This is my code.

void CXProcView::OnBeforeNavigate2(LPCTSTR lpszURL,DWORD nFlags,LPCTSTR lpszTargetFrameName,CByteArray& baPostedData,LPCTSTR lpszHeaders,BOOL* pbCancel)
{
*pbCancel = FALSE;
AfxMessageBox(lpszURL);
CHtmlEditView::OnBeforeNavigate2(lpszURL, nFlags,
lpszTargetFrameName, baPostedData,
lpszHeaders, pbCancel);
}

When I hit a link in my view I get the message from the AfxMessageBox. pbCancel is TRUE, but the page still loads.
If I don't run CHtmlEditView::OnBeforeNavigate2 from my CXProcView::OnBeforeNavigate2 then the page will not be ready.

Does someone knows what is wrong here?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top