summaryrefslogtreecommitdiff
path: root/plugins/MenuItemEx/src/images.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MenuItemEx/src/images.cpp')
-rw-r--r--plugins/MenuItemEx/src/images.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp
index d197226eb8..f59b4c2c4e 100644
--- a/plugins/MenuItemEx/src/images.cpp
+++ b/plugins/MenuItemEx/src/images.cpp
@@ -17,7 +17,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap)
dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
p = (BYTE *)malloc(dwLen);
- if (p == NULL)
+ if (p == nullptr)
return;
memset(p, 0, dwLen);
@@ -79,7 +79,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force)
dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
p = (BYTE *)malloc(dwLen);
- if (p == NULL)
+ if (p == nullptr)
return;
memset(p, 0, dwLen);
@@ -124,8 +124,8 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
dwLen = bmp.bmWidth * bmp.bmHeight * 4;
p = (BYTE *)malloc(dwLen);
- if (p == NULL)
- return NULL;
+ if (p == nullptr)
+ return nullptr;
// Create bitmap
BITMAPINFO RGB32BitsBITMAPINFO;
@@ -136,11 +136,11 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
RGB32BitsBITMAPINFO.bmiHeader.biPlanes = 1;
RGB32BitsBITMAPINFO.bmiHeader.biBitCount = 32;
- HBITMAP hDirectBitmap = CreateDIBSection(NULL,
+ HBITMAP hDirectBitmap = CreateDIBSection(nullptr,
(BITMAPINFO *)&RGB32BitsBITMAPINFO,
DIB_RGB_COLORS,
(void **)&ptPixels,
- NULL, 0);
+ nullptr, 0);
// Copy data
if (bmp.bmBitsPixel != 32)
@@ -148,10 +148,10 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
HDC hdcOrig, hdcDest;
HBITMAP oldOrig, oldDest;
- hdcOrig = CreateCompatibleDC(NULL);
+ hdcOrig = CreateCompatibleDC(nullptr);
oldOrig = (HBITMAP)SelectObject(hdcOrig, hBitmap);
- hdcDest = CreateCompatibleDC(NULL);
+ hdcDest = CreateCompatibleDC(nullptr);
oldDest = (HBITMAP)SelectObject(hdcDest, hDirectBitmap);
BitBlt(hdcDest, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcOrig, 0, 0, SRCCOPY);
@@ -270,10 +270,10 @@ HICON MakeHalfAlphaIcon(HICON SourceIcon)
TempIcon = CopyIcon(SourceIcon);
if (!GetIconInfo(TempIcon, &TargetIconInfo))
- return NULL;
+ return nullptr;
if (!GetObject(TargetIconInfo.hbmColor, sizeof(BITMAP), &TargetBitmapInfo))
- return NULL;
+ return nullptr;
MakeBitmap32(&TargetIconInfo.hbmColor);
HalfBitmap32Alpha(TargetIconInfo.hbmColor);
@@ -315,7 +315,7 @@ HICON BindOverlayIcon(HICON SourceIcon, LPCSTR OverlayIconName)
TempIcon = CopyIcon(SourceIcon);
if (!GetIconInfo(TempIcon, &TargetIconInfo))
- return NULL;
+ return nullptr;
MakeBitmap32(&TargetIconInfo.hbmColor);
CorrectBitmap32Alpha(TargetIconInfo.hbmColor, FALSE);
@@ -323,12 +323,12 @@ HICON BindOverlayIcon(HICON SourceIcon, LPCSTR OverlayIconName)
OverlayIcon = IcoLib_GetIcon(OverlayIconName);
if (!GetIconInfo(OverlayIcon, &OverlayIconInfo) || !GetObject(OverlayIconInfo.hbmColor, sizeof(BITMAP), &OverlayBitmapInfo))
- return NULL;
+ return nullptr;
- TargetDC = CreateCompatibleDC(NULL);
+ TargetDC = CreateCompatibleDC(nullptr);
OldTargetBitmap = (HBITMAP)SelectObject(TargetDC, TargetIconInfo.hbmColor);
- OverlayDC = CreateCompatibleDC(NULL);
+ OverlayDC = CreateCompatibleDC(nullptr);
OldOverlayBitmap = (HBITMAP)SelectObject(OverlayDC, OverlayIconInfo.hbmColor);
AlphaBlend(TargetDC, 0, 0, TargetBitmapInfo.bmWidth, TargetBitmapInfo.bmHeight,