home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 October
/
Chip_2001-10_cd1.bin
/
zkuste
/
delphi
/
nastroje
/
d45
/
IBSB1.ZIP
/
frmCh.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2001-05-29
|
875b
|
46 lines
unit frmCh;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TfrmChild = class(TForm)
procedure FormCreate(Sender: TObject);
private
COWproc,CNWproc:Pointer;
Procedure CNewWinP(var msg:Tmessage);
{ Private declarations }
public
{ Public declarations }
end;
var
frmChild: TfrmChild;
implementation
{$R *.DFM}
procedure TfrmChild.FormCreate(Sender: TObject);
begin
visible:=false;
CNwProc:=MakeObjectInstance(CNewWinP);
COWproc:=Pointer(SetWindowLong(handle,gwl_wndproc,cardinal(CNwProc)));
end;
procedure TFrmChild.CNewwinP(var msg:Tmessage);
begin
msg.Result:=CallWindowProc(COWproc,Handle,msg.msg,msg.Wparam,msg.lParam);
if (msg.msg=wm_move) or (msg.msg=wm_size) or (msg.msg=WM_DRAWITEM) then
begin
Repaint;
end;
end;
end.