How to get the right URL before navigating the web page in the CHtmlView? Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2. I Navigate an URL as following: CHTMLControl* pHTMLControl; … pHTMLControl->Navigate2(strURL); In the opened web page, there is a link whose html code is below: Free Search After clicking on this link in the html view, the following function is called void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) But in this function, the value of lpszURL is "javascriptclickProcess("search");" How can I get the right URL of the next page before navigating it? Thanks
superhandwolf
Posts
-
How to get the right URL before navigating the web page in the CHtmlView? -
How to get the right URL before navigating the web page in the CHtmlView?How to get the right URL before navigating the web page in the CHtmlView? Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2. I Navigate an URL as following: CHTMLControl* pHTMLControl; … pHTMLControl->Navigate2(strURL); In the opened web page, there is a link whose html code is below: Free Search After clicking on this link in the html view, the following function is called void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) But in this function, the value of lpszURL is "javascriptclickProcess("search");" How can I get the right URL of the next page before navigating it? Thanks
-
How to get the right URL before navigating the web page in the CHtmlView?How to get the right URL before navigating the web page in the CHtmlView? Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2. I Navigate an URL as following: CHTMLControl* pHTMLControl; … pHTMLControl->Navigate2(strURL); In the opened web page, there is a link whose html code is below: Free Search After clicking on this link in the html view, the following function is called void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) But in this function, the value of lpszURL is "javascriptclickProcess("search");" How can I get the right URL of the next page before navigating it? Thanks -- modified at 11:52 Monday 17th October, 2005
-
How to get the right URL before navigating the web page in the CHtmlView?How to get the right URL before navigating the web page in the CHtmlView? Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2. I Navigate an URL as following: CHTMLControl* pHTMLControl; … pHTMLControl->Navigate2(strURL); In the opened web page, there is a link whose html code is below: [Free Search](javascript:clickProcess("search");) After clicking on this link in the html view, the following function is called void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) But in this function, the value of lpszURL is "javascript:clickProcess("search");" How can I get the right URL of the next page before navigating it? Thanks
-
Setting the Title in an SDI ApplicationAdd cs.style = WS_OVERLAPPEDWINDOW;" to function CMainFrame::PreCreateWindow, and add SetWindowText("mytitle"); to function CMainFrame::OnCreate. Then the title is changed to "mytitle". BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; cs.style = WS_OVERLAPPEDWINDOW; return TRUE; } int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { //... SetWindowText("mytitle"); return 0; }
-
handwolf@126.comI have building this project successfully in the Visual C++ 7.0. But I still would like to know how to fix this problem in Visual C++ 6.0.
-
handwolf@126.comthe error messages are partly listed below: c:\program files\microsoft platform sdk\include\mshtml.h(40510) : error C2061: syntax error : identifier 'LONG_PTR' c:\program files\microsoft platform sdk\include\mshtml.h(40513) : error C2061: syntax error : identifier 'LONG_PTR' c:\program files\microsoft platform sdk\include\mshtml.h(40516) : error C2061: syntax error : identifier 'LONG_PTR' ... The corresponding codes in the file mshtml.h is listed below: virtual /* [nonbrowsable][restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_imeCompositionChange( /* [out][retval] */ LONG_PTR *p) = 0; virtual /* [nonbrowsable][restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_imeNotifyCommand( /* [out][retval] */ LONG_PTR *p) = 0; virtual /* [nonbrowsable][restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_imeNotifyData( /* [out][retval] */ LONG_PTR *p) = 0; How to resolve this problem? Study! Study! Study! Hard! Hard! Hard! -- modified at 7:30 Monday 5th September, 2005
-
handwolf@126.comA vc project using IHTMLDocument3 interface: #include //... class CHTMLDocument2 : public CObject { //... IHTMLDocument3* pHTMLDocument3; }; When I building this project, report error messages as follows: error C2143: syntax error : missing ';' before '*' error C2501: 'IHTMLDocument3' : missing storage-class or type specifiers And I find that there isn't class IHTMLDocument3 in the file of my compuer. Is there anyone tell me how to upgrade and mshtml.dll to use IHTMLDocument3 interface? Or other way to build this project successfully? Thanks :) Study! Study! Study! Hard! Hard! Hard! -- modified at 5:06 Monday 5th September, 2005