下载本文示例代码
1.为MDI窗体客户区填充位图
//在主窗体中添加Image1控件
//申明
private
FClientInstance : TFarProc;
FPrevClientProc : TFarProc;
procedure ClientWndProc(var Message: Tmessage);
//------------------------------
procedure TMainFrm.ClientWndProc(var Message: Tmessage);
var
Dc : hDC;
Row : Integer;
Col : Integer;
begin
with Message do
case Msg of
WM_ERASEBKGND:
begin
Dc := TWMEraseBkGnd(Message).Dc;
for Row := 0 to ClientHeight div Image1.Picture.Height do
for Col := 0 to ClientWidth div Image1.Picture.Width do
BitBlt(Dc,
Col * Image1.Picture.Width,
Row * Image1.Picture.Height,
Image1.Picture.Width,
Image1.Picture.Height,
Image1.Picture.Bitmap.Canvas.Handle,
0,
0,
SRCCOPY);
Result := 1;
end;
共5页。 1 2 3 4 5 8 :
1.为MDI窗体客户区填充位图
//在主窗体中添加Image1控件
//申明
private
FClientInstance : TFarProc;
FPrevClientProc : TFarProc;
procedure ClientWndProc(var Message: Tmessage);
//------------------------------
procedure TMainFrm.ClientWndProc(var Message: Tmessage);
var
Dc : hDC;
Row : Integer;
Col : Integer;
begin
with Message do
case Msg of
WM_ERASEBKGND:
begin
Dc := TWMEraseBkGnd(Message).Dc;
for Row := 0 to ClientHeight div Image1.Picture.Height do
for Col := 0 to ClientWidth div Image1.Picture.Width do
BitBlt(Dc,
Col * Image1.Picture.Width,
Row * Image1.Picture.Height,
Image1.Picture.Width,
Image1.Picture.Height,
Image1.Picture.Bitmap.Canvas.Handle,
0,
0,
SRCCOPY);
Result := 1;
end;
共5页。 1 2 3 4 5 8 :
下载本文示例代码
Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇Delphi之三十六计之界面篇
阅读(105) | 评论(0) | 转发(0) |