int OnToolbarLoaded(WPARAM wParam, LPARAM lParam) { TTBButton ttb = { sizeof(ttb) }; ttb.name = LPGEN("Enable/disable auto update"); ttb.pszService = MS_NEWSAGGREGATOR_ENABLED; ttb.pszTooltipUp = LPGEN("Auto Update Enabled"); ttb.pszTooltipDn = LPGEN("Auto Update Disabled"); ttb.hIconHandleUp = GetIconHandle("enabled"); ttb.hIconHandleDn = GetIconHandle("disabled"); ttb.dwFlags = (db_get_b(NULL, MODULE, "AutoUpdate", 1) ? 0 : TTBBF_PUSHED) | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE; hTBButton = TopToolbar_AddButton(&ttb); return 0; }
int ToolbarLoaded(WPARAM,LPARAM) { TTBButton ttb = { sizeof(ttb) }; ttb.hIconHandleUp = iconList[2].hIcolib; ttb.hIconHandleDn = iconList[1].hIcolib; ttb.pszService = "AutoShutdown/MenuCommand"; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON; ttb.name = LPGEN("Start/Stop automatic shutdown"); ttb.pszTooltipUp = LPGEN("Start automatic shutdown"); ttb.pszTooltipDn = LPGEN("Stop automatic shutdown"); hToolbarButton = TopToolbar_AddButton(&ttb); return 0; }
int Quotes_OnToolbarLoaded(WPARAM, LPARAM) { TTBButton ttb = { 0 }; ttb.name = LPGEN("Enable/Disable Quotes Auto Update"); ttb.pszService = g_pszAutoUpdateCmd; ttb.pszTooltipUp = LPGEN("Quotes Auto Update Enabled"); ttb.pszTooltipDn = LPGEN("Quotes Auto Update Disabled"); ttb.hIconHandleUp = Quotes_GetIconHandle(IDI_ICON_MAIN); ttb.hIconHandleDn = Quotes_GetIconHandle(IDI_ICON_DISABLED); ttb.dwFlags = ((g_bAutoUpdate) ? 0 : TTBBF_PUSHED) | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE; g_hTBButton = TopToolbar_AddButton(&ttb); ttb.name = LPGEN("Currency Converter"); ttb.pszService = g_pszCurrencyConverter; ttb.pszTooltipUp = LPGEN("Currency Converter"); ttb.pszTooltipDn = LPGEN("Currency Converter"); ttb.hIconHandleUp = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER); ttb.hIconHandleDn = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER); ttb.dwFlags = TTBBF_VISIBLE; TopToolbar_AddButton(&ttb); return 0; }
static int CreateTTButtons(WPARAM wParam, LPARAM lParam) { TTBButton ttb = {sizeof(ttb)}; ttb.dwFlags = (Enabled == 1 ? 0 : TTBBF_PUSHED) | TTBBF_VISIBLE | TTBBF_ASPUSHBUTTON; ttb.pszService = SS_SERVICE_NAME; ttb.hIconHandleDn = GetIconHandle(DISABLE_SILENCETTB); ttb.hIconHandleUp = GetIconHandle(ENABLE_SILENCETTB); ttb.name = TTBNAME; ttb.pszTooltipUp = SS_IS_ON; ttb.pszTooltipDn = SS_IS_OFF; Buttons = TopToolbar_AddButton(&ttb); if (Buttons) ttbButtons.insert(Buttons); return 0; }
int FacebookProto::OnToolbarInit(WPARAM, LPARAM) { TTBButton ttb = { sizeof(ttb) }; ttb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE; char service[100]; mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, "/Mind"); ttb.pszService = service; ttb.pszTooltipUp = ttb.name = LPGEN("Share status..."); ttb.hIconHandleUp = Skin_GetIconByHandle(GetIconHandle("mind")); TopToolbar_AddButton(&ttb); return 0; }
static int OnTTBLoaded(WPARAM wParam,LPARAM lParam) { int state = IsWindowVisible(hwndConsole); TTBButton ttb = { sizeof(ttb) }; ttb.hIconHandleUp = LoadIcon(IDI_BTN_UP); ttb.hIconHandleDn = LoadIcon(IDI_BTN_DN); ttb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; ttb.pszService = MS_CONSOLE_SHOW_HIDE; ttb.name = LPGEN("Show/Hide Console"); ttb.pszTooltipDn = LPGEN("Hide Console"); ttb.pszTooltipUp = LPGEN("Show Console"); hTTBButt = TopToolbar_AddButton(&ttb); return 0; }
int TTBLoaded(WPARAM, LPARAM) { TTBButton ttb = { 0 }; ttb.pszService = "Popup/EnableDisableMenuCommand"; ttb.lParamUp = 1; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON; if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) ttb.dwFlags |= TTBBF_PUSHED; ttb.name = LPGEN("Toggle Popups"); ttb.hIconHandleUp = IcoLib_GetIconHandle(ICO_TB_POPUP_OFF); ttb.hIconHandleDn = IcoLib_GetIconHandle(ICO_TB_POPUP_ON); ttb.pszTooltipUp = LPGEN("Enable Popups"); ttb.pszTooltipDn = LPGEN("Disable Popups"); hTTButton = TopToolbar_AddButton(&ttb); return 0; }
static int TTBLoaded(WPARAM, LPARAM) { TTBButton ttb = { sizeof(ttb) }; ttb.pszService = MENUCOMMAND_SVC; ttb.lParamUp = 1; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON; if (PopupOptions.ModuleIsEnabled) ttb.dwFlags |= TTBBF_PUSHED; ttb.name = LPGEN("Toggle Popups"); ttb.hIconHandleUp = Skin_GetIconHandle(ICO_TB_POPUP_OFF); ttb.hIconHandleDn = Skin_GetIconHandle(ICO_TB_POPUP_ON); ttb.pszTooltipUp = LPGEN("Enable Popups"); ttb.pszTooltipDn = LPGEN("Disable Popups"); hTTButton = TopToolbar_AddButton(&ttb); return 0; }
static int Create_TopToolbar(WPARAM, LPARAM) { int SendOnEvent = CContactSettings(g_ProtoStates[(char*)NULL].Status).Autoreply; if (ServiceExists(MS_TTB_REMOVEBUTTON)) { TTBButton ttbb = { 0 }; ttbb.name = LPGEN("Toggle autoreply on/off");; ttbb.hIconHandleUp = iconList[0].hIcolib; ttbb.hIconHandleDn = iconList[1].hIcolib; ttbb.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE; ttbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE; ttbb.pszTooltipDn = LPGEN("Toggle autoreply off"); ttbb.pszTooltipUp = LPGEN("Toggle autoreply on"); g_hTopToolbarbutton = TopToolbar_AddButton(&ttbb); CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : 0); } return 0; }