www.pudn.com > AVChat1.rar > CRoleDlg.cpp


// CRoleDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "AVChat.h" 
#include "CRoleDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CRoleDlg dialog 
 
 
CRoleDlg::CRoleDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CRoleDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CRoleDlg) 
		// NOTE: the ClassWizard will add member initialization here 
	//}}AFX_DATA_INIT 
	mRole = SERVER; 
} 
 
 
void CRoleDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CRoleDlg) 
		// NOTE: the ClassWizard will add DDX and DDV calls here 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CRoleDlg, CDialog) 
	//{{AFX_MSG_MAP(CRoleDlg) 
	ON_BN_CLICKED(IDC_RADIO_SERVER, OnRadioServer) 
	ON_BN_CLICKED(IDC_RADIO_CLIENT, OnRadioClient) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CRoleDlg message handlers 
 
BOOL CRoleDlg::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	 
	// TODO: Add extra initialization here 
	CheckRadioButton(IDC_RADIO_SERVER, IDC_RADIO_CLIENT, IDC_RADIO_SERVER); 
	 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
} 
 
void CRoleDlg::OnRadioServer()  
{ 
	mRole = SERVER; 
} 
 
void CRoleDlg::OnRadioClient()  
{ 
	mRole = CLIENT; 
}