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 /src/core/stdchat | |
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 'src/core/stdchat')
-rw-r--r-- | src/core/stdchat/src/options.cpp | 7 | ||||
-rw-r--r-- | src/core/stdchat/src/stdafx.h | 1 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp index a3abd05109..b5ddfdc7d4 100644 --- a/src/core/stdchat/src/options.cpp +++ b/src/core/stdchat/src/options.cpp @@ -313,6 +313,13 @@ HICON LoadIconEx(const char *pszIcoLibName, bool big) return IcoLib_GetIcon(szTemp, big);
}
+HANDLE GetIconHandle(const char *pszIcoLibName)
+{
+ char szTemp[256];
+ mir_snprintf(szTemp, "chat_%s", pszIcoLibName);
+ return IcoLib_GetIconHandle(szTemp);
+}
+
static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault)
{
DBVARIANT dbv;
diff --git a/src/core/stdchat/src/stdafx.h b/src/core/stdchat/src/stdafx.h index ec6be80973..5acc72626b 100644 --- a/src/core/stdchat/src/stdafx.h +++ b/src/core/stdchat/src/stdafx.h @@ -149,6 +149,7 @@ SESSION_INFO* SM_GetNextWindow(SESSION_INFO *si); int OptionsInitialize(WPARAM wParam, LPARAM lParam);
void AddIcons(void);
HICON LoadIconEx(const char *pszIcoLibName, bool big);
+HANDLE GetIconHandle(const char *pszIcolibName);
// services.c
void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 00abe9297a..eff7d1c9bd 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -1268,8 +1268,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar SendMessage(hwndDlg, GC_FIXTABICONS, 0, 0);
SendMessage(si->hwndStatus, SB_SETICON, 0, (LPARAM)hIcon);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx("window", TRUE));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx("window", FALSE));
+ Window_SetIcon_IcoLib(hwndDlg, GetIconHandle("window"));
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETBKGNDCOLOR, 0, g_Settings.crLogBackground);
|