diff options
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 18 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/stdafx.h | 6 | ||||
-rw-r--r-- | protocols/IRCG/src/windows.cpp | 14 |
5 files changed, 10 insertions, 32 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 98de854279..0f4caf2a54 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -719,7 +719,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) SetWindowTextA(hwnd, "Miranda IRC");
SetDlgItemText(hwnd, IDC_TEXT, TranslateT("Please choose an IRC-network to go online. This network will be the default."));
SetDlgItemText(hwnd, IDC_CAPTION, TranslateT("Default network"));
- WindowSetIcon(hwnd, IDI_MAIN);
+ Window_SetIcon_IcoLib(hwnd, GetIconHandle(IDI_MAIN));
ShowWindow(hwnd, SW_SHOW);
SetActiveWindow(hwnd);
}
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 4fe3b827e4..7d13696798 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -228,24 +228,6 @@ HANDLE GetIconHandle(int iconId) return NULL;
}
-void ReleaseIconEx(HICON hIcon)
-{
- if (hIcon)
- IcoLib_ReleaseIcon(hIcon);
-}
-
-void WindowSetIcon(HWND hWnd, int iconId)
-{
- SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx(iconId, true));
- SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx(iconId));
-}
-
-void WindowFreeIcon(HWND hWnd)
-{
- ReleaseIconEx((HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0));
- ReleaseIconEx((HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0));
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// code page handler
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 46241256c7..19909dfc4b 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -351,7 +351,7 @@ INT_PTR __cdecl CIrcProto::OnQuickConnectMenuCommand(WPARAM, LPARAM) SetWindowText(m_quickDlg->GetHwnd(), TranslateT("Quick connect"));
SetDlgItemText(m_quickDlg->GetHwnd(), IDC_TEXT, TranslateT("Please select IRC network and enter the password if needed"));
SetDlgItemText(m_quickDlg->GetHwnd(), IDC_CAPTION, TranslateT("Quick connect"));
- WindowSetIcon(m_quickDlg->GetHwnd(), IDI_QUICK);
+ Window_SetIcon_IcoLib(m_quickDlg->GetHwnd(), GetIconHandle(IDI_QUICK));
}
ShowWindow(m_quickDlg->GetHwnd(), SW_SHOW);
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index bc450f78ac..6870a538d2 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -610,15 +610,11 @@ void InitServers(void); void RereadServers(void);
void InitContactMenus(void);
-void UninitContactMenus(void);
-
-void WindowSetIcon(HWND hWnd, int iconId);
-void WindowFreeIcon(HWND hWnd);
+void UninitContactMenus(void);
void InitIcons(void);
HICON LoadIconEx(int iIndex, bool big = false);
HANDLE GetIconHandle(int iconId);
-void ReleaseIconEx(HICON hIcon);
//tools.cpp
int __stdcall WCCmp(const TCHAR* wild, const TCHAR* string);
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index fded5db590..78417104da 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -87,7 +87,7 @@ void CWhoisDlg::OnInitDialog() CCoolIrcDlg::OnInitDialog();
- WindowSetIcon(m_hwnd, IDI_WHOIS);
+ Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WHOIS));
}
void CWhoisDlg::OnClose()
@@ -208,7 +208,7 @@ CNickDlg::CNickDlg(CIrcProto *_pro) void CNickDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
- WindowSetIcon(m_hwnd, IDI_RENAME);
+ Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_RENAME));
DBVARIANT dbv;
if (!m_proto->getTString("RecentNicks", &dbv)) {
@@ -292,7 +292,7 @@ void CListDlg::OnInitDialog() m_list.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
m_list2.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
- WindowSetIcon(m_hwnd, IDI_LIST);
+ Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_LIST));
m_status.SetText(TranslateT("Please wait..."));
}
@@ -714,7 +714,7 @@ void CQuestionDlg::OnInitDialog() {
CCoolIrcDlg::OnInitDialog();
- WindowSetIcon(m_hwnd, IDI_IRCQUESTION);
+ Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_IRCQUESTION));
}
void CQuestionDlg::OnClose()
@@ -873,7 +873,7 @@ void CManagerDlg::OnInitDialog() HWND hwndEdit = ChildWindowFromPoint(m_topic.GetHwnd(), pt);
mir_subclassWindow(hwndEdit, MgrEditSubclassProc);
- WindowSetIcon(m_hwnd, IDI_MANAGER);
+ Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_MANAGER));
m_list.SendMsg(LB_SETHORIZONTALEXTENT, 750, NULL);
m_radio1.SetState(true);
@@ -1395,8 +1395,8 @@ void CCoolIrcDlg::OnDestroy() SendDlgItemMessage(m_hwnd, IDC_CAPTION, WM_SETFONT, SendDlgItemMessage(m_hwnd, IDOK, WM_GETFONT, 0, 0), 0);
DeleteObject(hFont);
- ReleaseIconEx((HICON)SendDlgItemMessage(m_hwnd, IDC_LOGO, STM_SETICON, 0, 0));
- WindowFreeIcon(m_hwnd);
+ IcoLib_ReleaseIcon((HICON)SendDlgItemMessage(m_hwnd, IDC_LOGO, STM_SETICON, 0, 0));
+ Window_FreeIcon_IcoLib(m_hwnd);
}
INT_PTR CCoolIrcDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
|