summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-09 21:14:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-09 21:14:54 +0000
commit679f5352ac3ff2b3f098a502042d3359d2240415 (patch)
tree94db9288d26312e06d43e1db52a5c7bbc6f9014c /plugins
parentcee90240b1301ad373e98fe874a924fcdbb83447 (diff)
minor fixes for toptoolbar
git-svn-id: http://svn.miranda-ng.org/main/trunk@885 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/modern_tbbutton.cpp4
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp16
-rw-r--r--plugins/TopToolBar/toolbar.cpp2
3 files changed, 18 insertions, 4 deletions
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);