From 364e8cd84bf31e34a7c3730f814e58acd18e72b8 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 12 Sep 2015 12:22:24 +0000 Subject: Toaster: code optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@15335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/images.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 plugins/Toaster/src/images.cpp (limited to 'plugins/Toaster/src/images.cpp') diff --git a/plugins/Toaster/src/images.cpp b/plugins/Toaster/src/images.cpp deleted file mode 100644 index 5ea6779627..0000000000 --- a/plugins/Toaster/src/images.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "stdafx.h" - -wchar_t* SaveBitmap(HBITMAP bmp, const char *szId) -{ - wchar_t wszSavePath[MAX_PATH]; - mir_snwprintf(wszSavePath, L"%s\\MirandaToaster.%s.png", wszTempDir, _A2T(szId)); - - if (!(GetFileAttributes(wszSavePath) < 0xFFFFFFF)) - { - IMGSRVC_INFO isi = { sizeof(isi) }; - isi.wszName = mir_wstrdup(wszSavePath); - isi.hbm = bmp; - isi.dwMask = IMGI_HBITMAP; - isi.fif = FREE_IMAGE_FORMAT::FIF_PNG; - CallService(MS_IMG_SAVE, (WPARAM)&isi, IMGL_WCHAR); - } - return mir_wstrdup(wszSavePath); -} - -wchar_t* SaveHIcon(HICON hIcon, const char *szId) -{ - wchar_t *wszResult = NULL; - ICONINFO icon; - if (GetIconInfo(hIcon, &icon)) - { - wszResult = SaveBitmap(icon.hbmColor, szId); - - DeleteObject(icon.hbmMask); - DeleteObject(icon.hbmColor); - } - return wszResult; -} \ No newline at end of file -- cgit v1.2.3