WizardDlg.cpp
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:2k
- // WizardDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Billiards.h"
- #include "WizardDlg.h"
- #include "MainFrm.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CWizardDlg dialog
- CWizardDlg::CWizardDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CWizardDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CWizardDlg)
- m_WhiteBrush=new CBrush(HS_CROSS,RGB(255,255,255));
- m_BlueBrush=new CBrush(HS_CROSS,RGB(200,200,255));
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CWizardDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CWizardDlg)
- DDX_Control(pDX,IDC_RADIO_SERVER,m_ctlRadioServer);
- DDX_Control(pDX,IDC_RADIO_CLIENT,m_ctlRadioClient);
- DDX_Control(pDX,IDC_RADIO_PRACTICE,m_ctlRadioPractice);
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CWizardDlg, CDialog)
- //{{AFX_MSG_MAP(CWizardDlg)
- ON_BN_CLICKED(IDC_RADIO_CLIENT, OnRadioClient)
- ON_BN_CLICKED(IDC_RADIO_PRACTICE, OnRadioPractice)
- ON_BN_CLICKED(IDC_RADIO_SERVER, OnRadioServer)
- ON_WM_CTLCOLOR()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CWizardDlg message handlers
- void CWizardDlg::OnRadioClient()
- {
- EndDialog(IDOK);
- ((CMainFrame *)AfxGetMainWnd())->OnJoingame();
- }
- void CWizardDlg::OnRadioPractice()
- {
- EndDialog(IDOK);
- }
- void CWizardDlg::OnRadioServer()
- {
- EndDialog(IDOK);
- ((CMainFrame *)AfxGetMainWnd())->OnNewgame();
- }
- HBRUSH CWizardDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
- {
- HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
-
- /*
- if(nCtlColor==CTLCOLOR_DLG||nCtlColor==CTLCOLOR_STATIC||nCtlColor==CTLCOLOR_BTN){
- 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;
- }