Update of /cvsroot/gexperts/gexperts/unstable/Src/Utils
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv19515/Src/Utils
Modified Files:
GX_GxUtils.pas
Log Message:
HTML Help (.chm) support instead of .hlp which no longer works on Vista
Index: GX_GxUtils.pas
===================================================================
RCS file: /cvsroot/gexperts/gexperts/unstable/Src/Utils/GX_GxUtils.pas,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- GX_GxUtils.pas 20 Jun 2006 20:03:34 -0000 1.19
+++ GX_GxUtils.pas 1 Apr 2007 03:21:11 -0000 1.20
@@ -13,7 +13,9 @@
{$I GX_CondDefine.inc}
uses
- Graphics, Controls;
+ Graphics,
+ {$IFNDEF GX_VER170_up}GXHtmlHelp,{$ENDIF}
+ Controls;
// Returns True if the binary this function is called from
// has been linked against various packages; at this time,
@@ -126,25 +128,19 @@
end;
procedure CallWinHelp(const Command, ContextID: Integer; const HelpOwner: TWinControl);
-var
- ControlHandle: HWND;
begin
- if Assigned(HelpOwner) then
- ControlHandle := HelpOwner.Handle
- else
- ControlHandle := 0;
-
- WinHelp(ControlHandle, PChar(ConfigInfo.HelpFile), Command, ContextID);
+ // The 0 allows the help to drop behind the IDE
+ HtmlHelp(0, PChar(ConfigInfo.HelpFile), Command, ContextID);
end;
procedure GxContextHelpContents(const HelpOwner: TWinControl);
begin
- CallWinHelp(HELP_CONTENTS, 0, HelpOwner);
+ CallWinHelp(HH_DISPLAY_INDEX, 0, HelpOwner);
end;
procedure GxContextHelp(const HelpOwner: TWinControl; const ContextID: Integer);
begin
- CallWinHelp(HELP_CONTEXT, ContextID, HelpOwner);
+ CallWinHelp(HH_HELP_CONTEXT, ContextID, HelpOwner);
end;
function ComponentPaletteAvailable: Boolean;
|