用Winhelp弹出了Hint帮助,点击Hint里的连接,抱错,说内存不够,不知为什么,请大家帮帮忙,十分感谢!我的代码是这么写的:
procedure HelpContextPopup(const HelpFile: string; const ID: Integer);
var
  pchrHelpFile: PChar;
begin
  pchrHelpFile := StrAlloc(Length(HelpFile) + 1);
  StrPCopy(pchrHelpFile, HelpFile);
  WinHelp(Application.Handle, pchrHelpFile, HELP_CONTEXTPOPUP, ID);
  StrDispose(pchrHelpFile);
end;

解决方案 »

  1.   

    我一般将帮助做成CHM文件,可以做联接,且会非常漂亮。
    这条路走不通或不好走可以走其他路嘛。
      

  2.   

    http://bbs.yesky.com/book/html/1345.html
    procedure TForm1.Button1Click(Sender: Tobject);beginwinhelp(form1.clienthandle,'c:\media.hlp',help_contents,0);end;
    procedure TForm1.Button2Click(Sender: Tobject);beginwinhelp(form1.clienthandle,'c:\media.hlp',help_key,0);end;
      

  3.   

    具體到你的代碼, 直接用WinHelp(Application.Handle, HelpFile, HELP_CONTEXTPOPUP, ID);
      

  4.   

    强烈建议改用chm文件的帮助形式。美观大方。用shellexecute吧。
      

  5.   

    我是这么写的,如果HELP_CONTEXTPOPUP弹出的Hint窗中有连接,再点连接的话就抱错了。