From 101ca36412b3e7b8851b6b48a4f6cbc17d9f9eff Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Jun 2012 14:46:58 +0000 Subject: 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 --- plugins/StatusPlugins/StartupStatus/toolbars.cpp | 41 ++++++++++++------------ 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'plugins/StatusPlugins/StartupStatus/toolbars.cpp') diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp index 7a12697c52..9b8ab6c475 100644 --- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp +++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp @@ -53,35 +53,34 @@ int RemoveTopToolbarButtons() int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam) { - TTBButton ttb; - int i, profileCount; - DBVARIANT dbv; - char setting[80]; - - profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0); + int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0); ttbButtons = ( HANDLE* )realloc(ttbButtons, profileCount*sizeof(HANDLE)); - ZeroMemory(&ttb,sizeof(ttb)); - ZeroMemory(&dbv,sizeof(dbv)); + + TTBButton ttb = { 0 }; ttb.cbSize = sizeof(ttb); - ttb.dwFlags = TTBBF_VISIBLE|TTBBF_SHOWTOOLTIP; - ttb.hbBitmapDown = LoadBitmap(hInst,MAKEINTRESOURCE(IDB_TTBDOWN)); - ttb.hbBitmapUp = LoadBitmap(hInst,MAKEINTRESOURCE(IDB_TTBUP)); + ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE; ttb.pszServiceDown = ttb.pszServiceUp = MS_SS_LOADANDSETPROFILE; - for (i=0;i 3 times or so + CallService(MS_TTB_SETBUTTONOPTIONS,MAKEWPARAM(TTBO_TIPNAME,ttbButtons[ttbButtonCount]), (LPARAM)profileName); DBFreeVariant(&dbv); ttbButtonCount += 1; @@ -182,10 +181,10 @@ void RegisterButtons() sid.pszDescription = "Pressed toolbar icon"; sid.iDefaultIndex = -IDI_TTBDOWN; sid.flags = SIDF_PATH_TCHAR; - hTtbDown = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + hTtbDown = Skin_AddIcon(&sid); sid.pszName = "StartupStatus/TtbUp"; sid.pszDescription = "Released toolbar icon"; sid.iDefaultIndex = -IDI_TTBUP; - hTtbUp = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + hTtbUp = Skin_AddIcon(&sid); } -- cgit v1.2.3