CGameFrameWnd.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. void HandleSelectChangeMsg(TNotifyUI& msg);
  29. LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  30. LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  31. {
  32. bHandled = FALSE;
  33. return 0;
  34. }
  35. LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  36. {
  37. ::PostQuitMessage(0L);
  38. bHandled = FALSE;
  39. return 0;
  40. }
  41. LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  42. {
  43. if(::IsIconic(*this))
  44. {
  45. bHandled = FALSE;
  46. }
  47. return (wParam == 0) ? TRUE : FALSE;
  48. }
  49. LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  50. {
  51. return 0;
  52. }
  53. LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  54. {
  55. return 0;
  56. }
  57. LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  58. LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  59. LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  60. LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  61. LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
  62. public:
  63. CPaintManagerUI m_pm;
  64. private:
  65. CButtonUI* m_pCloseBtn;
  66. CButtonUI* m_pMaxBtn;
  67. CButtonUI* m_pRestoreBtn;
  68. CButtonUI* m_pMinBtn;
  69. };