SetDlg.cpp
上传用户:kkzhu_0
上传日期:2007-01-05
资源大小:214k
文件大小:3k
源码类别:

棋牌游戏

开发平台:

Visual C++

  1. // SetDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #ifdef _DEBUG
  5. #define new DEBUG_NEW
  6. #undef THIS_FILE
  7. static char THIS_FILE[] = __FILE__;
  8. #endif
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CSetDlg dialog
  11. CSetDlg::CSetDlg(CWnd* pParent /*=NULL*/)
  12. : CDialog(CSetDlg::IDD, pParent)
  13. {
  14. //{{AFX_DATA_INIT(CSetDlg)
  15. // NOTE: the ClassWizard will add member initialization here
  16. //}}AFX_DATA_INIT
  17. }
  18. void CSetDlg::DoDataExchange(CDataExchange* pDX)
  19. {
  20. CDialog::DoDataExchange(pDX);
  21. //{{AFX_DATA_MAP(CSetDlg)
  22. // NOTE: the ClassWizard will add DDX and DDV calls here
  23. //}}AFX_DATA_MAP
  24. }
  25. BEGIN_MESSAGE_MAP(CSetDlg, CDialog)
  26. //{{AFX_MSG_MAP(CSetDlg)
  27. ON_BN_CLICKED(IDC_SET_RESET, OnSetReset)
  28. //}}AFX_MSG_MAP
  29. END_MESSAGE_MAP()
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CSetDlg message handlers
  32. BOOL CSetDlg::OnInitDialog() 
  33. {
  34. CDialog::OnInitDialog();
  35. // TODO: Add extra initialization here
  36. SetDlgItemInt( IDC_EDIT_WF0_1,WF0_1 );
  37. SetDlgItemInt( IDC_EDIT_WF0_2,WF0_2 );
  38. SetDlgItemInt( IDC_EDIT_WF0_3,WF0_3 );
  39. SetDlgItemInt( IDC_EDIT_WF0_4,WF0_4 );
  40. SetDlgItemInt( IDC_EDIT_WF1_1,WF0_1 );
  41. SetDlgItemInt( IDC_EDIT_WF1_2,WF1_2 );
  42. SetDlgItemInt( IDC_EDIT_WF1_3,WF1_3 );
  43. SetDlgItemInt( IDC_EDIT_WF1_4,WF1_4 );
  44. SetDlgItemInt( IDC_EDIT_WF2_3,WF2_3 );
  45. SetDlgItemInt( IDC_EDIT_WF2_4,WF2_4 );
  46. SetDlgItemInt( IDC_EDIT_WF5,WF5 );
  47. SetDlgItemInt( IDC_EDIT_BREADTH,Breadth );
  48. SetDlgItemInt( IDC_EDIT_DEEP,Deep );
  49. SetDlgItemInt( IDC_EDIT_THREAD,Thread );
  50. SetDlgItemInt( IDC_EDIT_DELTA,Delta );
  51. return TRUE;  // return TRUE unless you set the focus to a control
  52.               // EXCEPTION: OCX Property Pages should return FALSE
  53. }
  54. void CSetDlg::OnOK() 
  55. {
  56. // TODO: Add extra validation here
  57. WF0_1 = GetDlgItemInt( IDC_EDIT_WF0_1 );
  58. WF0_2 = GetDlgItemInt( IDC_EDIT_WF0_2 );
  59. WF0_3 = GetDlgItemInt( IDC_EDIT_WF0_3 );
  60. WF0_4 = GetDlgItemInt( IDC_EDIT_WF0_4 );
  61. WF1_1 = GetDlgItemInt( IDC_EDIT_WF1_1 );
  62. WF1_2 = GetDlgItemInt( IDC_EDIT_WF1_2 );
  63. WF1_3 = GetDlgItemInt( IDC_EDIT_WF1_3 );
  64. WF1_4 = GetDlgItemInt( IDC_EDIT_WF1_4 );
  65. WF2_3 = GetDlgItemInt( IDC_EDIT_WF2_3 );
  66. WF2_4 = GetDlgItemInt( IDC_EDIT_WF2_4 );
  67. WF5   = GetDlgItemInt( IDC_EDIT_WF5 );
  68. Breadth = GetDlgItemInt( IDC_EDIT_BREADTH );
  69. Deep = GetDlgItemInt( IDC_EDIT_DEEP );
  70. Thread = GetDlgItemInt( IDC_EDIT_THREAD );
  71. Delta = GetDlgItemInt( IDC_EDIT_DELTA );
  72. CDialog::OnOK();
  73. }
  74. void CSetDlg::OnSetReset() 
  75. {
  76. // TODO: Add your control notification handler code here
  77. SetDlgItemInt( IDC_EDIT_WF1_1,1 );
  78. SetDlgItemInt( IDC_EDIT_WF1_2,20 );
  79. SetDlgItemInt( IDC_EDIT_WF1_3,150 );
  80. SetDlgItemInt( IDC_EDIT_WF1_4,600 );
  81. SetDlgItemInt( IDC_EDIT_WF0_1,2 );
  82. SetDlgItemInt( IDC_EDIT_WF0_2,50 );
  83. SetDlgItemInt( IDC_EDIT_WF0_3,500 );
  84. SetDlgItemInt( IDC_EDIT_WF0_4,5000 );
  85. SetDlgItemInt( IDC_EDIT_WF2_3,400 );
  86. SetDlgItemInt( IDC_EDIT_WF2_4,450 );
  87. SetDlgItemInt( IDC_EDIT_WF5,30000 );
  88. SetDlgItemInt( IDC_EDIT_BREADTH,1 );
  89. SetDlgItemInt( IDC_EDIT_DEEP,1 );
  90. SetDlgItemInt( IDC_EDIT_THREAD,0 );
  91. SetDlgItemInt( IDC_EDIT_DELTA,0 );
  92. }