?
Solved

Use HELPInfo vith Delphi

Posted on 2005-03-10
4
Medium Priority
?
424 Views
Last Modified: 2010-05-18
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
Comment
Question by:jlvill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 500 total points
ID: 13509279
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
 

Author Comment

by:jlvill
ID: 13511369
Thanks Geo,
it's working. It because I didn't put Msg before HelpInfo.hItemHandle.
Thanks again;
JLouis
0
 
LVL 17

Expert Comment

by:geobul
ID: 13514705
Glad of being in assistance. Thanks for the points :-)
0
 

Author Comment

by:jlvill
ID: 13520837
I thank you,
JLouis ;-)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question