Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / client / client_config / bar.cpp
blobcfd87abf62ca73b25dbefbd370f932d7672d52fb
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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
20 #include "stdafx.h"
21 #include "client_config.h"
22 #include "bar.h"
24 // ***************************************************************************
25 // CBar
26 // ***************************************************************************
28 CBar::CBar()
32 CBar::~CBar()
37 BEGIN_MESSAGE_MAP(CBar, CWnd)
38 //{{AFX_MSG_MAP(CBar)
39 ON_WM_PAINT()
40 //}}AFX_MSG_MAP
41 END_MESSAGE_MAP()
44 // ***************************************************************************
45 // CBar message handlers
46 // ***************************************************************************
48 void CBar::OnPaint()
50 CPaintDC dc(this); // device context for painting
52 RECT client;
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);
67 else
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);