Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

Use HELPInfo vith Delphi

Hi,
I want use HelpInfo.

HELPINFO.iCtrlId;
HELPINFO.hItemHandle;
HELPINFO.dwContextId;

I'm fetching WM_HELP message when I click on « ? » and on a memo into my form. I was thinking the memo.handle was the same handle then HELPINFO.hItemHandle. But is not.

How can I link the object on my Form with HelpInfo structure ?

JLouis


0
jlvill
Asked:
jlvill
  • 2
  • 2
1 Solution
 
geobulCommented:
Hi,

If your Memo has the focus and you press F1 then HELPINFO.hItemHandle definately contains Memo1.Handle:

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    Edit1: TEdit;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    procedure WMHELP(var Msg: TWMHelp); message WM_HELP;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.WMHELP(var Msg: TWMHelp);
begin
  Edit1.Text := IntToStr(Msg.HelpInfo.hItemHandle);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Label1.Caption := IntToStr(Memo1.Handle);
end;

Regards, Geo
0
 
jlvillAuthor Commented:
Thanks Geo,
it's working. It because I didn't put Msg before HelpInfo.hItemHandle.
Thanks again;
JLouis
0
 
geobulCommented:
Glad of being in assistance. Thanks for the points :-)
0
 
jlvillAuthor Commented:
I thank you,
JLouis ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now