1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // bar.cpp : implementation file
21 #include "client_config.h"
24 // ***************************************************************************
26 // ***************************************************************************
37 BEGIN_MESSAGE_MAP(CBar
, CWnd
)
44 // ***************************************************************************
45 // CBar message handlers
46 // ***************************************************************************
50 CPaintDC
dc(this); // device context for painting
53 GetClientRect (&client
);
55 CPen
hilight (PS_SOLID
, 1, GetSysColor (COLOR_3DHILIGHT
));
56 CPen
shadow (PS_SOLID
, 1, GetSysColor (COLOR_3DSHADOW
));
58 if (client
.right
- client
.left
> client
.bottom
- client
.top
)
60 dc
.SelectObject (shadow
);
61 dc
.MoveTo (client
.left
, client
.top
);
62 dc
.LineTo (client
.right
, client
.top
);
63 dc
.SelectObject (hilight
);
64 dc
.MoveTo (client
.left
, client
.bottom
);
65 dc
.LineTo (client
.right
, client
.bottom
);
69 dc
.SelectObject (hilight
);
70 dc
.MoveTo (client
.left
, client
.top
);
71 dc
.LineTo (client
.left
, client
.bottom
);
72 dc
.SelectObject (shadow
);
73 dc
.MoveTo (client
.right
, client
.top
);
74 dc
.LineTo (client
.right
, client
.bottom
);
77 // Do not call CWnd::OnPaint() for painting messages
80 // ***************************************************************************
82 BOOL
CBar::Create (CRect
&rect
, CWnd
*parent
)
84 return CWnd::Create ("Static", "", WS_CHILD
|WS_VISIBLE
, rect
, parent
, 0);