From 679f5352ac3ff2b3f098a502042d3359d2240415 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 9 Jul 2012 21:14:54 +0000 Subject: minor fixes for toptoolbar git-svn-id: http://svn.miranda-ng.org/main/trunk@885 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/modern_tbbutton.cpp | 4 ++++ plugins/Clist_modern/modern_toolbar.cpp | 16 +++++++++++++--- plugins/TopToolBar/toolbar.cpp | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp index ca34872e89..e6c75614ad 100644 --- a/plugins/Clist_modern/modern_tbbutton.cpp +++ b/plugins/Clist_modern/modern_tbbutton.cpp @@ -408,6 +408,10 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam } break; + case WM_ERASEBKGND: + lpSBData->lResult = 1; + return 1; + case MBM_SETICOLIBHANDLE: if (lpSBData->hIconPrivate) { DestroyIcon(lpSBData->hIconPrivate); diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp index 5a5b0395f2..fa729cb150 100644 --- a/plugins/Clist_modern/modern_toolbar.cpp +++ b/plugins/Clist_modern/modern_toolbar.cpp @@ -240,12 +240,18 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA EndPaint(hwnd,&ps); } } + pMTBInfo->lResult = DefWindowProc(hwnd, msg, wParam, lParam); return 1; + case WM_NOTIFY: + if (((LPNMHDR) lParam)->code == BUTTONNEEDREDRAW) + pcli->pfnInvalidateRect(hwnd, NULL, FALSE); + pMTBInfo->lResult = 0; + return 1; + case MTBM_LAYEREDPAINT: { - int i; RECT MyRect={0}; HDC hDC=(HDC)wParam; GetWindowRect(hwnd,&MyRect); @@ -254,7 +260,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA GetClientRect(hwnd, &rcClient); SkinDrawGlyph(hDC, &rcClient, &rcClient, "Bar,ID=ToolBar,Part=Background"); - for (i=0; i < pMTBInfo->pButtonList->realCount; i++) { + for (int i=0; i < pMTBInfo->pButtonList->realCount; i++) { RECT childRect; POINT Offset; TTBCtrlButton* mtbi = (TTBCtrlButton*)pMTBInfo->pButtonList->items[i]; @@ -269,9 +275,13 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case WM_DESTROY: xpt_FreeThemeForWindow(hwnd); + + default: + return 0; } - return 0; + pMTBInfo->lResult = TRUE; + return 1; } static int ToolBar_LayeredPaintProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, DWORD dFlags, void * CallBackData) diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp index 6f090dcc0d..5e0e2a02f7 100644 --- a/plugins/TopToolBar/toolbar.cpp +++ b/plugins/TopToolBar/toolbar.cpp @@ -783,7 +783,7 @@ static INT_PTR OnEventFire(WPARAM wParam, LPARAM lParam) Frame.tname = pluginname; Frame.hWnd = g_ctrl->hWnd; Frame.align = alTop; - Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR; + Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR | F_NO_SUBCONTAINER; Frame.height = 18; g_ctrl->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); -- cgit v1.2.3