I need resize a bmp before display it into the DC, any ideas ?

Thx .
Posted on 2002-02-03 05:16:45 by Galford
Afternoon, Galford.


BOOL StretchBlt(
HDC hdcDest, // handle to destination DC
int nXOriginDest, // x-coord of destination upper-left corner
int nYOriginDest, // y-coord of destination upper-left corner
int nWidthDest, // width of destination rectangle
int nHeightDest, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXOriginSrc, // x-coord of source upper-left corner
int nYOriginSrc, // y-coord of source upper-left corner
int nWidthSrc, // width of source rectangle
int nHeightSrc, // height of source rectangle
DWORD dwRop // raster operation code

Posted on 2002-02-03 07:35:49 by Scronty

this example coded by me . StretchBlt Zoom + Dialog example. Slow, because picture is big and not optimized.

have nice day,

Posted on 2002-02-03 19:03:37 by CYDONIA
Hi all !

May i advice you to add a little "invoke SetStretchBltMode,hDestDC,4 ;(HALFMODE)" line before your StrechBlt...
It stretch your bmp with a kind of anti aliasing....
It's slow but it works fine ! Look at this small example...
Posted on 2002-02-04 02:30:01 by PhoBos
nice, thanks
Posted on 2002-02-04 04:41:42 by CYDONIA