如何更改 Delphi 中帮助弹出窗口的位置?
我有下面的代码,现在显示了可用的标准窗口帮助弹出窗口。有谁知道是否有办法定位此窗口出现的位置?例如,让它出现在用户点击的位置?
function HelpPopupWindow(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;
var
dwIDs: array[0..3] of DWord;
begin
dwIDs[0] := Handle;
dwIDs[1] := Data;
dwIDs[2] := 0;
dwIDs[3] := 0;
HtmlHelp(Handle, PChar('HELP FILE LOCATION HERE::/cshelp.txt'), HH_TP_HELP_CONTEXTMENU, DWORD(@dwIDs[0]));
CallHelp := False;
end;
干杯
保罗
I have the code below which now shows a standard windows help popup where available. Does anyone know if there is a way of positioning where this window appears? For example, to make it appear where the user has clicked?
function HelpPopupWindow(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;
var
dwIDs: array[0..3] of DWord;
begin
dwIDs[0] := Handle;
dwIDs[1] := Data;
dwIDs[2] := 0;
dwIDs[3] := 0;
HtmlHelp(Handle, PChar('HELP FILE LOCATION HERE::/cshelp.txt'), HH_TP_HELP_CONTEXTMENU, DWORD(@dwIDs[0]));
CallHelp := False;
end;
Cheers
Paul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
HH_DISPLAY_TEXT_POPUP
显示弹出帮助。这通过HH_POPUP
结构为您提供了更大的灵活性,你通过了。使用 pt 字段指定位置:Helpware 站点提供了一些示例 Delphi 代码:
事实上,我认为您已经找到了此页面判断通过您的代码,但只需要进一步阅读页面下方的内容。
You should use
HH_DISPLAY_TEXT_POPUP
to display the popup help. This gives you more flexibility through theHH_POPUP
structure that you pass. Use thept
field to specify the position:The Helpware site gives some sample Delphi code:
In fact I think you already found this page judging by your code, but just needed to read a bit further down the page.