CGameFrameWnd.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #pragma once
  2. #include "../pch/pch.h"
  3. #include "CWaimaiOrderItemUI.h"
  4. #include "../order/CWaimaiOrder.h"
  5. #include "../tool/CPosPrinter.h"
  6. class CGameFrameWnd : public CWindowWnd, public INotifyUI
  7. {
  8. public:
  9. CGameFrameWnd() { };
  10. LPCTSTR GetWindowClassName() const
  11. {
  12. return _T("UIMainFrame");
  13. };
  14. UINT GetClassStyle() const
  15. {
  16. return CS_DBLCLKS;
  17. };
  18. void OnFinalMessage(HWND /*hWnd*/)
  19. {
  20. delete this;
  21. };
  22. void Init();
  23. void OnPrepare()
  24. {
  25. }
  26. void Notify(TNotifyUI& msg);
  27. void HandleClickMsg(TNotifyUI& msg);
  28. LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  29. LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  30. {
  31. bHandled = FALSE;
  32. return 0;
  33. }
  34. LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  35. {
  36. ::PostQuitMessage(0L);
  37. bHandled = FALSE;
  38. return 0;
  39. }
  40. LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  41. {
  42. if(::IsIconic(*this))
  43. {
  44. bHandled = FALSE;
  45. }
  46. return (wParam == 0) ? TRUE : FALSE;
  47. }
  48. LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  49. {
  50. return 0;
  51. }
  52. LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  53. {
  54. return 0;
  55. }
  56. LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  57. LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  58. LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  59. LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  60. LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
  61. public:
  62. CPaintManagerUI m_pm;
  63. private:
  64. CButtonUI* m_pCloseBtn;
  65. CButtonUI* m_pMaxBtn;
  66. CButtonUI* m_pRestoreBtn;
  67. CButtonUI* m_pMinBtn;
  68. };