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/AddContactPlus/src | |
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/AddContactPlus/src')
-rw-r--r-- | plugins/AddContactPlus/src/addcontact.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index e4138f02ec..3acc9154e0 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -164,8 +164,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) Utils_RestoreWindowPositionNoSize(hdlg, NULL, "AddContact", "");
TranslateDialogDefault(hdlg);
- SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(ICON_ADD,1));
- SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(ICON_ADD));
+ Window_SetIcon_IcoLib(hdlg, IcoLib_GetIconHandle(ICON_ADD));
+
HookEventMessage(ME_SKIN2_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
{
@@ -324,8 +324,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) break;
case DM_ADDCONTACT_CHANGEICONS:
- IcoLib_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(ICON_ADD, 1)));
- IcoLib_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(ICON_ADD)));
+ Window_FreeIcon_IcoLib(hdlg);
+ Window_SetIcon_IcoLib(hdlg, IcoLib_GetIconHandle(ICON_ADD));
break;
case DM_ADDCONTACT_CHANGEACCLIST:
@@ -334,8 +334,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) case WM_DESTROY:
hAddDlg = NULL;
- IcoLib_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, 0));
- IcoLib_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, 0));
+ Window_FreeIcon_IcoLib(hdlg);
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
if (acs) {
db_set_s(NULL, "AddContact", "LastProto", acs->proto);
|