📄 eightpuzzlesdlg.cpp
字号:
m_bdlg.CenterWindow();
m_bdlg.BeginWaitCursor();
m_bdlg.UpdateWindow();
m_bdlg.ShowReuslt(&m_eightpuzzles);
//CSHWRESULT *p;
//p->m_process=m_num;
UpdateData(false);
m_bdlg.DestroyWindow();
//}
//char m_bpro[10];
//itoa(m_bnum,m_bpro,10);
//MessageBox(m_bpro);
//m_bdlg.m_process=m_bpro;
//m_bdlg.Create(IDD_SHOWRESULT);
//m_bdlg.ShowWindow(SW_SHOW);
//m_bdlg.CenterWindow();
//m_bdlg.m_bprocess=m_bnum;
//m_bdlg.BeginWaitCursor();
//m_bdlg.UpdateWindow();
//Sleep(10000);
//void *q;
//q=m_eightpuzzles.ResultList.GetHead();
//NightNumstate *p;
//p=(NightNumstate *)q;
//UpdateData(true);
//UpdateWindow();
//m_bdlg.m_bcur1=p->state[0][0];
//m_bdlg.m_bcur2=p->state[0][1];
//m_bdlg.m_bcur3=p->state[0][2];
//m_bdlg.m_bcur4=p->state[1][0];
//m_bdlg.m_bcur5=p->state[1][1];
//m_bdlg.m_bcur6=p->state[1][2];
// m_bdlg.m_bcur7=p->state[2][0];
//m_bdlg.m_bcur8=p->state[2][1];
//m_bdlg.m_bcur8=p->state[2][2];
// UpdateData(false);
//UpdateWindow();
//m_bdlg.DestroyWindow();
}
void CEightPuzzlesDlg::OnEightexit()
{
// TODO: Add your control notification handler code here
OnOK();
}
//DEL int CEightPuzzlesDlg::state(int state[][3])
//DEL {
//DEL
//DEL CSHOWRESULT m_bshowresult;
//DEL m_bshowresult.m_bcur1=state[0][0];
//DEL m_bshowresult.m_bcur2=state[0][1];
//DEL m_bshowresult.m_bcur3=state[0][2];
//DEL m_bshowresult.m_bcur4=state[1][0];
//DEL m_bshowresult.m_bcur5=state[1][1];
//DEL m_bshowresult.m_bcur6=state[1][2];
//DEL m_bshowresult.m_bcur7=state[2][0];
//DEL m_bshowresult.m_bcur8=state[2][1];
//DEL m_bshowresult.m_bcur9=state[2][2];
//DEL return 0;
//DEL }
void CEightPuzzlesDlg::OnChangeInput1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[0][0]=m_sbinistate1;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput2()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[0][1]=m_sbinistate2;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput3()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[0][2]=m_sbinistate3;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput4()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[1][0]=m_sbinistate4;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput5()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[1][1]=m_sbinistate5;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput6()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[1][2]=m_sbinistate6;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput7()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[2][0]=m_sbinistate7;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput8()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[2][1]=m_sbinistate8;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeInput9()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.IniState.state[2][2]=m_sbinistate9;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[0][0]=m_sbobjstate1;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput2()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[0][1]=m_sbobjstate2;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput3()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[0][2]=m_sbobjstate3;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput4()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[1][0]=m_sbobjstate4;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput5()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[1][1]=m_sbobjstate5;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput6()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[1][2]=m_sbobjstate6;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput7()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[2][0]=m_sbobjstate7;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput8()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[2][1]=m_sbobjstate8;
UpdateData(false);
}
void CEightPuzzlesDlg::OnChangeOutput9()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(true);
m_eightpuzzles.ObjState.state[2][2]=m_sbobjstate9;
UpdateData(false);
}
HBRUSH CEightPuzzlesDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// if(nCtlColor==CTLcolor_EDIT)
pDC->SetTextColor(RGB(255,255,0));
pDC->SetBkColor(RGB(0,20,200));
return (HBRUSH)m_brush.GetSafeHandle();
// TODO: Return a different brush if the default is not desired
return hbr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -