-
Notifications
You must be signed in to change notification settings - Fork 0
/
DoubleGripperTheme.cpp
40 lines (39 loc) · 1.07 KB
/
DoubleGripperTheme.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "stdafx.h"
#include "DoubleGripperTheme.h"
// DrawCommandBarGripper function.
// if bDraw if FALSE must return gripper size.
// if bDraw is TRUE must draw gripper.
CSize CDoubleGripperTheme::DrawCommandBarGripper(CDC* pDC,
CXTPCommandBar* pBar, BOOL bDraw)
{
// If Toolbar is vertical docked
if (pBar->GetPosition() == xtpBarRight ||
pBar->GetPosition() == xtpBarLeft)
{
if (bDraw)
{
CXTPClientRect rc(pBar);
Draw3dRect(pDC, CRect(3, 3, rc.right - 3, 6),
COLOR_BTNHILIGHT, COLOR_3DSHADOW);
Draw3dRect(pDC, CRect(3, 7, rc.right - 3, 10),
COLOR_BTNHILIGHT, COLOR_3DSHADOW);
}
return CSize(0, 10);
}
// if Toolbar is horizontal docked
else
if (pBar->GetPosition() == xtpBarTop ||
pBar->GetPosition() == xtpBarBottom)
{
CXTPClientRect rc(pBar);
if (bDraw)
{
Draw3dRect(pDC, CRect(3, 3, 6, rc.bottom - 3),
COLOR_BTNHILIGHT, COLOR_3DSHADOW);
Draw3dRect(pDC, CRect(7, 3, 10, rc.bottom - 3),
COLOR_BTNHILIGHT, COLOR_3DSHADOW);
}
return CSize(10, 0);
}
else return CXTPDefaultTheme::DrawCommandBarGripper(pDC, pBar, bDraw);
}