Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
NewDlg.cpp
Package: fivesource.zip [view]
Upload User: kkzhu_0
Upload Date: 2007-01-05
Package Size: 214k
Code Size: 3k
Category:
Chess Poker games
Development Platform:
Visual C++
- // NewDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CNewDlg dialog
- BOOL CNewDlg::m_Xian = TRUE;
- BOOL CNewDlg::m_Wb = TRUE;
- int CNewDlg::m_Check = 1;
- CNewDlg::CNewDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CNewDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CNewDlg)
- //}}AFX_DATA_INIT
- }
- void CNewDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CNewDlg)
- DDX_Control(pDX, IDC_CHECK1, m_Checkbar);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CNewDlg, CDialog)
- //{{AFX_MSG_MAP(CNewDlg)
- ON_BN_CLICKED(IDC_RADIO_BLACK, OnRadioBlack)
- ON_BN_CLICKED(IDC_RADIO_WHITE, OnRadioWhite)
- ON_BN_CLICKED(IDC_RADIO_XIAN, OnRadioXian)
- ON_BN_CLICKED(IDC_RADIO_HUO, OnRadioHuo)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CNewDlg message handlers
- BOOL CNewDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- if( m_Xian == TRUE )
- {
- CheckDlgButton(IDC_RADIO_XIAN,1);
- CheckDlgButton(IDC_RADIO_HUO,0);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_XIAN,0);
- CheckDlgButton(IDC_RADIO_HUO,1);
- }
- if( m_Wb == TRUE )
- {
- CheckDlgButton(IDC_RADIO_WHITE,0);
- CheckDlgButton(IDC_RADIO_BLACK,1);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_WHITE,1);
- CheckDlgButton(IDC_RADIO_BLACK,0);
- }
- // SetDlgItemInt(IDC_EDIT_LEVEL,m_Level );
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CNewDlg::OnOK()
- {
- // TODO: Add extra validation here
- m_Check = m_Checkbar.GetCheck();
- CDialog::OnOK();
- }
- void CNewDlg::OnRadioBlack()
- {
- // TODO: Add your control notification handler code here
- m_Wb = TRUE;
- if( m_Wb == TRUE )
- {
- CheckDlgButton(IDC_RADIO_WHITE,0);
- CheckDlgButton(IDC_RADIO_BLACK,1);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_WHITE,1);
- CheckDlgButton(IDC_RADIO_BLACK,0);
- }
- }
- void CNewDlg::OnRadioWhite()
- {
- // TODO: Add your control notification handler code here
- m_Wb = FALSE;
- if( m_Wb == TRUE )
- {
- CheckDlgButton(IDC_RADIO_WHITE,0);
- CheckDlgButton(IDC_RADIO_BLACK,1);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_WHITE,1);
- CheckDlgButton(IDC_RADIO_BLACK,0);
- }
- }
- void CNewDlg::OnRadioXian()
- {
- // TODO: Add your control notification handler code here
- m_Xian = TRUE;
- if( m_Xian == TRUE )
- {
- CheckDlgButton(IDC_RADIO_XIAN,1);
- CheckDlgButton(IDC_RADIO_HUO,0);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_XIAN,0);
- CheckDlgButton(IDC_RADIO_HUO,1);
- }
- }
- void CNewDlg::OnRadioHuo()
- {
- // TODO: Add your control notification handler code here
- m_Xian = FALSE;
- if( m_Xian == TRUE )
- {
- CheckDlgButton(IDC_RADIO_XIAN,1);
- CheckDlgButton(IDC_RADIO_HUO,0);
- }
- else
- {
- CheckDlgButton(IDC_RADIO_XIAN,0);
- CheckDlgButton(IDC_RADIO_HUO,1);
- }
- }