OptionWnd.cpp
上传用户:cydong117
上传日期:2009-11-10
资源大小:638k
文件大小:2k
源码类别:

模拟服务器

开发平台:

Visual C++

  1. /******************************************************************************************************************
  2.                                                                                                                    
  3. 葛碘疙:
  4. 累己磊:
  5. 累己老:
  6. [老磊][荐沥磊] : 荐沥 郴侩
  7.                                                                                                                    
  8. *******************************************************************************************************************/
  9. #include "StdAfx.h"
  10. COptionWnd::COptionWnd()
  11. {
  12. Init();
  13. }
  14. COptionWnd::~COptionWnd()
  15. {
  16. Destroy();
  17. }
  18. VOID COptionWnd::Init()
  19. {
  20. CGameWnd::Init();
  21. m_xOptionBtn.Init();
  22. }
  23. VOID COptionWnd::Destroy()
  24. {
  25. CGameWnd::Destroy();
  26. }
  27. VOID COptionWnd::CreateOptionWnd(INT nID, CWHWilImageData* pxWndImage, INT nFrameImgIdx, INT nStartX, INT nStartY, INT nWidth, INT nHeight, BOOL bCanMove)
  28. {
  29. CreateGameWnd(nID, pxWndImage, nFrameImgIdx, bCanMove, nStartX, nStartY, nWidth, nHeight);
  30. m_xOptionBtn.CreateGameBtn(pxWndImage, 764, 765, nStartX+220, nStartY+11);
  31. }
  32. VOID COptionWnd::ShowOptionWnd()
  33. {
  34. ShowGameWnd();
  35. m_xOptionBtn.ShowGameBtn();
  36. }
  37. BOOL COptionWnd::OnLButtonUp(POINT ptMouse)
  38. {
  39. if ( m_xOptionBtn.OnLButtonUp(ptMouse) ) return TRUE;
  40. return FALSE;
  41. }
  42. BOOL COptionWnd::OnLButtonDown(POINT ptMouse)
  43. {
  44. if ( m_xOptionBtn.OnLButtonDown(ptMouse) ) return TRUE;
  45. return FALSE;
  46. }
  47. VOID COptionWnd::OnMouseMove(POINT ptMouse)
  48. {
  49. m_xOptionBtn.ChangeRect(m_rcWnd.left+220, m_rcWnd.top+11);
  50. m_xOptionBtn.OnMouseMove(ptMouse);
  51. }
  52. VOID COptionWnd::SetStatusBtnInit()
  53. {
  54. m_xOptionBtn.SetBtnState(_BTN_STATE_NORMAL);
  55. }