本文介绍了在Visual C ++ Expres 2010中使用SHDocVw.InternetExplorer的DocumentComplete事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SHDocVw.InternetExplorer,我正在尝试捕获正在运行的IE实例的DocumentComplete事件。



但是,我试过的东西看起来似乎没有用。



using the SHDocVw.InternetExplorer, I'm trying to capture the DocumentComplete event of a running IE instance.

But, what ever I try it looks like the event does not work.

SHDocVw::InternetExplorer ^IE;
MSHTML::IHTMLDocument2 ^doc;
private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
	IE = gcnew SHDocVw::InternetExplorer();
	IE->Visible = true;
	System::Object ^URL;
 	URL= "https://www.google.com";
 	System::Object ^null;
	null=nullptr;
				
	IE->Navigate2(URL, null, null, null, null);

	IE->DocumentComplete += gcnew 	SHDocVw::DWebBrowserEvents2_DocumentCompleteEventHandler(this, &Form1::onDownloadCompleteAlarmProcedure);
	}

private: System::Void onDownloadCompleteAlarmProcedure(System::Object ^,System::Object ^%) {
	doc = (MSHTML::IHTMLDocument2^)IE->Document;
	}





真的在这里给予任何帮助。



谢谢!

Marcel



Really appriciate any help here.

Thanks!
Marcel

推荐答案


这篇关于在Visual C ++ Expres 2010中使用SHDocVw.InternetExplorer的DocumentComplete事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 01:16