Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: programming for Internet Explorer Pin
Alex Shapovalov6-Aug-05 8:12
professionalAlex Shapovalov6-Aug-05 8:12 
Thank you, I read this arcticle, and I trying to do it. I create Class
class IMyIEExtention :<br />
	public IOleCommandTarget,<br />
	public IObjectWithSite,<br />
	public IDispatch<br />

and in function STDMETHODIMP IMyIEExtention::SetSite(IUnknown *pUnkSite);
i write
<br />
//	IConnectionPointContainer	*m_pCPC;<br />
	m_pMyWB = (IWebBrowser2*)pUnkSite;<br />
	IServiceProviderPtr pServProv(pUnkSite);<br />
	pServProv->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2, (void**)&m_pMyWB);<br />
	m_pMyWB->QueryInterface(IID_IConnectionPointContainer, (void**)&m_pCPC);<br />
	if (m_pCPC)<br />
	{<br />
		IConnectionPoint *spCP = NULL;<br />
		hr = m_pCPC->FindConnectionPoint(DIID_DWebBrowserEvents2, &spCP);<br />
		if (spCP)<br />
		{<br />
			spCP->Advise(reinterpret_cast<IDispatch*>(this), &m_dwCookie);<br />
		}<br />
	}<br />
	{

then i create function Invoce
<br />
HRESULT IMyIEExtention::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)<br />
{<br />
	return S_OK;<br />
}<br />

and I never been in function Invoke.
GeneralRe: programming for Internet Explorer Pin
ThatsAlok6-Aug-05 23:11
ThatsAlok6-Aug-05 23:11 
GeneralATl VC++6.0(MFC) calling........problem Pin
virender chauhan5-Aug-05 23:15
virender chauhan5-Aug-05 23:15 
GeneralRe: ATl VC++6.0(MFC) calling........problem Pin
ThatsAlok5-Aug-05 23:33
ThatsAlok5-Aug-05 23:33 
Questionhow can i detect a file's name has changed in my program? Pin
sophia22885-Aug-05 22:53
sophia22885-Aug-05 22:53 
AnswerRe: how can i detect a file's name has changed in my program? Pin
ThatsAlok5-Aug-05 23:04
ThatsAlok5-Aug-05 23:04 
Generalthe code smooths the problem,thanks a lot! Pin
sophia22885-Aug-05 23:28
sophia22885-Aug-05 23:28 
GeneralRe: the code smooths the problem,thanks a lot! Pin
ThatsAlok5-Aug-05 23:33
ThatsAlok5-Aug-05 23:33 
GeneralApplication Crash Pin
ashachandu5-Aug-05 21:42
ashachandu5-Aug-05 21:42 
Generalhelp me! about capture screen Pin
atemperman5-Aug-05 21:25
atemperman5-Aug-05 21:25 
GeneralRe: help me! about capture screen Pin
ThatsAlok5-Aug-05 23:14
ThatsAlok5-Aug-05 23:14 
GeneralLearning C++ Pin
Malthusian5-Aug-05 19:57
Malthusian5-Aug-05 19:57 
GeneralRe: Learning C++ Pin
ThatsAlok5-Aug-05 23:19
ThatsAlok5-Aug-05 23:19 
GeneralRe: Learning C++ Pin
Malthusian6-Aug-05 11:07
Malthusian6-Aug-05 11:07 
GeneralPlease help me! Pin
dSolariuM5-Aug-05 17:30
dSolariuM5-Aug-05 17:30 
GeneralCInternetFile: problem in reading remote file Pin
Aditya Rao5-Aug-05 16:59
Aditya Rao5-Aug-05 16:59 
GeneralRe: CInternetFile: problem in reading remote file Pin
Jose Lamas Rios5-Aug-05 17:17
Jose Lamas Rios5-Aug-05 17:17 
GeneralRe: CInternetFile: problem in reading remote file Pin
Aditya Rao5-Aug-05 18:00
Aditya Rao5-Aug-05 18:00 
GeneralRe: CInternetFile: problem in reading remote file Pin
sunit55-Aug-05 20:10
sunit55-Aug-05 20:10 
GeneralRe: CInternetFile: problem in reading remote file Pin
Jose Lamas Rios6-Aug-05 15:25
Jose Lamas Rios6-Aug-05 15:25 
GeneralRe: CInternetFile: problem in reading remote file Pin
Aditya Rao6-Aug-05 16:55
Aditya Rao6-Aug-05 16:55 
GeneralRe: CInternetFile: problem in reading remote file Pin
Jose Lamas Rios6-Aug-05 17:12
Jose Lamas Rios6-Aug-05 17:12 
GeneralHiding CMenu items Pin
Ivan Cachicatari5-Aug-05 15:47
Ivan Cachicatari5-Aug-05 15:47 
GeneralRe: Hiding CMenu items Pin
ThatsAlok5-Aug-05 20:41
ThatsAlok5-Aug-05 20:41 
GeneralGive you the example: Pin
bghuang6-Aug-05 2:45
bghuang6-Aug-05 2:45 

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.