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

模拟服务器

开发平台:

Visual C++

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