diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-07-18 15:33:29 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-07-18 15:33:29 +0300 |
commit | 8ef72578611917675179230aec4a6956463ef39a (patch) | |
tree | d9e6f6b2635f9a756f3e91cf55e251bedb1d55cb /ui.cpp | |
parent | 0c99b116f722a4609c29a4fbda986cd1e2c6790a (diff) |
started ui implementation, some rework
Diffstat (limited to 'ui.cpp')
-rw-r--r-- | ui.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -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 |