From eec361608fde60d63fe4511e26e3b95c7f72be13 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 5 Jun 2016 16:11:08 +0000 Subject: - fix for #1059; - direct unsafe work with icons replaces with Window_SetIcon_IcoLib / Window_SetSkinIcon_IcoLib; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16917 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/src/dlg_handlers.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/WhenWasIt') diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index 34b2f11524..f7f3945f39 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -403,7 +403,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l WindowList_Add(hAddBirthdayWndsList, hWnd, hContact); Utils_RestoreWindowPositionNoSize(hWnd, hContact, ModuleName, "BirthdayWnd"); - SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(hAddBirthdayContact, 1)); + Window_SetIcon_IcoLib(hWnd, hAddBirthdayContact); for (int i = 0; i < cSaveModule; i++) SendDlgItemMessage(hWnd, IDC_COMPATIBILITY, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szSaveModule[i])); @@ -473,7 +473,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l case WM_DESTROY: RefreshContactListIcons(hContact); //the birthday might be changed, refresh icon. - IcoLib_ReleaseIcon((HICON)SendMessage(hWnd, WM_GETICON, ICON_BIG, 0)); + Window_FreeIcon_IcoLib(hWnd); Utils_SaveWindowPosition(hWnd, hContact, ModuleName, "BirthdayWnd"); WindowList_Remove(hAddBirthdayWndsList, hWnd); break; @@ -716,7 +716,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hWnd); - SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(hListMenu)); + Window_SetIcon_IcoLib(hWnd, hListMenu); { HWND hList = GetDlgItem(hWnd, IDC_BIRTHDAYS_LIST); @@ -832,7 +832,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_DESTROY: hBirthdaysDlg = NULL; Utils_SaveWindowPosition(hWnd, NULL, ModuleName, "BirthdayList"); - IcoLib_ReleaseIcon((HICON)SendMessage(hWnd, WM_GETICON, ICON_BIG, 0)); + Window_FreeIcon_IcoLib(hWnd); lastColumn = -1; break; @@ -848,9 +848,9 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hWnd); + Window_SetIcon_IcoLib(hWnd, hListMenu); { timeout = commonData.cDlgTimeout; - SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(hListMenu)); HWND hList = GetDlgItem(hWnd, IDC_UPCOMING_LIST); mir_subclassWindow(hList, BirthdaysListSubclassProc); @@ -960,7 +960,7 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_DESTROY: hUpcomingDlg = NULL; Utils_SaveWindowPosition(hWnd, NULL, ModuleName, "BirthdayListUpcoming"); - IcoLib_ReleaseIcon((HICON)SendMessage(hWnd, WM_GETICON, ICON_BIG, 0)); + Window_FreeIcon_IcoLib(hWnd); KillTimer(hWnd, UPCOMING_TIMER_ID); break; } -- cgit v1.2.3