summaryrefslogtreecommitdiff
path: root/plugins/SecureIM
diff options
context:
space:
mode:
authorGoraf <goraf@miranda-ng.org>2016-01-30 21:56:49 +0000
committerGoraf <goraf@miranda-ng.org>2016-01-30 21:56:49 +0000
commitc820fb6a8648b63e6d7d40b165ac047533dadfa3 (patch)
treee8bdc10a76a64b659ddae930561aa556faa687da /plugins/SecureIM
parent66d36547ef14644965d9a5afa46e4056716664b2 (diff)
BITMAPINFO initialization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16199 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM')
-rw-r--r--plugins/SecureIM/src/images.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/SecureIM/src/images.cpp b/plugins/SecureIM/src/images.cpp
index ce00b9fa68..ea171fd482 100644
--- a/plugins/SecureIM/src/images.cpp
+++ b/plugins/SecureIM/src/images.cpp
@@ -96,9 +96,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force)
HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
{
- BITMAPINFO RGB32BitsBITMAPINFO;
BYTE * ptPixels;
- HBITMAP hDirectBitmap;
BITMAP bmp;
DWORD dwLen;
@@ -112,6 +110,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;
@@ -119,7 +118,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,
@@ -159,10 +158,9 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
HBITMAP CreateBitmap32(int cx, int cy)
{
- BITMAPINFO RGB32BitsBITMAPINFO;
UINT * ptPixels;
- HBITMAP DirectBitmap;
+ BITMAPINFO RGB32BitsBITMAPINFO;
memset(&RGB32BitsBITMAPINFO, 0, sizeof(BITMAPINFO));
RGB32BitsBITMAPINFO.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
RGB32BitsBITMAPINFO.bmiHeader.biWidth = cx;//bm.bmWidth;
@@ -170,7 +168,7 @@ HBITMAP CreateBitmap32(int cx, int cy)
RGB32BitsBITMAPINFO.bmiHeader.biPlanes = 1;
RGB32BitsBITMAPINFO.bmiHeader.biBitCount = 32;
- DirectBitmap = CreateDIBSection(NULL,
+ HBITMAP DirectBitmap = CreateDIBSection(NULL,
(BITMAPINFO *)&RGB32BitsBITMAPINFO,
DIB_RGB_COLORS,
(void **)&ptPixels,