summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/sidebar.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-12 18:03:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-12 18:03:10 +0000
commitd9013df6a880f0bd7459f952d654ff476e480a90 (patch)
treed6547c07cc04da79368c3a98003f365b83835c7a /plugins/TabSRMM/src/sidebar.cpp
parent58ff50e5bf8dbb6b28d54370423232dc0221cd53 (diff)
custom buttons in TabSRMM removed and based on the standard MButtonClass
git-svn-id: http://svn.miranda-ng.org/main/trunk@5661 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/sidebar.cpp')
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index d304d8965a..18e44fe8df 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -100,15 +100,15 @@ void CSideBarButton::_create()
m_isTopAligned = true;
m_sz.cx = m_sz.cy = 0;
- m_hwnd = ::CreateWindowEx(0, _T("TSButtonClass"), _T(""), WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ m_hwnd = ::CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, m_sideBar->getScrollWnd(), reinterpret_cast<HMENU>(m_id), g_hInst, NULL);
-
if (m_hwnd) {
+ CustomizeButton(m_hwnd);
::SendMessage(m_hwnd, BUTTONSETASSIDEBARBUTTON, (WPARAM)this, 0);
::SendMessage(m_hwnd, BUTTONSETASFLATBTN, FALSE, 0);
::SendMessage(m_hwnd, BUTTONSETASTHEMEDBTN, TRUE, 0);
::SendMessage(m_hwnd, BUTTONSETCONTAINER, (LPARAM)m_sideBar->getContainer(), 0);
- m_buttonControl = (MButtonCtrl *)::GetWindowLongPtr(m_hwnd, 0);
+ m_buttonControl = (TSButtonCtrl *)::GetWindowLongPtr(m_hwnd, 0);
}
else
delete this;
@@ -170,7 +170,7 @@ const SIZE& CSideBarButton::measureItem()
/**
* Render the button item. Callback from the button window procedure
*
- * @param ctl MButtonCtrl *: pointer to the private button data structure
+ * @param ctl TSButtonCtrl *: pointer to the private button data structure
* @param hdc HDC: device context for painting
*/
void CSideBarButton::RenderThis(const HDC hdc) const
@@ -987,18 +987,17 @@ LRESULT CALLBACK CSideBar::wndProcStub(HWND hwnd, UINT msg, WPARAM wParam, LPARA
* @param rc RECT*: target rectangle
* @param stateId the state identifier (normal, pressed, hot, disabled etc.)
*/
-void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT *rc,
- const CSideBarButton *item)
+void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT *rc, const CSideBarButton *item)
{
- UINT id = item->getID();
- int stateId = item->m_buttonControl->stateId;
- bool fIsActiveItem = (item->m_sideBar->getActiveItem() == item);
+ UINT id = item->getID();
+ int stateId = item->m_buttonControl->stateId;
+ bool fIsActiveItem = (item->m_sideBar->getActiveItem() == item);
if (CSkin::m_skinEnabled) {
- TContainerData* pContainer = const_cast<TContainerData *>(item->m_sideBar->getContainer());
- int id = stateId == PBS_PRESSED || fIsActiveItem ? ID_EXTBKBUTTONSPRESSED : (stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSNPRESSED);
- CSkinItem* skinItem = &SkinItems[id];
- HWND hwnd;
+ TContainerData *pContainer = const_cast<TContainerData *>(item->m_sideBar->getContainer());
+ int id = stateId == PBS_PRESSED || fIsActiveItem ? ID_EXTBKBUTTONSPRESSED : (stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSNPRESSED);
+ CSkinItem *skinItem = &SkinItems[id];
+ HWND hwnd;
if (id == IDC_SIDEBARUP)
hwnd = item->m_sideBar->getScrollUp()->m_buttonControl->hwnd;