From 02ed4455c23e3562d71bfc80a0e2c4fede8708f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Jun 2015 13:17:26 +0000 Subject: - all icolib services removed; - IcoLib_* functions are bound directly to the code git-svn-id: http://svn.miranda-ng.org/main/trunk@14161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/buttonsbar.cpp | 86 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'plugins/TabSRMM/src/buttonsbar.cpp') diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 901fbcb4c8..87b1197344 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -1,40 +1,40 @@ #include "commonheaders.h" - -#define BBSF_IMBUTTON (1<<0) -#define BBSF_CHATBUTTON (1<<1) -#define BBSF_CANBEHIDDEN (1<<2) -#define BBSF_NTBSWAPED (1<<3) -#define BBSF_NTBDESTRUCT (1<<4) - -struct CustomButtonData : public MZeroedObject -{ - ~CustomButtonData() - { - mir_free(m_pszModuleName); - mir_free(m_ptszTooltip); - } - - void Accustom(HWND hwnd, TWindowData *dat); - - DWORD m_dwPosition; // default order pos of button, counted from window edge (left or right) - - DWORD m_dwButtonOrigID; // id of button used while button creation and to store button info in DB - char *m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") - - DWORD m_dwButtonCID; - DWORD m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag - - TCHAR *m_ptszTooltip; // button's tooltip - - int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow - HANDLE m_hIcon; // Handle to icolib registred icon - - bool m_bIMButton, m_bChatButton; - bool m_bCanBeHidden, m_bHidden, m_bAutoHidden, m_bSeparator, m_bDisabled, m_bPushButton; - bool m_bLSided, m_bRSided; - BYTE m_opFlags; -}; - + +#define BBSF_IMBUTTON (1<<0) +#define BBSF_CHATBUTTON (1<<1) +#define BBSF_CANBEHIDDEN (1<<2) +#define BBSF_NTBSWAPED (1<<3) +#define BBSF_NTBDESTRUCT (1<<4) + +struct CustomButtonData : public MZeroedObject +{ + ~CustomButtonData() + { + mir_free(m_pszModuleName); + mir_free(m_ptszTooltip); + } + + void Accustom(HWND hwnd, TWindowData *dat); + + DWORD m_dwPosition; // default order pos of button, counted from window edge (left or right) + + DWORD m_dwButtonOrigID; // id of button used while button creation and to store button info in DB + char *m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") + + DWORD m_dwButtonCID; + DWORD m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag + + TCHAR *m_ptszTooltip; // button's tooltip + + int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow + HANDLE m_hIcon; // Handle to icolib registred icon + + bool m_bIMButton, m_bChatButton; + bool m_bCanBeHidden, m_bHidden, m_bAutoHidden, m_bSeparator, m_bDisabled, m_bPushButton; + bool m_bLSided, m_bRSided; + BYTE m_opFlags; +}; + static HANDLE hButtonsBarAddButton; static HANDLE hButtonsBarRemoveButton; static HANDLE hButtonsBarGetButtonState; @@ -237,7 +237,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) SetDlgItemTextA(hwndDlg, tempCID, bbdi->pszModuleName); if (bbdi->hIcon) - SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(bbdi->hIcon)); + SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(bbdi->hIcon)); if (bbdi->pszTooltip) SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_TCHAR); if (bbdi->bbbFlags) { @@ -471,7 +471,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) } else { tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip); - iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->m_hIcon)); + iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon)); tvis.item.iImage = tvis.item.iSelectedImage = iImage; } cbd->m_opFlags = 0; @@ -499,7 +499,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) } else { tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip); - iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->m_hIcon)); + iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon)); tvis.item.iImage = tvis.item.iSelectedImage = iImage; } tvis.item.state = 0; @@ -808,7 +808,7 @@ void CustomButtonData::Accustom(HWND hwndBtn, TWindowData *dat) SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0); SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0); if (m_hIcon) - SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(m_hIcon)); + SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(m_hIcon)); if (m_ptszTooltip) SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(m_ptszTooltip), BATF_TCHAR); SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0); @@ -1155,7 +1155,7 @@ void BB_UpdateIcons(HWND hdlg) hwndBtn = GetDlgItem(hdlg, cbd->m_dwButtonCID); if (hwndBtn && cbd->m_hIcon) - SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon)); + SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon)); } } @@ -1167,7 +1167,7 @@ void BB_UpdateIcons(HWND hdlg) hwndBtn = GetDlgItem(hdlg, cbd->m_dwButtonCID); if (hwndBtn && cbd->m_hIcon) - SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon)); + SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon)); } } } @@ -1406,7 +1406,7 @@ void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData *cbd) HWND hwndBtn = GetDlgItem(hwndDlg, cbd->m_dwButtonCID); if (hwndBtn) { if (cbd->m_hIcon) - SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon)); + SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon)); if (cbd->m_ptszTooltip) SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_TCHAR); SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0); -- cgit v1.2.3