You can use HH_DISPLAY_TEXT_POPUP to display a popup. This gives you more flexibility through the HH_POPUP structure you are passing. Use the pt field to indicate the position:
Determines (in pixels) where the top center of the popup should be located.
The Helpware website provides sample Delphi code:
{Show HH Popup using a string (StringID) from text file in a CHM StringID: eg. 99; CHMTextFile: eg. _runDir + 'help.chm::/cshelp.txt'} function HH_ShowPopupHelp3(aParent: TForm; StringID: Integer; CHMTextFile: String; XYPos: TPoint): HWND; var hhpopup: HH.THHPopup; begin with hhpopup do begin cbStruct := sizeof(hhpopup); //sizeof this structure hinst := 0; //no used idString := StringID; //topic number in a text file. pszText := nil; //no used pt := XYPos; //top center of popup clrForeground := COLORREF(-1); //use -1 for default - RGB value clrBackground := COLORREF(-1); //use -1 for default - RGB value rcMargins := Rect(-1,-1,-1,-1);//amount of space between edges pszFont := ''; end; Result := HtmlHelp(aParent.Handle, PChar(CHMTextFile), HH_DISPLAY_TEXT_POPUP, DWORD(@hhpopup)); end;
In fact, I think you already found this page, judging by your code, but you just need to read a little further down the page.
source share