Commit 448fed20 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winhelp: Implemented SetHelpOnFile macro.

parent f6e93ea2
...@@ -2641,5 +2641,6 @@ void HLPFILE_FreeHlpFile(HLPFILE* hlpfile) ...@@ -2641,5 +2641,6 @@ void HLPFILE_FreeHlpFile(HLPFILE* hlpfile)
HeapFree(GetProcessHeap(), 0, hlpfile->phrases_offsets); HeapFree(GetProcessHeap(), 0, hlpfile->phrases_offsets);
HeapFree(GetProcessHeap(), 0, hlpfile->phrases_buffer); HeapFree(GetProcessHeap(), 0, hlpfile->phrases_buffer);
HeapFree(GetProcessHeap(), 0, hlpfile->topic_map); HeapFree(GetProcessHeap(), 0, hlpfile->topic_map);
HeapFree(GetProcessHeap(), 0, hlpfile->help_on_file);
HeapFree(GetProcessHeap(), 0, hlpfile); HeapFree(GetProcessHeap(), 0, hlpfile);
} }
...@@ -132,6 +132,8 @@ typedef struct tagHlpFileFile ...@@ -132,6 +132,8 @@ typedef struct tagHlpFileFile
unsigned numWindows; unsigned numWindows;
HLPFILE_WINDOWINFO* windows; HLPFILE_WINDOWINFO* windows;
HICON hIcon; HICON hIcon;
LPSTR help_on_file;
} HLPFILE; } HLPFILE;
/* /*
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Help Viewer * Help Viewer
* *
* Copyright 1996 Ulrich Schmid * Copyright 1996 Ulrich Schmid
* Copyright 2002 Eric Pouech * Copyright 2002, 2008 Eric Pouech
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -555,8 +555,14 @@ void CALLBACK MACRO_GotoMark(LPCSTR str) ...@@ -555,8 +555,14 @@ void CALLBACK MACRO_GotoMark(LPCSTR str)
void CALLBACK MACRO_HelpOn(void) void CALLBACK MACRO_HelpOn(void)
{ {
LPCSTR file;
WINE_TRACE("()\n"); WINE_TRACE("()\n");
MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL); file = Globals.active_win->page->file->help_on_file;
if (!file)
file = (Globals.wVersion > 4) ? "winhlp32.hlp" : "winhelp.hlp";
MACRO_JumpContents(file, NULL);
} }
void CALLBACK MACRO_HelpOnTop(void) void CALLBACK MACRO_HelpOnTop(void)
...@@ -890,7 +896,12 @@ void CALLBACK MACRO_SetContents(LPCSTR str, LONG u) ...@@ -890,7 +896,12 @@ void CALLBACK MACRO_SetContents(LPCSTR str, LONG u)
void CALLBACK MACRO_SetHelpOnFile(LPCSTR str) void CALLBACK MACRO_SetHelpOnFile(LPCSTR str)
{ {
WINE_FIXME("(\"%s\")\n", str); WINE_TRACE("(\"%s\")\n", str);
HeapFree(GetProcessHeap(), 0, Globals.active_win->page->file->help_on_file);
Globals.active_win->page->file->help_on_file = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1);
if (Globals.active_win->page->file->help_on_file)
strcpy(Globals.active_win->page->file->help_on_file, str);
} }
void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3) void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
......
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