M
microchu
Unregistered / Unconfirmed
GUEST, unregistred user!
给出Delhpi代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure WmNcHitTest(var msg:TWmNcHitTest);message wm_NcHitTest;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WmNcHitTest(var msg:TWmNcHitTest);
var
pt:tpoint;
begin
pt:=point(msg.xpos,msg.ypos);
pt:=ScreentoClient(pt);
if (pt.x>width-5) then
msg.Result:=htright
else
inherited;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
BorderStyle := bsNone;
end;
end.
求教高人,为什么在vc下ONHitTest函数下写类似功能的代码无效?
在VC下这样的功能又如何实现呢?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure WmNcHitTest(var msg:TWmNcHitTest);message wm_NcHitTest;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WmNcHitTest(var msg:TWmNcHitTest);
var
pt:tpoint;
begin
pt:=point(msg.xpos,msg.ypos);
pt:=ScreentoClient(pt);
if (pt.x>width-5) then
msg.Result:=htright
else
inherited;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
BorderStyle := bsNone;
end;
end.
求教高人,为什么在vc下ONHitTest函数下写类似功能的代码无效?
在VC下这样的功能又如何实现呢?