Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

GetStretchBltMode (Compact 2013)


This function retrieves the current stretching mode. The stretching mode defines how color data is added to or removed from bitmaps that are stretched or compressed when the StretchBlt function is called.

int GetStretchBltMode(
  HDC hdc

[in] Handle to the device context.

If the function succeeds, the return value is the current stretching mode. This can be one of the following values:




Performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.


Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.


Linearly interpolates color values in both the x and y directions.

This mode only works when stretching the source, not shrinking.

This mode only works for the raster operations SRCCOPY, SRCAND, and SRCPAINT (see Ternary Raster Operations). If you set this mode for any other raster operations, the COLORONCOLOR mode will be used for bitmaps with a color depth greater than 1bpp, and the BLACKONWHITE mode will be used for bitmaps with a color depth of 1bpp.

If the function fails, the return value is zero.

To get extended error information, call GetLastError.





Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.