From e54a5dbe7727ef0de01172b25eff813e45bf6107 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Sep 2012 17:22:05 +0000 Subject: fix for the import icon git-svn-id: http://svn.miranda-ng.org/main/trunk@1609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.h | 2 ++ plugins/Import/src/main.cpp | 5 ++++- plugins/Import/src/wizard.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins/Import') diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index da42985a32..738fc76bfa 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include #include #include @@ -117,6 +118,7 @@ BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei); int CreateGroup(const TCHAR* name, HANDLE hContact); extern HINSTANCE hInst; +extern HANDLE hIcoHandle; extern HWND hdlgProgress; extern void (*DoImport)(HWND); extern int nImportOption; diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 564766ce9e..025ad8ef4d 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -32,6 +32,7 @@ int nCustomOptions; static HANDLE hImportService = NULL; HINSTANCE hInst; +HANDLE hIcoHandle; INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam); static HWND hwndWizard = NULL; @@ -113,11 +114,13 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP( &pluginInfo ); hImportService = CreateServiceFunction(IMPORT_SERVICE, ImportCommand); + + hIcoHandle = IcoLib_Register("import_main", "Import", LPGEN("Import..."), IDI_IMPORT); CLISTMENUITEM mi; ZeroMemory(&mi, sizeof(mi)); mi.cbSize = sizeof(mi); - mi.icolibItem = IcoLib_Register("import_main", "Import", LPGEN("Import..."), IDI_IMPORT); + mi.icolibItem = hIcoHandle; mi.pszName = LPGEN("&Import..."); mi.position = 500050000; mi.pszService = IMPORT_SERVICE; diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index bd92adeb6b..92e411a145 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -101,7 +101,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP SetWindowPos(hwndPage, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOSIZE); ShowWindow(hwndPage, SW_SHOW); ShowWindow(hdlg, SW_SHOW); - SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_IMPORT))); + SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIconByHandle(hIcoHandle)); return TRUE; case WIZM_GOTOPAGE: -- cgit v1.2.3