[python-win32] win32com IE OnBeforeNavigate2: How to Cancel?
Robert
kxroberto at googlemail.com
Thu Feb 25 20:47:42 CET 2010
class MyWebBrowser(activex.Control, WebBrowserModule.WebBrowser):
def OnBeforeNavigate2(self, pDisp, URL, Flags,
TargetFrameName, PostData, Headers, Cancel):
...
Cancel is a simple Python bool. Unlike in MFC
CHtmlView::OnBeforeNavigate2 I cannot send a value back by ref
this way. How to cancel the navigation?
Robert
---------
This member function is called by the framework to cause an event
to fire before a navigation occurs in the web browser.
virtual void OnBeforeNavigate2(
LPCTSTR lpszURL,
DWORD nFlags,
LPCTSTR lpszTargetFrameName,
CByteArray& baPostedData,
LPCTSTR lpszHeaders,
BOOL* pbCancel
);
More information about the python-win32
mailing list