Commit efe4be65 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

hhctrl.ocx: Store WebBrowser container struct instead of interfaces in HHInfo.

parent dd2dbde6
...@@ -196,7 +196,7 @@ static HRESULT navigate_url(HHInfo *info, LPCWSTR surl) ...@@ -196,7 +196,7 @@ static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
V_VT(&url) = VT_BSTR; V_VT(&url) = VT_BSTR;
V_BSTR(&url) = SysAllocString(surl); V_BSTR(&url) = SysAllocString(surl);
hres = IWebBrowser2_Navigate2(info->web_browser, &url, 0, 0, 0, 0); hres = IWebBrowser2_Navigate2(info->web_browser->web_browser, &url, 0, 0, 0, 0);
VariantClear(&url); VariantClear(&url);
...@@ -268,7 +268,7 @@ static void DoSync(HHInfo *info) ...@@ -268,7 +268,7 @@ static void DoSync(HHInfo *info)
HRESULT hres; HRESULT hres;
BSTR url; BSTR url;
hres = IWebBrowser2_get_LocationURL(info->web_browser, &url); hres = IWebBrowser2_get_LocationURL(info->web_browser->web_browser, &url);
if (FAILED(hres)) if (FAILED(hres))
{ {
...@@ -874,22 +874,22 @@ static void TB_OnClick(HWND hWnd, DWORD dwID) ...@@ -874,22 +874,22 @@ static void TB_OnClick(HWND hWnd, DWORD dwID)
switch (dwID) switch (dwID)
{ {
case IDTB_STOP: case IDTB_STOP:
DoPageAction(info, WB_STOP); DoPageAction(info->web_browser, WB_STOP);
break; break;
case IDTB_REFRESH: case IDTB_REFRESH:
DoPageAction(info, WB_REFRESH); DoPageAction(info->web_browser, WB_REFRESH);
break; break;
case IDTB_BACK: case IDTB_BACK:
DoPageAction(info, WB_GOBACK); DoPageAction(info->web_browser, WB_GOBACK);
break; break;
case IDTB_HOME: case IDTB_HOME:
NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszHome); NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszHome);
break; break;
case IDTB_FORWARD: case IDTB_FORWARD:
DoPageAction(info, WB_GOFORWARD); DoPageAction(info->web_browser, WB_GOFORWARD);
break; break;
case IDTB_PRINT: case IDTB_PRINT:
DoPageAction(info, WB_PRINT); DoPageAction(info->web_browser, WB_PRINT);
break; break;
case IDTB_EXPAND: case IDTB_EXPAND:
case IDTB_CONTRACT: case IDTB_CONTRACT:
......
...@@ -169,9 +169,20 @@ struct wintype_stringsA { ...@@ -169,9 +169,20 @@ struct wintype_stringsA {
}; };
typedef struct { typedef struct {
IOleClientSite *client_site; IOleClientSite IOleClientSite_iface;
IOleInPlaceSite IOleInPlaceSite_iface;
IOleInPlaceFrame IOleInPlaceFrame_iface;
IDocHostUIHandler IDocHostUIHandler_iface;
LONG ref;
IOleObject *ole_obj;
IWebBrowser2 *web_browser; IWebBrowser2 *web_browser;
IOleObject *wb_object; HWND hwndWindow;
} WebBrowserContainer;
typedef struct {
WebBrowserContainer *web_browser;
HH_WINTYPEW WinType; HH_WINTYPEW WinType;
...@@ -197,7 +208,7 @@ typedef struct { ...@@ -197,7 +208,7 @@ typedef struct {
BOOL InitWebBrowser(HHInfo*,HWND) DECLSPEC_HIDDEN; BOOL InitWebBrowser(HHInfo*,HWND) DECLSPEC_HIDDEN;
void ReleaseWebBrowser(HHInfo*) DECLSPEC_HIDDEN; void ReleaseWebBrowser(HHInfo*) DECLSPEC_HIDDEN;
void ResizeWebBrowser(HHInfo*,DWORD,DWORD) DECLSPEC_HIDDEN; void ResizeWebBrowser(HHInfo*,DWORD,DWORD) DECLSPEC_HIDDEN;
void DoPageAction(HHInfo*,DWORD) DECLSPEC_HIDDEN; void DoPageAction(WebBrowserContainer*,DWORD) DECLSPEC_HIDDEN;
void InitContent(HHInfo*) DECLSPEC_HIDDEN; void InitContent(HHInfo*) DECLSPEC_HIDDEN;
void ReleaseContent(HHInfo*) DECLSPEC_HIDDEN; void ReleaseContent(HHInfo*) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment