1
0
mirror of https://e.coding.net/circlecloud/LoadFirstPic.git synced 2024-12-28 08:08:50 +00:00

update file...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-06-12 00:11:46 +08:00
parent 32c498db7c
commit 174b8c49af
2 changed files with 7 additions and 273 deletions

270
webb.txt
View File

@ -1,4 +1,4 @@
1.获取WebBrowser加载网页的内容 1.获取WebBrowser加载网页的内容
WebBrowser1.Document.getElementById("kw").Value = "VB编程" WebBrowser1.Document.getElementById("kw").Value = "VB编程"
@ -137,6 +137,7 @@ Headers As Variant, _
Cancel As Boolean) Cancel As Boolean)
If TypeName(pDisp) = "WebBrowser" And Headers = "" Then If TypeName(pDisp) = "WebBrowser" And Headers = "" Then
pDisp.Stop pDisp.Stop
@ -316,323 +317,64 @@ LPUNKNOWN lpUnknownDC = NULL;
lpUnknown = m_webBrowser.GetControlUnknown(); lpUnknown = m_webBrowser.GetControlUnknown();
ASSERT(lpUnknown); ASSERT(lpUnknown);
if (lpUnknown) if (lpUnknown)
{ {
// Get the pointer to the IUnknown interface of the WebBrowser // Get the pointer to the IUnknown interface of the WebBrowser
// control being hosted. The pointer to the IUnknown returned from // control being hosted. The pointer to the IUnknown returned from
// GetControlUnknown is not the pointer to the IUnknown of the // GetControlUnknown is not the pointer to the IUnknown of the
// WebBrowser control. It's actually a pointer to the IOleObject. // WebBrowser control. It's actually a pointer to the IOleObject.
// //
hr = lpUnknown->QueryInterface(IID_IUnknown, hr = lpUnknown->QueryInterface(IID_IUnknown,
(LPVOID*)&lpUnknownWB); (LPVOID*)&lpUnknownWB);
ASSERT(SUCCEEDED(hr)); ASSERT(SUCCEEDED(hr));
if (FAILED(hr)) if (FAILED(hr))
return; return;
// Get the pointer to the IUnknown of the object that fired this // Get the pointer to the IUnknown of the object that fired this
// event. // event.
// //
hr = lpDispatch->QueryInterface(IID_IUnknown, hr = lpDispatch->QueryInterface(IID_IUnknown,
(LPVOID*)&lpUnknownDC); (LPVOID*)&lpUnknownDC);
ASSERT(SUCCEEDED(hr)); ASSERT(SUCCEEDED(hr));
if (SUCCEEDED(hr) && lpUnknownWB == lpUnknownDC) if (SUCCEEDED(hr) && lpUnknownWB == lpUnknownDC)
{ {
// The document has finished loading. // The document has finished loading.
// //
MessageBox("The document has finished loading."); MessageBox("The document has finished loading.");
} }
if (lpUnknownWB) if (lpUnknownWB)
lpUnknownWB->Release(); lpUnknownWB->Release();
if (lpUnknownDC) if (lpUnknownDC)
lpUnknownDC->Release(); lpUnknownDC->Release();
} }
} }
@ -798,10 +540,6 @@ m_dlgNewWB->Create(IDD_MYDLG_DIALOG);
记住当你完成打开的新对话框后删除delete m_dlgNewWB . 且不要在CMyDlg::OnInitDialog 方法中导航, 因为这样代码将不会工作. 记住当你完成打开的新对话框后删除delete m_dlgNewWB . 且不要在CMyDlg::OnInitDialog 方法中导航, 因为这样代码将不会工作.
ProgressChange ProgressChange
ProgressChange 事件通告你的应用程序下在操作状态已经更新. ProgressChange 有两个参数: ProgressChange 事件通告你的应用程序下在操作状态已经更新. ProgressChange 有两个参数:
@ -813,8 +551,4 @@ ProgressMax. 最大进度值
事件发生序列 事件发生序列
下图展示了IE的事件发生序列.但这仅仅为不包含帧的普通网页浏览. (没有包含诸如 ProgressChange , CommandStateChange , OnToolBar , 等等事件.)不是所有事件都会被激发. 但是 BeforeNavigate2 和DocumentComplete 每次浏览都会被激发. 下图展示了IE的事件发生序列.但这仅仅为不包含帧的普通网页浏览. (没有包含诸如 ProgressChange , CommandStateChange , OnToolBar , 等等事件.)不是所有事件都会被激发. 但是 BeforeNavigate2 和DocumentComplete 每次浏览都会被激发.
Figure 7-5. The sequence of events fired by the WebBrowser control during a typical navigation. Figure 7-5. The sequence of events fired by the WebBrowser control during a typical navigation.

View File

@ -1,5 +1,5 @@
Frm_Main = 0, 0, 984, 374, Z, 0, 0, 918, 535, C Frm_Main = 0, 0, 984, 374, , 0, 0, 918, 535, C
TzDownload = 22, 22, 1006, 396, , 75, 75, 961, 524, C TzDownload = 0, 0, 0, 0, C, 0, 0, 0, 0, C
TzListBox = 88, 88, 1072, 462, C, 22, 22, 940, 557, C TzListBox = 0, 0, 0, 0, C, 0, 0, 0, 0, C
Frm_Download = 174, 51, 1224, 550, , 44, 44, 1028, 418, C Frm_Download = 0, 0, 0, 0, C, 0, 0, 0, 0, C
TzProgressBar = 88, 88, 1139, 462, , 0, 0, 0, 0, C TzProgressBar = 0, 0, 0, 0, C, 0, 0, 0, 0, C