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

模拟服务器

开发平台:

Visual C++

  1. /******************************************************************************************************************
  2.                                                                                                                    
  3. 葛碘疙:
  4. 累己磊:
  5. 累己老:
  6. [老磊][荐沥磊] : 荐沥 郴侩
  7.                                                                                                                    
  8. *******************************************************************************************************************/
  9. #include "StdAfx.h"
  10. CHorseWnd::CHorseWnd()
  11. {
  12. Init();
  13. }
  14. CHorseWnd::~CHorseWnd()
  15. {
  16. Destroy();
  17. }
  18. VOID CHorseWnd::Init()
  19. {
  20. CGameWnd::Init();
  21. m_xHorseBtn.Init();
  22. }
  23. VOID CHorseWnd::Destroy()
  24. {
  25. CGameWnd::Destroy();
  26. }
  27. VOID CHorseWnd::CreateHorseWnd(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_xHorseBtn.CreateGameBtn(pxWndImage, 630, 631, nStartX+567, nStartY+413);
  31. }
  32. VOID CHorseWnd::ShowHorseWnd()
  33. {
  34. ShowGameWnd();
  35. m_xHorseBtn.ShowGameBtn();
  36. }
  37. BOOL CHorseWnd::OnLButtonUp(POINT ptMouse)
  38. {
  39. if ( m_xHorseBtn.OnLButtonUp(ptMouse) ) return TRUE;
  40. return FALSE;
  41. }
  42. BOOL CHorseWnd::OnLButtonDown(POINT ptMouse)
  43. {
  44. if ( m_xHorseBtn.OnLButtonDown(ptMouse) ) return TRUE;
  45. return FALSE;
  46. }
  47. VOID CHorseWnd::OnMouseMove(POINT ptMouse)
  48. {
  49. m_xHorseBtn.ChangeRect(m_rcWnd.left+567, m_rcWnd.top+413);
  50. m_xHorseBtn.OnMouseMove(ptMouse);
  51. }
  52. VOID CHorseWnd::SetStatusBtnInit()
  53. {
  54. m_xHorseBtn.SetBtnState(_BTN_STATE_NORMAL);
  55. }