Mirror

Display a *.hlp file on a TForm (Views: 20)


Problem/Question/Abstract:

Is there some sort of component that allows me to show a certain page from a normal *.hlp file (non HTML) in a form?

Answer:

As far as I know it cannot be done. The closest you can come to it is to take the standard WinHelp window and parent it to your form via Windows.SetParent. The WinHelp main window has a classname of 'MS_WINDOC', you can use that with FindWindow to find its window handle.

procedure TForm1.Button1Click(Sender: TObject);
var
  wnd: HWND;
begin
  wnd := FindWindow('MS_WINDOC', nil);
  if wnd <> 0 then
  begin
    Windows.SetParent(wnd, handle);
    Windows.MoveWindow(wnd, 0, 0, clientwidth, clientheight, true);
  end;
end;

<< Back to main page