From fe83051082d1509bd653b718f119f884646d20e5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 18:59:51 +0300 Subject: MS_IMG_LOAD replaced with Bitmap_Load where possible --- plugins/Popup/src/bitmap_funcs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 5a07c757de..b1c5757a4d 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -730,8 +730,7 @@ bool MyBitmap::loadFromFile(const wchar_t *fn) if (!wcsncmp(fn, L"gradient:", mir_wstrlen(L"gradient:"))) return loadFromFile_gradient(fn); - SIZE sz; - HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_WCHAR); + HBITMAP hBmpLoaded = Bitmap_Load(fn); if (!hBmpLoaded) return false; @@ -739,6 +738,8 @@ bool MyBitmap::loadFromFile(const wchar_t *fn) SetBitmapDimensionEx(hBmpLoaded, bm.bmWidth, bm.bmHeight, nullptr); HDC dcTmp = CreateCompatibleDC(nullptr); + + SIZE sz; GetBitmapDimensionEx(hBmpLoaded, &sz); HBITMAP hBmpDcSave = (HBITMAP)SelectObject(dcTmp, hBmpLoaded); -- cgit v1.2.3