/** * This function is called by the ME_TB_MODULELOADED event. * It adds a set of buttons to the Toolbar of the Modern Contact List. * * @param none * * @return nothing **/ VOID SvcReminderOnToolBarLoaded() { TBButton tbb; ZeroMemory(&tbb, sizeof(tbb)); tbb.cbSize = sizeof(tbb); tbb.defPos = 2000; tbb.tbbFlags = TBBF_VISIBLE | TBBF_SHOWTOOLTIP; tbb.pszButtonName = tbb.pszButtonID = TBB_IDBTN; tbb.pszServiceName = MS_USERINFO_REMINDER_CHECK; tbb.pszTooltipDn = tbb.pszTooltipUp = LPGEN("Check anniversaries"); tbb.hPrimaryIconHandle = tbb.hSecondaryIconHandle = IcoLib_RegisterIconHandle(TBB_ICONAME, tbb.pszButtonName, SECT_TOOLBAR, IDI_BIRTHDAY, 0); CallService(MS_TB_ADDBUTTON, 0, (LPARAM) &tbb); }
/** * This function manually registers a single icon from the default icon library. * * @param szIconID - This is the uniquely identifying string for an icon. * This string is the setting name in the database and should * only use ASCII characters. * @param szDescription - This is the description displayed in the options dialog. * @param szSection - This is the subsection, where the icon is organized in the options dialog. * @param idIcon - This is the ResourceID of the icon in the default file * @param Size - This is the desired size of the icon to load. * 0: default size for small icons (16x16) * 1: default size for normal icons (32x32) * * @return This function returns the HICON of the icon itself. **/ HICON IcoLib_RegisterIcon(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, int idIcon, int Size) { return IcoLib_GetIconByHandle(IcoLib_RegisterIconHandle(szIconID, szDescription, szSection, idIcon, Size)); }