From 696f4ea57845f48d6d979ecd9d66bb22bd9f738d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 8 Jul 2012 20:51:14 +0000 Subject: TopToolbar usage fixed everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/RecentContacts/RecentContacts.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'plugins/RecentContacts/RecentContacts.cpp') diff --git a/plugins/RecentContacts/RecentContacts.cpp b/plugins/RecentContacts/RecentContacts.cpp index b2dfc76e9e..fb893f87e0 100644 --- a/plugins/RecentContacts/RecentContacts.cpp +++ b/plugins/RecentContacts/RecentContacts.cpp @@ -454,19 +454,13 @@ static int OnContactSettingChanged( WPARAM wParam, LPARAM lParam ) int Create_TopToolbarShowList(WPARAM wParam, LPARAM lParam) { - if (ServiceExists(MS_TTB_ADDBUTTON)) { - TTBButton ttbb = { 0 }; - ttbb.cbSize = sizeof(ttbb); - ttbb.hIconHandleDn = ttbb.hIconHandleDn = hIcon; - ttbb.pszService = msLastUC_ShowList; - ttbb.dwFlags = TTBBF_VISIBLE|TTBBF_SHOWTOOLTIP; - ttbb.name = Translate(msLastUC_ShowListName); - - hTopToolbarButtonShowList = (HANDLE)CallService(MS_TTB_ADDBUTTON, (WPARAM)&ttbb, 0); - if ((int)hTopToolbarButtonShowList == -1) - hTopToolbarButtonShowList = NULL; - } - + TTBButton ttbb = { 0 }; + ttbb.cbSize = sizeof(ttbb); + ttbb.hIconHandleDn = ttbb.hIconHandleDn = hIcon; + ttbb.pszService = msLastUC_ShowList; + ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; + ttbb.name = msLastUC_ShowListName; + hTopToolbarButtonShowList = TopToolbar_AddButton(&ttbb); return 0; } -- cgit v1.2.3