diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-22 17:14:55 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-22 17:14:55 +0000 |
commit | d8967087af559a43f1801e3e89411d570cbb3110 (patch) | |
tree | b6596526a66c1aa8b80bab769cc7fd5472b327a8 /plugins/FavContacts | |
parent | d867e44172947b51b34d60a672673dffd771a304 (diff) |
plugins cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FavContacts')
-rw-r--r-- | plugins/FavContacts/src/main.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
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);
|