summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-07 20:38:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-07 20:38:34 +0000
commit37690f6a83f2935292f28cdec8340c206a2f3aac (patch)
treebbd87013cecd8dc3aa06cf5a7cfe707de657cde7 /plugins/Clist_nicer
parent990064649ebc7b3df17b3784b6c38d6a09df39ec (diff)
fix for top toolbar drawing in Clist Nicer & Clist Modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@838 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/SRC/CLCButton.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp
index f27892f884..134ca1ae71 100644
--- a/plugins/Clist_nicer/SRC/CLCButton.cpp
+++ b/plugins/Clist_nicer/SRC/CLCButton.cpp
@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <commonheaders.h>
#include <m_button_int.h>
+#include <m_toptoolbar.h>
extern HINSTANCE g_hInst;
extern LONG g_cxsmIcon, g_cysmIcon;
@@ -393,15 +394,32 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
return 0;
}
-void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat)
+static void CustomizeToolbar(HANDLE, HWND hWnd, LPARAM)
{
MButtonCustomize Custom;
Custom.cbLen = sizeof(MButtonExtension);
Custom.fnPainter = (pfnPainterFunc)PaintWorker;
Custom.fnWindowProc = TSButtonWndProc;
SendMessage(hWnd, BUTTONSETCUSTOM, 0, (LPARAM)&Custom);
+}
+
+void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat)
+{
+ CustomizeToolbar(0, hWnd, 0);
SendMessage(hWnd, BUTTONSETSKINNED, bIsSkinned, 0);
SendMessage(hWnd, BUTTONSETASTHEMEDBTN, bIsThemed, 0);
SendMessage(hWnd, BUTTONSETASFLATBTN, bIsFlat, 0);
}
+
+static int Nicer_CustomizeToolbar(WPARAM, LPARAM)
+{
+ TopToolbar_SetCustomProc(CustomizeToolbar, 0);
+ return 0;
+}
+
+int LoadButtonModule()
+{
+ HookEvent(ME_SYSTEM_MODULESLOADED, Nicer_CustomizeToolbar);
+ return 0;
+}