[xiph-commits] r8075 - in trunk/oggdsf: docs src/lib/plugin/axAnxOggPlayer

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Oct 24 00:18:05 PDT 2004


Author: illiminable
Date: 2004-10-24 00:18:05 -0700 (Sun, 24 Oct 2004)
New Revision: 8075

Modified:
   trunk/oggdsf/docs/activeX.txt
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp
Log:
* Grab the browser interface and give it to the dialog class.

Modified: trunk/oggdsf/docs/activeX.txt
===================================================================
--- trunk/oggdsf/docs/activeX.txt	2004-10-24 07:08:18 UTC (rev 8074)
+++ trunk/oggdsf/docs/activeX.txt	2004-10-24 07:18:05 UTC (rev 8075)
@@ -60,8 +60,31 @@
 
 Manually implement a function for setBrowser in ControlDialog.cpp, which assingsg inBrowser to mBrowser.
 
+Add the following code into the ctrl classes OnCreate method to grab the browser interface and send it to the
+ dialog.
 
+	IServiceProvider* locISP = NULL;
+	IWebBrowser2* locBrowser = NULL;
 
+	HRESULT locHR = GetClientSite()->QueryInterface(IID_IServiceProvider, (void **)&locISP);
+	if (locHR == S_OK) {
+		locHR = locISP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void **)&locBrowser);
+		if (locHR == S_OK) {
+			mDialog.setBrowser(locBrowser);
+			
+		}
+		locISP->Release();
 
+	}
 
 
+Put the following code in the destructor for the dialog class.
+
+	if (mBrowser != NULL) {
+		mBrowser->Release();
+	}
+
+
+
+
+

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp	2004-10-24 07:08:18 UTC (rev 8074)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp	2004-10-24 07:18:05 UTC (rev 8075)
@@ -18,6 +18,9 @@
 
 CControlDialog::~CControlDialog()
 {
+	if (mBrowser != NULL) {
+		mBrowser->Release();
+	}
 }
 
 void CControlDialog::DoDataExchange(CDataExchange* pDX)

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp	2004-10-24 07:08:18 UTC (rev 8074)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp	2004-10-24 07:18:05 UTC (rev 8075)
@@ -222,6 +222,18 @@
 	if (COleControl::OnCreate(lpCreateStruct) == -1)
 		return -1;
 
+	IServiceProvider* locISP = NULL;
+	IWebBrowser2* locBrowser = NULL;
+
+	HRESULT locHR = GetClientSite()->QueryInterface(IID_IServiceProvider, (void **)&locISP);
+	if (locHR == S_OK) {
+		locHR = locISP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void **)&locBrowser);
+		if (locHR == S_OK) {
+			mDialog.setBrowser(locBrowser);
+			
+		}
+		locISP->Release();
+	}
 	// TODO:  Add your specialized creation code here
 	mDialog.Create(IDD_DIALOG1, this);
 	mDialog.ShowWindow(TRUE);



More information about the commits mailing list