summaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-07-18 15:33:29 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-07-18 15:33:29 +0300
commit8ef72578611917675179230aec4a6956463ef39a (patch)
treed9e6f6b2635f9a756f3e91cf55e251bedb1d55cb /ui.cpp
parent0c99b116f722a4609c29a4fbda986cd1e2c6790a (diff)
started ui implementation, some rework
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/ui.cpp b/ui.cpp
index 8ea8424..bca98ef 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -16,14 +16,26 @@
#include "commonheaders.h"
+extern list <JabberAccount*> Accounts;
+
int CreateButtons()
{
- BBButton button = {0};
- button.cbSize = sizeof(button);
- button.pszModuleName = szModuleName;
- button.pszTooltip = "Test button";
- button.bbbFlags = BBBF_ISPUSHBUTTON |BBBF_ISIMBUTTON;
- button.dwDefPos = 100;
- CallService(MS_BB_ADDBUTTON, 0, (WPARAM)&button);
+ if(ServiceExists(MS_BB_ADDBUTTON))
+ {
+ BBButton button = {0};
+ button.cbSize = sizeof(button);
+ button.pszModuleName = szModuleName;
+ button.ptszTooltip = _T("Test button");
+ button.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISCHATBUTTON | BBBF_HIDDEN;
+ button.dwDefPos = 500;
+ button.dwButtonID = 0x000001;
+ CallService(MS_BB_ADDBUTTON, 0, (WPARAM)&button);
+ button.bbbFlags -= BBBF_HIDDEN;
+ for(list <JabberAccount*>::iterator p = Accounts.begin(); p != Accounts.end(); p++)
+ {
+ if((*p)->getJuickContact() != INVALID_HANDLE_VALUE)
+ CallService(MS_BB_SETBUTTONSTATE, LPARAM((*p)->getJuickContact()), (WPARAM)&button);
+ }
+ }
return 0;
} \ No newline at end of file