CMainWnd.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. //添加托盘图标(初始化)
  45. void AddTrayIcon();
  46. //处理托盘图标上的事件
  47. LRESULT OnTrayIcon(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  48. public:
  49. CPaintManagerUI m_pm;
  50. private:
  51. CButtonUI* m_pCloseBtn;
  52. CButtonUI* m_pMaxBtn;
  53. CButtonUI* m_pRestoreBtn;
  54. CButtonUI* m_pMinBtn;
  55. //定义托盘图标对象
  56. NOTIFYICONDATA m_trayIcon;
  57. CMessagePush* m_push = NULL;
  58. };