ToolBarDlg.cpp
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- // ToolBarDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Billiards.h"
- #include "ToolBarDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CToolBarDlg dialog
- CToolBarDlg::CToolBarDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CToolBarDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CToolBarDlg)
- m_WhiteBrush=new CBrush(HS_CROSS,RGB(255,255,255));
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CToolBarDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CToolBarDlg)
- DDX_Control(pDX,ID_JOINGAME,m_BtnJoingame);
- DDX_Control(pDX,ID_NEWGAME,m_BtnNewgame);
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CToolBarDlg, CDialog)
- //{{AFX_MSG_MAP(CToolBarDlg)
- ON_WM_CTLCOLOR()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CToolBarDlg message handlers
- HBRUSH CToolBarDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
- {
- HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
-
- if(nCtlColor==CTLCOLOR_BTN){
- pDC->SetBkColor(RGB(255,255,255));
- return (HBRUSH)(m_WhiteBrush->GetSafeHandle());
- }
- // TODO: Return a different brush if the default is not desired
- return hbr;
- }