Commit bbaa72de authored by Vladimir Pankratov's avatar Vladimir Pankratov Committed by Alexandre Julliard

shdocvw: Implement go_home function.

parent 42dc7fb1
...@@ -776,11 +776,27 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, ...@@ -776,11 +776,27 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
HRESULT go_home(DocHost *This) HRESULT go_home(DocHost *This)
{ {
HKEY hkey;
DWORD res, type, size;
WCHAR wszPageName[MAX_PATH];
static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
static const WCHAR wszStartPage[] = {'S','t','a','r','t',' ','P','a','g','e',0};
static const WCHAR wszSubKey[] = {'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
'M','a','i','n',0};
res = RegOpenKeyW(HKEY_CURRENT_USER, wszSubKey, &hkey);
if (res != ERROR_SUCCESS)
return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
size = sizeof(wszPageName);
res = RegQueryValueExW(hkey, wszStartPage, NULL, &type, (LPBYTE)&wszPageName, &size);
RegCloseKey(hkey);
if (res != ERROR_SUCCESS || type != REG_SZ)
return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
FIXME("stub\n"); return navigate_url(This, wszPageName, NULL, NULL, NULL, NULL);
return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
} }
#define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface) #define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface)
......
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