Mercurial > dwindows
diff win/dw.c @ 243:3c1e39905f2f
Use GetObject() instead of GetBitmapDimensionEx() to get the loaded bitmap
size.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 19 Feb 2003 06:37:24 +0000 |
parents | 36013ddd3f5b |
children | c097ffe6cfeb |
line wrap: on
line diff
--- a/win/dw.c Wed Feb 19 06:23:59 2003 +0000 +++ b/win/dw.c Wed Feb 19 06:37:24 2003 +0000 @@ -6698,7 +6698,6 @@ HPIXMAP pixmap; BITMAP bm; HDC hdc; - SIZE sz; char *file = malloc(strlen(filename) + 5); if (!file || !(pixmap = calloc(1,sizeof(struct _hpixmap)))) @@ -6738,9 +6737,9 @@ pixmap->hdc = CreateCompatibleDC(hdc); - GetBitmapDimensionEx(pixmap->hbm, &sz); - - pixmap->width = sz.cx; pixmap->height = sz.cy; + GetObject(pixmap->hbm, sizeof(bm), &bm); + + pixmap->width = bm.bmWidth; pixmap->height = bm.bmHeight; SelectObject(pixmap->hdc, pixmap->hbm);