summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 18:59:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 18:59:51 +0300
commitfe83051082d1509bd653b718f119f884646d20e5 (patch)
tree4d0214441d96d26cadab85b421e0921d999730b3 /plugins/TabSRMM
parentee89703abd075cacb396d86bfdf7e1dd4ce9d4d1 (diff)
MS_IMG_LOAD replaced with Bitmap_Load where possible
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/themes.cpp16
-rw-r--r--plugins/TabSRMM/src/themes.h1
2 files changed, 3 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 81df273536..1b58c8715d 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -752,7 +752,7 @@ static struct
void CImageItem::Create(const wchar_t *szImageFile)
{
- HBITMAP hbm = LoadPNG(szImageFile);
+ HBITMAP hbm = Bitmap_Load(szImageFile);
BITMAP bm;
m_hdc = nullptr;
@@ -997,16 +997,6 @@ void CImageItem::Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db, BYTE alpha
}
/////////////////////////////////////////////////////////////////////////////////////////
-// load PNG image using core service(advaimg)
-
-HBITMAP TSAPI CImageItem::LoadPNG(const wchar_t *szFilename)
-{
- HBITMAP hBitmap = nullptr;
- hBitmap = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_WCHAR);
- return hBitmap;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
// set filename and load parameters from the database
// called on:
// ) init
@@ -1675,7 +1665,7 @@ void CSkin::setupAeroSkins()
mir_snwprintf(tszFilename, L"%scustom_unknown.png", tszBasePath);
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%sunknown.png", tszBasePath);
- PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
+ PluginConfig.g_hbmUnknown = Bitmap_Load(tszFilename);
if (PluginConfig.g_hbmUnknown == nullptr) {
HDC dc = GetDC(nullptr);
PluginConfig.g_hbmUnknown = CreateCompatibleBitmap(dc, 20, 20);
@@ -1807,7 +1797,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_button.png", tszBasePath);
- hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
+ hbm = Bitmap_Load(tszFilename);
CImageItem::Colorize(hbm, GetRValue(m_dwmColorRGB),
GetGValue(m_dwmColorRGB),
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h
index b21950b1d6..22d61dacf0 100644
--- a/plugins/TabSRMM/src/themes.h
+++ b/plugins/TabSRMM/src/themes.h
@@ -227,7 +227,6 @@ public:
static void TSAPI PreMultiply(HBITMAP hBitmap, int mode);
static void TSAPI SetBitmap32Alpha(HBITMAP hBitmap, BYTE bAlpha = 255);
static void TSAPI Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db, BYTE alpha = 0);
- static HBITMAP TSAPI LoadPNG(const wchar_t *szFilename);
public:
bool m_fValid; // verified item, indicates that all parameters are valid