You've already forked lazarus-ccr
Lazstats: Correct handling of HelpContext and HelpKeyword.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7473 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -12,8 +12,8 @@ unit MainUnit;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
LCLType, Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
|
||||||
Menus, ExtCtrls, StdCtrls, Grids,
|
Dialogs, Menus, ExtCtrls, StdCtrls, Grids,
|
||||||
{$IFDEF USE_EXTERNAL_HELP_VIEWER}
|
{$IFDEF USE_EXTERNAL_HELP_VIEWER}
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
HtmlHelp,
|
HtmlHelp,
|
||||||
@@ -450,8 +450,6 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ TOS3MainFrm }
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Utils,
|
Utils,
|
||||||
OptionsUnit, OutputUnit, LicenseUnit, TransFrmUnit, DescriptiveUnit,
|
OptionsUnit, OutputUnit, LicenseUnit, TransFrmUnit, DescriptiveUnit,
|
||||||
@@ -480,6 +478,8 @@ uses
|
|||||||
MedianPolishUnit, OneCaseAnovaUnit, SmoothDataUnit, SRHTestUnit, AboutUnit,
|
MedianPolishUnit, OneCaseAnovaUnit, SmoothDataUnit, SRHTestUnit, AboutUnit,
|
||||||
ItemBankingUnit, ANOVATESTSUnit, SimpleChiSqrUnit, LifeTableUnit, LSMRunit;
|
ItemBankingUnit, ANOVATESTSUnit, SimpleChiSqrUnit, LifeTableUnit, LSMRunit;
|
||||||
|
|
||||||
|
{ TOS3MainFrm }
|
||||||
|
|
||||||
// Menu "Options" > "Exit"
|
// Menu "Options" > "Exit"
|
||||||
procedure TOS3MainFrm.MenuItem16Click(Sender: TObject);
|
procedure TOS3MainFrm.MenuItem16Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@@ -1587,9 +1587,6 @@ end;
|
|||||||
{$IFDEF USE_EXTERNAL_HELP_VIEWER}
|
{$IFDEF USE_EXTERNAL_HELP_VIEWER}
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
// Call HTML help (.chm file)
|
// Call HTML help (.chm file)
|
||||||
// Is is expected that help topics are specified as HelpKeyword (HelpType = htContext).
|
|
||||||
// Since the menu items provide only a HelpContext number some ticks must be
|
|
||||||
// applied to distinguish between number and string...
|
|
||||||
function TOS3MainFrm.HelpHandler(Command: Word; Data: PtrInt;
|
function TOS3MainFrm.HelpHandler(Command: Word; Data: PtrInt;
|
||||||
var CallHelp: Boolean): Boolean;
|
var CallHelp: Boolean): Boolean;
|
||||||
var
|
var
|
||||||
@@ -1597,12 +1594,13 @@ var
|
|||||||
res: Integer;
|
res: Integer;
|
||||||
fn: UnicodeString;
|
fn: UnicodeString;
|
||||||
begin
|
begin
|
||||||
if Data < 10000 then // hopefully these are not pointers...
|
if Command = HELP_CONTEXT then
|
||||||
begin
|
begin
|
||||||
// see: http://www.helpware.net/download/delphi/hh_doc.txt
|
// see: http://www.helpware.net/download/delphi/hh_doc.txt
|
||||||
fn := UnicodeString(Application.HelpFile);
|
fn := UnicodeString(Application.HelpFile);
|
||||||
res := htmlhelp.HtmlHelpW(0, PWideChar(fn), HH_HELP_CONTEXT, Data);
|
res := htmlhelp.HtmlHelpW(0, PWideChar(fn), HH_HELP_CONTEXT, Data);
|
||||||
end else
|
end else
|
||||||
|
if Command = HELP_COMMAND then
|
||||||
begin
|
begin
|
||||||
topic := Application.HelpFile + '::/' + PChar(Data);
|
topic := Application.HelpFile + '::/' + PChar(Data);
|
||||||
res := htmlhelp.HtmlHelpW(0, PWideChar(topic), HH_DISPLAY_TOPIC, 0);
|
res := htmlhelp.HtmlHelpW(0, PWideChar(topic), HH_DISPLAY_TOPIC, 0);
|
||||||
|
Reference in New Issue
Block a user