tablebottomdlg.cpp
上传用户:swkcbjrc
上传日期:2016-04-02
资源大小:45277k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. // tablebottomdlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "..gamehigh.h"
  5. #include "..includetablebottomdlg.h"
  6. #include "MainFrm.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CTableBottomDlg dialog
  14. CTableBottomDlg::CTableBottomDlg(CWnd* pParent /*=NULL*/)
  15. : CDialog(CTableBottomDlg::IDD, pParent)
  16. {
  17. //{{AFX_DATA_INIT(CTableBottomDlg)
  18. // NOTE: the ClassWizard will add member initialization here
  19. //}}AFX_DATA_INIT
  20. hBkBrush =::CreateSolidBrush(RGB(150, 175, 230));
  21. }
  22. CTableBottomDlg::~CTableBottomDlg()
  23. {
  24. SAFE_CHECKPOINTER(hBkBrush)
  25. {
  26. ::DeleteObject(hBkBrush);
  27. hBkBrush =NULL;
  28. }
  29. }
  30. void CTableBottomDlg::DoDataExchange(CDataExchange* pDX)
  31. {
  32. CDialog::DoDataExchange(pDX);
  33. //{{AFX_DATA_MAP(CTableBottomDlg)
  34. DDX_Control(pDX, IDC_QUITROOM, m_QuitRoom);
  35. DDX_Control(pDX, IDC_GAMEUI, m_GameUi);
  36. DDX_Control(pDX, IDC_FUNCTION, m_Function);
  37. DDX_Control(pDX, IDC_AUTOJOIN, m_AutoJoin);
  38. //}}AFX_DATA_MAP
  39. }
  40. BEGIN_MESSAGE_MAP(CTableBottomDlg, CDialog)
  41. //{{AFX_MSG_MAP(CTableBottomDlg)
  42. ON_WM_CTLCOLOR()
  43. ON_WM_CREATE()
  44. ON_BN_CLICKED(IDC_AUTOJOIN, OnAutojoin)
  45. ON_BN_CLICKED(IDC_QUITROOM, OnQuitroom)
  46. //}}AFX_MSG_MAP
  47. END_MESSAGE_MAP()
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CTableBottomDlg message handlers
  50. BOOL CTableBottomDlg::Create(CWnd* pParentWnd) 
  51. {
  52. return CDialog::Create(IDD, pParentWnd);
  53. }
  54. HBRUSH CTableBottomDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
  55. {
  56. return hBkBrush;
  57. }
  58. int CTableBottomDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  59. {
  60. if (CDialog::OnCreate(lpCreateStruct) == -1)
  61. return -1;
  62. return 0;
  63. }
  64. BOOL CTableBottomDlg::OnInitDialog() 
  65. {
  66. CDialog::OnInitDialog();
  67. CWnd* pWnd =&m_AutoJoin;
  68. SAFE_CHECKWND(pWnd)
  69. {
  70. m_AutoJoin.SetBkColor(RGB(150, 175, 230));
  71. }
  72. pWnd =&m_Function;
  73. SAFE_CHECKWND(pWnd)
  74. {
  75. m_Function.SetBkColor(RGB(150, 175, 230));
  76. }
  77. pWnd =&m_GameUi;
  78. SAFE_CHECKWND(pWnd)
  79. {
  80. m_GameUi.SetBkColor(RGB(150, 175, 230));
  81. }
  82. pWnd =&m_QuitRoom;
  83. SAFE_CHECKWND(pWnd)
  84. {
  85. m_QuitRoom.SetBkColor(RGB(150, 175, 230));
  86. }
  87. return TRUE;  // return TRUE unless you set the focus to a control
  88.               // EXCEPTION: OCX Property Pages should return FALSE
  89. }
  90. void CTableBottomDlg::OnAutojoin() 
  91. {
  92. }
  93. void CTableBottomDlg::OnQuitroom() 
  94. {
  95. CMainFrame* pMainFrame =(CMainFrame*)::AfxGetMainWnd();
  96. SAFE_CHECKWND(pMainFrame)
  97. {
  98. pMainFrame->ShowTableFrame(FALSE, 0);
  99. }
  100. }