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/AutoShutdown/src/settingsdlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/AutoShutdown/src/settingsdlg.cpp') diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 2871c65e33..7c6ff90591 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -403,7 +403,7 @@ static INT_PTR ServiceShowSettingsDialog(WPARAM wParam,LPARAM lParam) /************************* Toolbar ************************************/ -static WORD hToolbarButton; +static HANDLE hToolbarButton; static int ToolbarLoaded(WPARAM wParam,LPARAM lParam) { @@ -418,7 +418,7 @@ static int ToolbarLoaded(WPARAM wParam,LPARAM lParam) ttbb.dwFlags=TTBBF_VISIBLE|TTBBF_SHOWTOOLTIP; ttbb.name=Translate("Start/Stop automatic shutdown"); - hToolbarButton=(WORD)CallService(MS_TTB_ADDBUTTON,(WPARAM)&ttbb,0); + hToolbarButton = TopToolbar_AddButton(&ttbb); if(ttbb.hIconUp!=NULL) DestroyIcon(ttbb.hIconUp); if(ttbb.hIconDn!=NULL) DestroyIcon(ttbb.hIconDn); return 0; @@ -427,7 +427,7 @@ static int ToolbarLoaded(WPARAM wParam,LPARAM lParam) void SetShutdownToolbarButton(BOOL fActive) { if(hToolbarButton) { - CallService(MS_TTB_SETBUTTONSTATE,hToolbarButton,fActive?TTBST_PUSHED:TTBST_RELEASED); + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton,fActive?TTBST_PUSHED:TTBST_RELEASED); CallService(MS_TTB_SETBUTTONOPTIONS,MAKEWPARAM(TTBO_TIPNAME,hToolbarButton),(LPARAM)(fActive?Translate("Sdop automatic shutdown"):Translate("Start automatic shutdown"))); } } -- cgit v1.2.3