创建TBRush的多个实例,每个实例显示位图一部分。可以试试看,但愿不是一个馊主意^0^

解决方案 »

  1.   

    用背景贴图。bitblt函数或那个添充区域函数filfull
      

  2.   

    不信大家看看以下以下Delphi帮助文件中有关TBrush.Bitmap的说明:TBrush.Bitmap Specifies an external bitmap image that defines a pattern for the brush.
    property Bitmap: TBitmap;
    Description
    Bitmap points to a TBitmap object that holds a BMP image. If Bitmap is nonempty, the BMP image (rather than the Style property) defines the brush抯 pattern. If the image is larger than eight pixels by eight pixels, only the top left eight-by-eight region is used.
    Changing the image does not affect the brush until the TBitmap is reassigned to the Bitmap property. Be sure to free the TBitmap after finishing with the brush, since TBrush will not free it.请注意一下 eight pixels by eight pixels的要求。谢谢
      

  3.   

    另外本人用的是Win98和D5,跟这是不是也有关系?
      

  4.   

    都怪MS,确实是操作系统问题HBRUSH CreateDIBPatternBrush(    HGLOBAL hglbDIBPacked, // handle to device-independent bitmap 
        UINT fuColorSpec  // color table data 
       );
     ParametershglbDIBPackedIdentifies a global memory object containing a packed DIB, which consists of a BITMAPINFO structure immediately followed by an array of bytes defining the pixels of the bitmap. Windows 95: Creating brushes from bitmaps or DIBs larger than 8x8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used.