您现在的位置是: 软件 > 设计在线 > 网页陶吧 > 技术平台 > HTML学习 > 正文


-Win xp中的多种网络
-试验试验试验试验
-用Freehand实现位图矢量化
-网络电话面面观

Delphi之三十六计之界面篇
2001-01-06· ·陈立平··yesky

1 2 3 4 5  下一页

  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;

1 2 3 4 5  下一页

■ 相关内容
 Delphi三十六之硬件篇
 将Text转换为Html(上)
 Delphi三十六之数据库篇
 将Text转换为Html(下)
 Delphi中MsComm控件的安装使用
 delphi三十六之网络篇
 delphi三十六之编辑篇
 Delphi之三十六计之系统篇
 delphi三十六之磁盘篇
 delphi三十六之加密篇
感谢 访问天极网,如果您觉得该文章涉及版权问题,请看这里!