summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/dlg_anniversarylist.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-10 14:46:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-10 14:46:58 +0000
commit101ca36412b3e7b8851b6b48a4f6cbc17d9f9eff (patch)
treea846c60f7c2a7df17b694deba92e7f6df3bbb882 /plugins/UserInfoEx/dlg_anniversarylist.cpp
parenta3fdadd09f12f6b246b11a5156bf6f0358e9a5f8 (diff)
bitmap operations were removed from TopToolBar and replaced with IcoLib
git-svn-id: http://svn.miranda-ng.org/main/trunk@379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/dlg_anniversarylist.cpp')
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp50
1 files changed, 16 insertions, 34 deletions
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index a7af16c239..8a41aa0138 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -1087,26 +1087,16 @@ INT_PTR DlgAnniversaryListShow(WPARAM wParam, LPARAM lParam)
*
* @return nothing
**/
+
VOID DlgAnniversaryListOnTopToolBarLoaded()
{
- TTBButton ttb;
- HICON hIcon;
- ICONINFO ii;
-
- hIcon = IcoLib_RegisterIcon(TBB_ICONAME, LPGEN("Anniversary list"),
- SECT_TOOLBAR, IDI_ANNIVERSARY, 0);
- if (hIcon) {
- GetIconInfo(hIcon, &ii);
-
- ZeroMemory(&ttb, sizeof(TTBButton));
- ttb.cbSize = sizeof(TTBButton);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
- ttb.pszServiceDown = MS_USERINFO_REMINDER_LIST;
- ttb.hbBitmapUp = ttb.hbBitmapDown = ii.hbmColor;
- ttb.name = Translate("Anniversary list");
-
- CallService(MS_TTB_ADDBUTTON, (WPARAM) &ttb, 0);
- }
+ TTBButton ttb = { 0 };
+ ttb.cbSize = sizeof(ttb);
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.pszServiceDown = MS_USERINFO_REMINDER_LIST;
+ ttb.hIconHandleDn = ttb.hIconHandleUp = Skin_GetIconHandle(ICO_COMMON_ANNIVERSARY);
+ ttb.name = "Anniversary list";
+ CallService(MS_TTB_ADDBUTTON, (WPARAM) &ttb, 0);
}
/**
@@ -1119,22 +1109,14 @@ VOID DlgAnniversaryListOnTopToolBarLoaded()
**/
VOID DlgAnniversaryListOnToolBarLoaded()
{
- TBButton tbb;
-
- ZeroMemory(&tbb, sizeof(tbb));
- tbb.cbSize = sizeof(tbb);
- tbb.tbbFlags = TBBF_VISIBLE | TBBF_SHOWTOOLTIP;
- tbb.defPos = 2100;
- tbb.pszButtonName =
- tbb.pszButtonID = TBB_IDBTN;
- tbb.pszServiceName = MS_USERINFO_REMINDER_LIST;
- tbb.pszTooltipDn =
- tbb.pszTooltipUp = LPGEN("Anniversary list");
- tbb.hPrimaryIconHandle =
- tbb.hSecondaryIconHandle =
- IcoLib_RegisterIconHandle(TBB_ICONAME, tbb.pszTooltipUp,
- SECT_TOOLBAR, IDI_ANNIVERSARY, 0);
-
+ TBButton tbb = { 0 };
+ tbb.cbSize = sizeof(tbb);
+ tbb.tbbFlags = TBBF_VISIBLE | TBBF_SHOWTOOLTIP;
+ tbb.defPos = 2100;
+ tbb.pszButtonName = tbb.pszButtonID = TBB_IDBTN;
+ tbb.pszServiceName = MS_USERINFO_REMINDER_LIST;
+ tbb.pszTooltipDn = tbb.pszTooltipUp = LPGEN("Anniversary list");
+ tbb.hPrimaryIconHandle = tbb.hSecondaryIconHandle = Skin_GetIconHandle(ICO_COMMON_ANNIVERSARY);
CallService(MS_TB_ADDBUTTON, 0, (LPARAM) &tbb);
}