ServerDlg.cpp
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:2k
- // ServerDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Billiards.h"
- #include "ServerDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CServerDlg dialog
- CServerDlg::CServerDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CServerDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CServerDlg)
- m_strNickname = _T("");
- m_WhiteBrush=new CBrush(HS_CROSS,RGB(255,255,255));
- m_BlueBrush=new CBrush(HS_CROSS,RGB(200,200,255));
- //}}AFX_DATA_INIT
- }
- void CServerDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CServerDlg)
- DDX_Text(pDX, IDC_EDIT_NICKNAME, m_strNickname);
- DDX_Control(pDX, IDOK, m_BtnOK);
- DDX_Control(pDX, IDCANCEL, m_BtnCANCEL);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CServerDlg, CDialog)
- //{{AFX_MSG_MAP(CServerDlg)
- ON_WM_CTLCOLOR()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CServerDlg message handlers
- HBRUSH CServerDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
- {
- HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
-
- if(nCtlColor==CTLCOLOR_DLG||nCtlColor==CTLCOLOR_STATIC){
- pDC->SetBkColor(RGB(255,255,255));
- return (HBRUSH)(m_WhiteBrush->GetSafeHandle());
- }
- if(nCtlColor==CTLCOLOR_EDIT){
- pDC->SetBkColor(RGB(200,200,255));
- return (HBRUSH)(m_BlueBrush->GetSafeHandle());
- }
- return hbr;
- }