Windows Vista Beta | WinVistaBeta.com - Message | how can i cancel the navigation used "OnBeforeNavigate2" in vista?

July 05, 2008  
Subject: how can i cancel the navigation used "OnBeforeNavigate2" in vista?
Group: microsoft.public.windows.developer.winfx.announcements
Date: 11/24/2006 9:42:01 PM
From: =?Utf-8?B?R2VuaWU=?= [Email Address Protection]

it problem only happen to in vista.

how can i cancel the navigation in vista???

below is problem function ..

/////////////////////////////////////////////////////////////////////////////////////////////////////////
void CWebB::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR
lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL*
pbCancel)
{


if(szURL.Find(_T("http://GOTO_SEE")) >= 0)
{
theApp.m_pMainWnd->PostMessage(WM_COMMAND, IDM_GOTO_SEEGOTO_SEE,
BN_CLICKED);

// Does not cancel the navigation.
// only time over msg that "DNS ERROR"
*pbCancel = TRUE;

}

CHtmlView::OnBeforeNavigate2(szURL, nFlags, lpszTargetFrameName,
baPostedData, lpszHeaders, pbCancel);

}
/////////////////////////////////////////////////////////////////////////////////////////////////////////


Back