From c820fb6a8648b63e6d7d40b165ac047533dadfa3 Mon Sep 17 00:00:00 2001 From: Goraf Date: Sat, 30 Jan 2016 21:56:49 +0000 Subject: BITMAPINFO initialization git-svn-id: http://svn.miranda-ng.org/main/trunk@16199 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/images.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/MenuItemEx/src') diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp index a6753392fb..d197226eb8 100644 --- a/plugins/MenuItemEx/src/images.cpp +++ b/plugins/MenuItemEx/src/images.cpp @@ -114,9 +114,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) HBITMAP CopyBitmapTo32(HBITMAP hBitmap) { - BITMAPINFO RGB32BitsBITMAPINFO; BYTE * ptPixels; - HBITMAP hDirectBitmap; BITMAP bmp; DWORD dwLen; @@ -130,6 +128,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) return NULL; // Create bitmap + BITMAPINFO RGB32BitsBITMAPINFO; memset(&RGB32BitsBITMAPINFO, 0, sizeof(BITMAPINFO)); RGB32BitsBITMAPINFO.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); RGB32BitsBITMAPINFO.bmiHeader.biWidth = bmp.bmWidth; @@ -137,7 +136,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) RGB32BitsBITMAPINFO.bmiHeader.biPlanes = 1; RGB32BitsBITMAPINFO.bmiHeader.biBitCount = 32; - hDirectBitmap = CreateDIBSection(NULL, + HBITMAP hDirectBitmap = CreateDIBSection(NULL, (BITMAPINFO *)&RGB32BitsBITMAPINFO, DIB_RGB_COLORS, (void **)&ptPixels, -- cgit v1.2.3