From d8967087af559a43f1801e3e89411d570cbb3110 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 22 Sep 2013 17:14:55 +0000 Subject: plugins cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@6185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FavContacts/src/main.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'plugins/FavContacts/src') diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 1df474c40a..1d081790de 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -490,15 +490,6 @@ static BOOL sttDrawItem_Group(LPDRAWITEMSTRUCT lpdis, Options *options = NULL) void ImageList_DrawDimmed(HIMAGELIST himl, int i, HDC hdc, int left, int top, UINT fStyle) { - typedef BOOL (WINAPI *TFnAlphaBlend)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION); - static TFnAlphaBlend pfnAlphaBlend = NULL; - - bool load_funcs = true; - if (load_funcs) { - pfnAlphaBlend = (TFnAlphaBlend)GetProcAddress(GetModuleHandleA("msimg32"), "AlphaBlend"); - load_funcs = false; - } - int dx, dy; ImageList_GetIconSize(himl, &dx, &dy); @@ -507,15 +498,9 @@ void ImageList_DrawDimmed(HIMAGELIST himl, int i, HDC hdc, int left, int top, UI HBITMAP hbmOld = (HBITMAP)SelectObject(dcMem, hbm); BitBlt(dcMem, 0, 0, dx, dx, hdc, left, top, SRCCOPY); ImageList_Draw(himl, i, dcMem, 0, 0, fStyle); - if (pfnAlphaBlend) { - BLENDFUNCTION bf = {0}; - bf.SourceConstantAlpha = 180; - pfnAlphaBlend(hdc, left, top, dx, dy, dcMem, 0, 0, dx, dy, bf); - } - else { - SetStretchBltMode(hdc, HALFTONE); - StretchBlt(hdc, left, top, dx, dy, dcMem, 0, 0, dx, dy, SRCCOPY); - } + BLENDFUNCTION bf = {0}; + bf.SourceConstantAlpha = 180; + GdiAlphaBlend(hdc, left, top, dx, dy, dcMem, 0, 0, dx, dy, bf); SelectObject(dcMem, hbmOld); DeleteObject(hbm); DeleteDC(dcMem); -- cgit v1.2.3