Article ID: 269585 - View products that this article applies to.
This article was previously published under Q269585
This article has been archived. It is offered "as is" and will no longer be updated.
StretchBlt() and StretchDIBits() may return FALSE (0, a BOOLEAN value, indicating failure), and this may occur even if system memory is not low, both device contexts are compatible, and both rectangles are within proper boundaries. This issue can occur if the source bitmap is much smaller than the destination bitmap.
This issue is known to affect the display of certain bitmaps as desktop wallpaper with Active Desktop Web content enabled.
This issue occurs because Graphics Device Interface (GDI) allocates an internal buffer for bitmap scaling operations. A scan line (or band) from the source bitmap is stretched (or scaled) into this buffer, and then copied to the destination bitmap. The size of the buffer is determined by the following initial conditions:
Given 1024 x 768 x 256 color display metrics, and a 16x16 source bitmap, StretchBlt() fails due to boundary conditions in the hunt method that is used to seek the optimum buffer size, but would succeed if the source bitmap were 18x18, or larger.
For additional information about why StretchBlt() may fail, click the article number below to view the article in the Microsoft Knowledge Base:
92529For additional information about how this problem affects Active Desktop Web Content, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/92529/EN-US/ )INFO: Reasons for Failure of Bitmap Functions
269595For additional information about this issue and Microsoft Windows 3.x, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/269595/EN-US/ )PRB: Active Desktop Wallpaper Scrambled
(http://support.microsoft.com/kb/111865/EN-US/ )BUG: StretchBlt()/StretchDIBits() Fail with Very Large Stretch