diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-04 20:41:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-04 20:41:13 +0000 |
commit | 6b3ded37e4a4825be2df3612bdcbb7dfc00a1800 (patch) | |
tree | d6b6290439e207be3bb28718a2829e298db08342 /plugins/!NotAdopted/HistoryStats/bandctrl.cpp | |
parent | d4ed74b1750b5389f22fd67246985ba782d2648b (diff) |
HistoryStats sources
git-svn-id: http://svn.miranda-ng.org/main/trunk@8397 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/HistoryStats/bandctrl.cpp')
-rw-r--r-- | plugins/!NotAdopted/HistoryStats/bandctrl.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/HistoryStats/bandctrl.cpp b/plugins/!NotAdopted/HistoryStats/bandctrl.cpp new file mode 100644 index 0000000000..677ab9d90e --- /dev/null +++ b/plugins/!NotAdopted/HistoryStats/bandctrl.cpp @@ -0,0 +1,73 @@ +#include "_globals.h"
+#include "bandctrl.h"
+
+/*
+ * BandCtrl
+ */
+
+void BandCtrl::setLayout(int nLayout)
+{
+ SendMessage(m_hBandWnd, BCM_SETLAYOUT, nLayout, 0);
+}
+
+HANDLE BandCtrl::addButton(DWORD dwFlags, HICON hIcon, DWORD dwData, const mu_text* szTooltip /* = NULL */, const mu_text* szText /* = NULL */)
+{
+ BCBUTTON bcb;
+
+ bcb.dwFlags = dwFlags | BCF_ICON | BCF_DATA | (szTooltip ? BCF_TOOLTIP : 0) | (szText ? BCF_TEXT : 0);
+ bcb.hIcon = hIcon;
+ bcb.dwData = dwData;
+ bcb.szTooltip = const_cast<mu_text*>(szTooltip);
+ bcb.szText = const_cast<mu_text*>(szText);
+
+ return reinterpret_cast<HANDLE>(SendMessage(m_hBandWnd, BCM_ADDBUTTON, 0, reinterpret_cast<LPARAM>(&bcb)));
+}
+
+bool BandCtrl::isButtonChecked(HANDLE hButton)
+{
+ return bool_(SendMessage(m_hBandWnd, BCM_ISBUTTONCHECKED, reinterpret_cast<WPARAM>(hButton), 0));
+}
+
+void BandCtrl::checkButton(HANDLE hButton, bool bCheck)
+{
+ SendMessage(m_hBandWnd, BCM_CHECKBUTTON, reinterpret_cast<WPARAM>(hButton), BOOL_(bCheck));
+}
+
+DWORD BandCtrl::getButtonData(HANDLE hButton)
+{
+ return SendMessage(m_hBandWnd, BCM_GETBUTTONDATA, reinterpret_cast<WPARAM>(hButton), 0);
+}
+
+void BandCtrl::setButtonData(HANDLE hButton, DWORD dwData)
+{
+ SendMessage(m_hBandWnd, BCM_SETBUTTONDATA, reinterpret_cast<WPARAM>(hButton), dwData);
+}
+
+bool BandCtrl::isButtonVisisble(HANDLE hButton)
+{
+ return bool_(SendMessage(m_hBandWnd, BCM_ISBUTTONVISIBLE, reinterpret_cast<WPARAM>(hButton), 0));
+}
+
+void BandCtrl::showButton(HANDLE hButton, bool bShow)
+{
+ SendMessage(m_hBandWnd, BCM_SHOWBUTTON, reinterpret_cast<WPARAM>(hButton), BOOL_(bShow));
+}
+
+RECT BandCtrl::getButtonRect(HANDLE hButton)
+{
+ RECT rButton;
+
+ SendMessage(m_hBandWnd, BCM_GETBUTTONRECT, reinterpret_cast<WPARAM>(hButton), reinterpret_cast<LPARAM>(&rButton));
+
+ return rButton;
+}
+
+bool BandCtrl::isButtonEnabled(HANDLE hButton)
+{
+ return bool_(SendMessage(m_hBandWnd, BCM_ISBUTTONENABLED, reinterpret_cast<WPARAM>(hButton), 0));
+}
+
+void BandCtrl::enableButton(HANDLE hButton, bool bEnable)
+{
+ SendMessage(m_hBandWnd, BCM_ENABLEBUTTON, reinterpret_cast<WPARAM>(hButton), BOOL_(bEnable));
+}
|