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)
V_VT(&url) = VT_BSTR;
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);
......@@ -268,7 +268,7 @@ static void DoSync(HHInfo *info)
HRESULT hres;
BSTR url;
hres = IWebBrowser2_get_LocationURL(info->web_browser, &url);
hres = IWebBrowser2_get_LocationURL(info->web_browser->web_browser, &url);
if (FAILED(hres))
{
......@@ -874,22 +874,22 @@ static void TB_OnClick(HWND hWnd, DWORD dwID)
switch (dwID)
{
case IDTB_STOP:
DoPageAction(info, WB_STOP);
DoPageAction(info->web_browser, WB_STOP);
break;
case IDTB_REFRESH:
DoPageAction(info, WB_REFRESH);
DoPageAction(info->web_browser, WB_REFRESH);
break;
case IDTB_BACK:
DoPageAction(info, WB_GOBACK);
DoPageAction(info->web_browser, WB_GOBACK);
break;
case IDTB_HOME:
NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszHome);
break;
case IDTB_FORWARD:
DoPageAction(info, WB_GOFORWARD);
DoPageAction(info->web_browser, WB_GOFORWARD);
break;
case IDTB_PRINT:
DoPageAction(info, WB_PRINT);
DoPageAction(info->web_browser, WB_PRINT);
break;
case IDTB_EXPAND:
case IDTB_CONTRACT:
......
......@@ -169,9 +169,20 @@ struct wintype_stringsA {
};
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;
IOleObject *wb_object;
HWND hwndWindow;
} WebBrowserContainer;
typedef struct {
WebBrowserContainer *web_browser;
HH_WINTYPEW WinType;
......@@ -197,7 +208,7 @@ typedef struct {
BOOL InitWebBrowser(HHInfo*,HWND) DECLSPEC_HIDDEN;
void ReleaseWebBrowser(HHInfo*) 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 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