diff options
author | George Hazan <george.hazan@gmail.com> | 2016-06-05 16:11:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-06-05 16:11:08 +0000 |
commit | eec361608fde60d63fe4511e26e3b95c7f72be13 (patch) | |
tree | 0263d1829438c7778a713ee2ae6bbda27c0d260a /plugins/WhenWasIt | |
parent | 7e822f45eccd034e7acd8d868ce5dc8c55458ff0 (diff) |
- 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
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r-- | plugins/WhenWasIt/src/dlg_handlers.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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;
}
|