Share via


Gdi_GetStretchBltMode_I (Windows CE 5.0)

Send Feedback

This method 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);

Parameters

  • hdc
    [in] Handle to the device context.

Return Values

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

Value Description
BLACKONWHITE 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.
COLORONCOLOR Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
BILINEAR 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 mode COLORONCOLOR will be used for bitmaps with a color depth greater than 1bpp, and the mode BLACKONWHITE will be used for bitmaps with a color depth of 1bpp.

If the method fails, the return value is zero.

To retrieve extended error information, call GetLastError.

Requirements

OS Versions: Microsoft Windows CE 5.0 and later.
Header: Gdi.hpp.

See Also

Gdi | StretchBlt | SetStretchBltMode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.