CnPack Forum » CnVCL 组件包 » 为什么在D2009用TCnTrayIcon的BalloonHint不出气泡提示?[已解决]


2008-11-15 16:09 lzj1981
为什么在D2009用TCnTrayIcon的BalloonHint不出气泡提示?[已解决]

为什么在Delphi2009中用TCnTrayIcon的BalloonHint不出气泡提示?
代码是:
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, CnButtons, CnClasses, CnTrayIcon;
type
  TForm1 = class(TForm)
    CnTrayIcon1: TCnTrayIcon;
    CnBitBtn1: TCnBitBtn;
    procedure CnBitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
  CnTrayIcon1.UseAppIcon :=True;
end;
procedure TForm1.CnBitBtn1Click(Sender: TObject);
begin
  CnTrayIcon1.BalloonHint('提示','内容',btError,3);
end;
end.

刚刚看到发错区域了,但是不会删,请版主不要介意:loveliness:

[[i] 本帖最后由 lzj1981 于 2008-11-16 22:45 编辑 [/i]]

2008-11-15 21:24 Passion
我移动到组件区吧。

2008-11-15 23:20 Passion
原因找到了。D2009中调用的WINDOWS api默认由A系列改成了W系列,而此组件中的ShellNotify_Icon的参数还是原来的结构,导致调用失败。

现已修正,楼主可在我们的CVS上获取最新代码。参考此贴:
[url]http://bbs.cnpack.org/viewthread.php?tid=1882&extra=page%3D1[/url]

2008-11-16 22:45 lzj1981
已经试过新版,问题已修正:)

页: [1]


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.