CMainWnd.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #pragma once
  2. #include "../pch/pch.h"
  3. #include "../control/CWaimaiOrderItemUI.h"
  4. #include "../order/CWaimaiOrder.h"
  5. #include "../tool/CPosPrinter.h"
  6. class CMessagePush;
  7. class CMainWnd : public CWindowWnd, public INotifyUI
  8. {
  9. public:
  10. CMainWnd() { };
  11. LPCTSTR GetWindowClassName() const
  12. {
  13. return _T("UIMainFrame");
  14. };
  15. UINT GetClassStyle() const
  16. {
  17. return CS_DBLCLKS;
  18. };
  19. void OnFinalMessage(HWND /*hWnd*/)
  20. {
  21. delete this;
  22. };
  23. void Init();
  24. void OnPrepare()
  25. {
  26. }
  27. void Notify(TNotifyUI& msg);
  28. void HandleClickMsg(TNotifyUI& msg);
  29. void HandleSelectChangeMsg(TNotifyUI& msg);
  30. void HandleItemSelectMsg(TNotifyUI& msg);
  31. void InitSettingStatus();
  32. LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  33. LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  34. LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  35. LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  36. LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  38. LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  39. LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  40. LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  41. LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  42. LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
  43. LRESULT OnOrderlistRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  44. LRESULT OnLoginOut(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  45. //添加托盘图标(初始化)
  46. void AddTrayIcon();
  47. //处理托盘图标上的事件
  48. LRESULT OnTrayIcon(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  49. void LoginOut(int mode);
  50. public:
  51. CPaintManagerUI m_pm;
  52. private:
  53. CButtonUI* m_pCloseBtn;
  54. CButtonUI* m_pMaxBtn;
  55. CButtonUI* m_pRestoreBtn;
  56. CButtonUI* m_pMinBtn;
  57. //定义托盘图标对象
  58. NOTIFYICONDATA m_trayIcon;
  59. CMessagePush* m_push = NULL;
  60. };