#include "hhctrl.h"
#include "stream.h"
+#ifdef __REACTOS__
#include "resource.h"
+#endif
#include "winreg.h"
#include "shlwapi.h"
/* merge the new data with any pre-existing HH_WINTYPE structure */
MergeChmProperties(&wintype, info, FALSE);
if (!info->WinType.pszCaption)
+#ifdef __REACTOS__
info->WinType.pszCaption = info->stringsW.pszCaption = (info->pCHMInfo->defTitle ? strdupW(info->pCHMInfo->defTitle) : HH_LoadString(IDS_DEFTITLE));
+#else
+ info->WinType.pszCaption = info->stringsW.pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : empty);
+#endif
if (!info->WinType.pszFile)
info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : empty);
if (!info->WinType.pszToc)
}
/* Loads a string from the resource file */
+#ifdef __REACTOS__
LPWSTR HH_LoadString(DWORD dwID)
{
LPWSTR string = NULL;
iSize = LoadStringW(hhctrl_hinstance, dwID, (LPWSTR)&stringresource, 0);
+ string = heap_alloc((iSize + 2) * sizeof(WCHAR)); /* some strings (tab text) needs double-null termination */
+ memcpy(string, stringresource, iSize * sizeof(WCHAR));
+ string[iSize] = UNICODE_NULL;
+
+ return string;
+}
+#else
+static LPWSTR HH_LoadString(DWORD dwID)
+{
+ LPWSTR string = NULL;
+ LPCWSTR stringresource;
+ int iSize;
+
+ iSize = LoadStringW(hhctrl_hinstance, dwID, (LPWSTR)&stringresource, 0);
+
string = heap_alloc((iSize + 2) * sizeof(WCHAR)); /* some strings (tab text) needs double-null termination */
memcpy(string, stringresource, iSize*sizeof(WCHAR));
string[iSize] = 0;
return string;
}
+#endif
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
{
wcex.cbClsExtra = 0;
wcex.cbWndExtra = sizeof(LONG_PTR);
wcex.hInstance = hhctrl_hinstance;
+#ifdef __REACTOS__
wcex.hIcon = LoadIconW(hhctrl_hinstance, MAKEINTRESOURCEW(IDI_HHICON));
+#else
+ wcex.hIcon = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION);
+#endif
wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_MENU + 1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = windowClassW;
+#ifdef __REACTOS__
wcex.hIconSm = NULL;
+#else
+ wcex.hIconSm = LoadIconW(NULL, (LPCWSTR)IDI_APPLICATION);
+#endif
RegisterClassExW(&wcex);
extern struct list window_list DECLSPEC_HIDDEN;
HHInfo *CreateHelpViewer(HHInfo*,LPCWSTR,HWND) DECLSPEC_HIDDEN;
void ReleaseHelpViewer(HHInfo*) DECLSPEC_HIDDEN;
+#ifdef __REACTOS__
LPWSTR HH_LoadString(DWORD dwID) DECLSPEC_HIDDEN;
+#endif
BOOL NavigateToUrl(HHInfo*,LPCWSTR) DECLSPEC_HIDDEN;
BOOL NavigateToChm(HHInfo*,LPCWSTR,LPCWSTR) DECLSPEC_HIDDEN;
void MergeChmProperties(HH_WINTYPEW*,HHInfo*,BOOL) DECLSPEC_HIDDEN;