summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-08 20:51:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-08 20:51:14 +0000
commit696f4ea57845f48d6d979ecd9d66bb22bd9f738d (patch)
treec32ac05d363bff47320c1b204561b966aa1c81fd /plugins/AutoShutdown/src
parent3b396a2da6b0b8e0f4d2c051aca133772d317820 (diff)
TopToolbar usage fixed everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp6
1 files changed, 3 insertions, 3 deletions
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")));
}
}