Click here to Skip to main content
15,918,624 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: ATL / COM what's the use for ? Pin
Randor 1-Jun-10 8:30
professional Randor 1-Jun-10 8:30 
GeneralRe: ATL / COM what's the use for ? Pin
Schehaider_Aymen1-Jun-10 9:29
Schehaider_Aymen1-Jun-10 9:29 
GeneralRe: ATL / COM what's the use for ? Pin
Stephen Hewitt3-Jun-10 14:09
Stephen Hewitt3-Jun-10 14:09 
GeneralRe: ATL / COM what's the use for ? Pin
Schehaider_Aymen1-Jun-10 11:24
Schehaider_Aymen1-Jun-10 11:24 
GeneralRe: ATL / COM what's the use for ? Pin
Randor 1-Jun-10 12:14
professional Randor 1-Jun-10 12:14 
GeneralRe: ATL / COM what's the use for ? Pin
Schehaider_Aymen1-Jun-10 21:06
Schehaider_Aymen1-Jun-10 21:06 
AnswerRe: ATL / COM what's the use for ? Pin
Aescleal2-Jun-10 10:37
Aescleal2-Jun-10 10:37 
GeneralRe: ATL / COM what's the use for ? Pin
Schehaider_Aymen2-Jun-10 21:58
Schehaider_Aymen2-Jun-10 21:58 
QuestionWindows Vista not allowed to write file on C:\Users folder Pin
am 20091-Jun-10 3:50
am 20091-Jun-10 3:50 
AnswerRe: Windows Vista not allowed to write file on C:\Users folder Pin
Randor 1-Jun-10 8:38
professional Randor 1-Jun-10 8:38 
GeneralRe: Windows Vista not allowed to write file on C:\Users folder Pin
am 20092-Jun-10 4:27
am 20092-Jun-10 4:27 
QuestionRe: Windows Vista not allowed to write file on C:\Users folder Pin
Randor 2-Jun-10 7:46
professional Randor 2-Jun-10 7:46 
AnswerRe: Windows Vista not allowed to write file on C:\Users folder Pin
am 20093-Jun-10 4:21
am 20093-Jun-10 4:21 
QuestionProblem with Activex control property pages Pin
Sreenivas00328-May-10 2:17
Sreenivas00328-May-10 2:17 
QuestionAbout the remove() behavior of container list on MAC [modified] Pin
szh12113-May-10 15:47
szh12113-May-10 15:47 
AnswerRe: About the remove() behavior of container list on MAC Pin
szh12113-May-10 22:55
szh12113-May-10 22:55 
QuestionChild windows of non-modal dialog not receiving WM_DESTROY (at least not when expected) Pin
mjxy9-May-10 4:49
mjxy9-May-10 4:49 
QuestionHowto put a TrackBar in a Menu ? Pin
yarp27-Apr-10 1:07
yarp27-Apr-10 1:07 
QuestionCreating a borderless MDI child window Pin
Member 381982124-Apr-10 0:00
Member 381982124-Apr-10 0:00 
AnswerRe: Creating a borderless MDI child window Pin
Jonathan Davies24-Apr-10 1:06
Jonathan Davies24-Apr-10 1:06 
QuestionProblems while adding custom header with IWebBrowser2 [modified] Pin
arbittorr21-Apr-10 12:14
arbittorr21-Apr-10 12:14 
I'm trying to add my header in all requests using next method.
And I have two problems:

When I call Refresh() method (by pressing F5, etc) there is no DISPID_BEFORENAVIGATE event, so Myheader is not added
Referer header is lost if Myheader was successfully added

HRESULT __stdcall DWebBrowserEventsImpl::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS
 __RPC_FAR *pDispParams, VARIANT __RPC_FAR *pVarResult, EXCEPINFO __RPC_FAR *pExcepInfo, UINT __RPC_FAR *puArgErr)
{
.......
        switch (dispIdMember)
	{
		case DISPID_BEFORENAVIGATE:
		{
			std::wstring strUrl( _bstr_t(pDispParams->rgvarg[5].bstrVal) );

                        // prevent navcancl page
			if (_wcsicmp(&strUrl.at(strUrl.size() - 12), _T("navcancl.htm")) == 0)
			{
				m_cpParent->Stop();
				*pDispParams->rgvarg[0].pboolVal = VARIANT_TRUE;
			}
			else 
				if (!m_cpParent->GetHeaderAdded())  // stop navigation
				{
					m_cpParent->Stop();
					*pDispParams->rgvarg[0].pboolVal = VARIANT_TRUE;

                                        // my method, call IWebBrowser2.Navigate(...) with Myheader
					m_cpParent->NavigateWCustomHeader(_bstr_t(pDispParams->rgvarg[5].bstrVal),
                                                  L"Myheader: header\r\n", &pDispParams->rgvarg[4], &pDispParams->rgvarg[3], 
                                                  pDispParams->rgvarg[2].pvarVal, pDispParams->rgvarg[1]);
				}
				else
				{
					m_cpParent->SetHeaderAdded(false); //header was successfully added
					VARIANT_BOOL bCancel = VARIANT_FALSE;
					BeforeNavigate(_bstr_t(pDispParams->rgvarg[5].bstrVal),
						0,
						pDispParams->rgvarg[3].bstrVal,
						pDispParams->rgvarg[2].pvarVal,
						pDispParams->rgvarg[1].bstrVal,
						pDispParams->rgvarg[0].pboolVal);

					if (bCancel == VARIANT_TRUE)
						res = E_INVALIDARG;
				}
				
		}
		break;
        }
......
}

modified on Wednesday, April 21, 2010 6:20 PM

AnswerRe: Problems while adding custom header with IWebBrowser2 Pin
Stephen Hewitt22-Apr-10 14:09
Stephen Hewitt22-Apr-10 14:09 
GeneralRe: Problems while adding custom header with IWebBrowser2 Pin
arbittorr23-Apr-10 0:18
arbittorr23-Apr-10 0:18 
GeneralRe: Problems while adding custom header with IWebBrowser2 Pin
Jonathan Davies23-Apr-10 1:57
Jonathan Davies23-Apr-10 1:57 
GeneralRe: Problems while adding custom header with IWebBrowser2 Pin
arbittorr23-Apr-10 22:01
arbittorr23-Apr-10 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.