WM_HELP:
begin
ShowHelpHandle(PHelpInfo(lParam)^.hItemHandle, PHelpInfo(lParam)^.dwContextId);
end;
procedure ShowHelpHandle(ChildHandle: THandle; ContextId: Integer);
const
marginrect : TRect = (Left: - 1; Top: - 1; Right: - 1; Bottom: - 1);
var
Popup : THHPopup;
URL :
string;
rect: TRect;
pt: TPoint;
begin
URL := '
::/popup.txt';
if (ContextId >= 0)
then
begin
FillChar(Popup, SizeOf(Popup), 0);
Popup.cbStruct := SizeOf(Popup);
Popup.hinst := 0;
Popup.idString := 0;
Popup.pszText := PChar(ContextInfo[ContextId]);
GetWindowRect(ChildHandle, rect);
pt.X := rect.Left + 100;
pt.Y := rect.Top + 25;
Popup.pt := pt;
Popup.clrForeGround := TColorRef(-1);
Popup.clrBackground := TColorRef(-1);
Popup.rcMargins := marginrect;
Popup.pszFont := '
';
HtmlHelp(0, @
URL[1], HH_DISPLAY_TEXT_POPUP, dword(@Popup));
end;
end;