summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-06-02 16:04:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-06-02 16:04:56 +0300
commit3d3e230abad4846ecfbe9aecb14cfcfd94a4d854 (patch)
treef293a41364a26f5e562a992b5a6595683b28b762 /protocols/JabberG
parentb97afa71c6593939d96244cd19053846b9992a61 (diff)
fixes #1974 (Jabber: buttons' icons disappear after clicking Ok)
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp5
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp10
2 files changed, 6 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 0488052609..ad576b0526 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -570,8 +570,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
photoInfo->ppro = nullptr;
photoInfo->hBitmap = nullptr;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)photoInfo);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_SAVE));
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONSETASFLATBTN, TRUE, 0);
+ Button_SetIcon_IcoLib(hwndDlg, IDC_SAVE, g_plugin.getIconHandle(IDI_SAVE));
ShowWindow(GetDlgItem(hwndDlg, IDC_LOAD), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_DELETE), SW_HIDE);
break;
@@ -737,7 +736,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
break;
case WM_DESTROY:
- DestroyIcon((HICON)SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, 0));
+ Button_FreeIcon_IcoLib(hwndDlg, IDC_SAVE);
if (!photoInfo)
break;
if (photoInfo->hBitmap) {
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 1dc02d045d..f5e8f27531 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -264,10 +264,8 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_INITDIALOG:
if (!lParam) break; // Launched from userinfo
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_LOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_OPEN));
- SendDlgItemMessage(hwndDlg, IDC_LOAD, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_DELETE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_DELETE));
- SendDlgItemMessage(hwndDlg, IDC_DELETE, BUTTONSETASFLATBTN, TRUE, 0);
+ Button_SetIcon_IcoLib(hwndDlg, IDC_LOAD, g_plugin.getIconHandle(IDI_OPEN));
+ Button_SetIcon_IcoLib(hwndDlg, IDC_DELETE, g_plugin.getIconHandle(IDI_DELETE));
ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_HIDE);
{
dat = new PhotoDlgProcData;
@@ -465,8 +463,8 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
break;
case WM_DESTROY:
- DestroyIcon((HICON)SendDlgItemMessage(hwndDlg, IDC_LOAD, BM_SETIMAGE, IMAGE_ICON, 0));
- DestroyIcon((HICON)SendDlgItemMessage(hwndDlg, IDC_DELETE, BM_SETIMAGE, IMAGE_ICON, 0));
+ Button_FreeIcon_IcoLib(hwndDlg, IDC_LOAD);
+ Button_FreeIcon_IcoLib(hwndDlg, IDC_DELETE);
dat->ppro->WindowUnsubscribe(hwndDlg);
if (dat->hBitmap) {
dat->ppro->debugLogA("Delete bitmap");