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 --- protocols/VKontakte/src/vk_dialogs.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'protocols/VKontakte/src/vk_dialogs.cpp') diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index ed601d1a76..21fe217e6d 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -34,8 +34,7 @@ CVkCaptchaForm::CVkCaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS *param) : void CVkCaptchaForm::OnInitDialog() { - SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_KEYS), TRUE)); - SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_KEYS))); + Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_KEYS)); m_btnOk.Disable(); m_btnOpenInBrowser.Enable((m_param->bmp != NULL)); @@ -83,8 +82,7 @@ INT_PTR CVkCaptchaForm::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) void CVkCaptchaForm::OnDestroy() { - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_BIG, 0)); - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, 0)); + Window_FreeIcon_IcoLib(m_hwnd); } void CVkCaptchaForm::On_btnOpenInBrowser_Click(CCtrlButton*) @@ -120,8 +118,7 @@ CVkWallPostForm::CVkWallPostForm(CVkProto *proto, WALLPOST_FORM_PARAMS *param) : void CVkWallPostForm::OnInitDialog() { - SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL), TRUE)); - SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL))); + Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WALL)); CMString tszTitle(FORMAT, _T("%s %s"), TranslateT("Wall message for"), m_param->ptszNick); SetCaption(tszTitle); @@ -131,8 +128,7 @@ void CVkWallPostForm::OnInitDialog() void CVkWallPostForm::OnDestroy() { - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_BIG, 0)); - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, 0)); + Window_FreeIcon_IcoLib(m_hwnd); } void CVkWallPostForm::On_btnShare_Click(CCtrlButton*) -- cgit v1.2.3