procedure TF_Base_Main.ClientWndProc(var Message: TMessage);
var
MyDC: hDC;
Ro, Co: Word;
Images : TImage;
begin
Images := TImage.Create( Application );
Images.Picture.Bitmap := Kimhanul.Picture.Bitmap;
with Message do
case Msg of
WM_ERASEBKGND:
begin
MyDC := TWMEraseBkGnd(Message).DC;
for Ro := 0 to ClientHeight div Images.Picture.Height do
for Co := 0 to ClientWIDTH div Images.Picture.Width do
BitBlt(MyDC, Co * Images.Picture.Width, Ro * Images.Picture.Height,
Images.Picture.Width, Images.Picture.Height,
Images.Picture.Bitmap.Canvas.Handle, 0, 0, SRCCOPY);
Result := 1;
end;
else
Result := CallWindowProc(FPrevClientProc, ClientHandle, Msg, wParam, lParam);
end;
end;
전 이쁜 김하늘을 넣어서 씀 ㅡ.ㅡ
pravite
FClientInstance,
FPrevClientProc: TFarProc;
procedure ClientWndProc(var Message: TMessage);
procedure TF_Base_Main.FormCreate(Sender: TObject);
begin
FClientInstance := MakeObjectInstance(ClientWndProc);
FPrevClientProc := Pointer(GetWindowLong(ClientHandle, GWL_WNDPROC));
SetWindowLong(ClientHandle, GWL_WNDPROC, LongInt(FClientInstance));
end;
procedure TF_Base_Main.ClientWndProc(var Message: TMessage);
var
MyDC: hDC;
Ro, Co: Word;
Images : TImage;
begin
Images := TImage.Create( Application );
Images.Picture.Bitmap := Kimhanul.Picture.Bitmap;
with Message do
case Msg of
WM_ERASEBKGND:
begin
MyDC := TWMEraseBkGnd(Message).DC;
for Ro := 0 to ClientHeight div Images.Picture.Height do
for Co := 0 to ClientWIDTH div Images.Picture.Width do
BitBlt(MyDC, Co * Images.Picture.Width, Ro * Images.Picture.Height,
Images.Picture.Width, Images.Picture.Height,
Images.Picture.Bitmap.Canvas.Handle, 0, 0, SRCCOPY);
Result := 1;
end;
else
Result := CallWindowProc(FPrevClientProc, ClientHandle, Msg, wParam, lParam);
end;
end;