Mercurial > dwindows
changeset 2145:821f7d3a2e90
Win: Fix compilation problems on XP with Visual C 2010.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 17 Jul 2020 02:28:59 +0000 |
parents | e7a68eea2fa0 |
children | d38c3aa33c3f |
files | win/dw.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Fri Jul 17 01:30:13 2020 +0000 +++ b/win/dw.c Fri Jul 17 02:28:59 2020 +0000 @@ -936,6 +936,7 @@ { int cx = RECTWIDTH(rcClient); int cy = RECTHEIGHT(rcClient); + HBITMAP hbm; /* Define the BITMAPINFO structure used to draw text. * Note that biHeight is negative. This is done because @@ -950,8 +951,7 @@ dib.bmiHeader.biBitCount = 32; dib.bmiHeader.biCompression = BI_RGB; - HBITMAP hbm = CreateDIBSection(hdc, &dib, DIB_RGB_COLORS, NULL, NULL, 0); - if (hbm) + if((hbm = CreateDIBSection(hdc, &dib, DIB_RGB_COLORS, NULL, NULL, 0))) { HBITMAP hbmOld = (HBITMAP)SelectObject(hdcPaint, hbm); LOGFONT lgFont;