?? chesstablerangesetdlg.cpp
字號:
// ChessTableRangeSetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "ChessDisplay.h"
#include "ChessTableRangeSetDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChessTableRangeSetDlg dialog
CChessTableRangeSetDlg::CChessTableRangeSetDlg(CWnd* pParent /*=NULL*/)
: CDialog(CChessTableRangeSetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CChessTableRangeSetDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CChessTableRangeSetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChessTableRangeSetDlg)
DDX_Control(pDX, IDC_COMBO_LOC_WIDTH, m_comboBoxWidth);
DDX_Control(pDX, IDC_COMBO_LOC_HEIGHT, m_comboBoxHeight);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CChessTableRangeSetDlg, CDialog)
//{{AFX_MSG_MAP(CChessTableRangeSetDlg)
ON_BN_CLICKED(IDC_HEIGHT_4, OnHeight4)
ON_BN_CLICKED(IDC_HEIGHT_5, OnHeight5)
ON_BN_CLICKED(IDC_HEIGHT_6, OnHeight6)
ON_BN_CLICKED(IDC_HEIGHT_7, OnHeight7)
ON_BN_CLICKED(IDC_HEIGHT_8, OnHeight8)
ON_BN_CLICKED(IDC_WIDTH_4, OnWidth4)
ON_BN_CLICKED(IDC_WIDTH_5, OnWidth5)
ON_BN_CLICKED(IDC_WIDTH_6, OnWidth6)
ON_BN_CLICKED(IDC_WIDTH_7, OnWidth7)
ON_BN_CLICKED(IDC_WIDTH_8, OnWidth8)
ON_CBN_KILLFOCUS(IDC_COMBO_LOC_HEIGHT, OnKillfocusComboLocHeight)
ON_CBN_KILLFOCUS(IDC_COMBO_LOC_WIDTH, OnKillfocusComboLocWidth)
ON_CBN_EDITUPDATE(IDC_COMBO_LOC_HEIGHT, OnEditupdateComboLocHeight)
ON_CBN_EDITUPDATE(IDC_COMBO_LOC_WIDTH, OnEditupdateComboLocWidth)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChessTableRangeSetDlg message handlers
void CChessTableRangeSetDlg::OnHeight4()
{
// TODO: Add your control notification handler code here
m_chessTableHeight = 4;
}
void CChessTableRangeSetDlg::OnHeight5()
{
// TODO: Add your control notification handler code here
m_chessTableHeight = 5;
}
void CChessTableRangeSetDlg::OnHeight6()
{
// TODO: Add your control notification handler code here
m_chessTableHeight = 6;
}
void CChessTableRangeSetDlg::OnHeight7()
{
// TODO: Add your control notification handler code here
m_chessTableHeight = 7;
}
void CChessTableRangeSetDlg::OnHeight8()
{
// TODO: Add your control notification handler code here
m_chessTableHeight = 8;
}
void CChessTableRangeSetDlg::OnWidth4()
{
// TODO: Add your control notification handler code here
m_chessTableWidth = 4;
}
void CChessTableRangeSetDlg::OnWidth5()
{
// TODO: Add your control notification handler code here
m_chessTableWidth = 5;
}
void CChessTableRangeSetDlg::OnWidth6()
{
// TODO: Add your control notification handler code here
m_chessTableWidth = 6;
}
void CChessTableRangeSetDlg::OnWidth7()
{
// TODO: Add your control notification handler code here
m_chessTableWidth =7;
}
void CChessTableRangeSetDlg::OnWidth8()
{
// TODO: Add your control notification handler code here
m_chessTableWidth = 8;
}
int CChessTableRangeSetDlg::GetChessTableWidth()
{
return m_chessTableWidth;
}
int CChessTableRangeSetDlg::GetChessTableHeight()
{
return m_chessTableHeight;
}
BOOL CChessTableRangeSetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
for( int i = 1; i < 11 ; i++ )
{
char str[10];
itoa( i ,str ,10 );
m_comboBoxWidth.AddString((CString)str );
m_comboBoxHeight.AddString((CString)str );
}
m_comboBoxWidth.SetCurSel( 0 );
m_comboBoxHeight.SetCurSel( 0 );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CChessTableRangeSetDlg::OnKillfocusComboLocHeight()
{
// TODO: Add your control notification handler code here
}
void CChessTableRangeSetDlg::OnKillfocusComboLocWidth()
{
// TODO: Add your control notification handler code here
}
void CChessTableRangeSetDlg::OnEditupdateComboLocHeight()
{
// TODO: Add your control notification handler code here
}
void CChessTableRangeSetDlg::OnEditupdateComboLocWidth()
{
// TODO: Add your control notification handler code here
}
int CChessTableRangeSetDlg::GetCurStartLocHeight()
{
return m_curLocOnWidth;
}
int CChessTableRangeSetDlg::GetCurStartLocWidth()
{
return m_curLocOnHeight;
}
void CChessTableRangeSetDlg::OnOK()
{
// TODO: Add extra validation here
m_curLocOnWidth = m_comboBoxWidth.GetCurSel()+1;
m_curLocOnHeight = m_comboBoxHeight.GetCurSel()+1;
CDialog::OnOK();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -