DelpiPackage HelpManRCI

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
Rene Caspers
Posts: 1
Joined: Tue Mar 05, 2013 11:54 am

DelpiPackage HelpManRCI

Unread post by Rene Caspers »

Hello,

I am using the delphi package HelpManRCI to create my own property editor on the helpcontext.
I am using this code to get my self a list of items.
Somehow the call to ReadItem does not function properly.
The function ReadItemCallback is never called.
Does anyone know how to use this?

Code: Select all

  THelpItem = class(TObject)
    Id: string;
    Handle: HWND;
    TopicRecord: PHMTOPICRECORD;
    HelpContext: Integer;
  end;

implementation

function ReadItemCallback(pBuffer: Pointer; iData: Integer; AppData: integer): BOOL; cdecl;
var
  item: THelpItem;
begin
  // this function is never called
  item := THelpItem(AppData);
  item.TopicRecord := PHMTOPICRECORD(pBuffer);
  Result := True;
end;

function GetListCallback(pBuffer: Pointer; iData: Integer; AppData: integer): BOOL; cdecl;
var
  helpItem: THelpItem;
begin
  helpItem := THelpItem.Create;
  helpItem.Id := pchar(pBuffer);
  helpItem.HelpContext := GetContextNumber(hmInstance, pBuffer);

  helpItem.Handle := GetItemID(hmInstance, HMINVISIBLELIST, pBuffer, 0);
  if helpItem.Handle = 0 then
    helpItem.Handle := GetItemID(hmInstance, HMTOCLIST, pBuffer, 0);

//   if (hItem > 0) then
//     SelectItem(hmInstance, hItem);  // this works, so the Handle is correct

  ReadItem(hmInstance, helpItem.Handle, HMTOPIC_ALLMEMBERS, ReadItemCallback, Integer(helpItem));
  TopicList.Add(helpItem);

  Result := True;
end;
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: DelpiPackage HelpManRCI

Unread post by Alexander Halser »

This API worked with Help & Manual up to version 4. Later versions don't include it anymore.
Alexander Halser
Senior Software Architect, EC Software GmbH
Post Reply