| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #pragma once
- #include "../pch/pch.h"
- #include "../control/CWaimaiOrderItemUI.h"
- #include "../order/CWaimaiOrder.h"
- #include "../tool/CPosPrinter.h"
- class CMessagePush;
- class CMainWnd : public CWindowWnd, public INotifyUI
- {
- public:
- CMainWnd() { };
- LPCTSTR GetWindowClassName() const
- {
- return _T("UIMainFrame");
- };
- UINT GetClassStyle() const
- {
- return CS_DBLCLKS;
- };
- void OnFinalMessage(HWND /*hWnd*/)
- {
- delete this;
- };
- void Init();
- void OnPrepare()
- {
- }
- void Notify(TNotifyUI& msg);
- void HandleClickMsg(TNotifyUI& msg);
- void HandleSelectChangeMsg(TNotifyUI& msg);
- void HandleItemSelectMsg(TNotifyUI& msg);
- void InitSettingStatus();
- LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
- LRESULT OnOrderlistRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- LRESULT OnLoginOut(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- //添加托盘图标(初始化)
- void AddTrayIcon();
- //处理托盘图标上的事件
- LRESULT OnTrayIcon(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- void LoginOut(int mode);
- public:
- CPaintManagerUI m_pm;
- private:
- CButtonUI* m_pCloseBtn;
- CButtonUI* m_pMaxBtn;
- CButtonUI* m_pRestoreBtn;
- CButtonUI* m_pMinBtn;
- //定义托盘图标对象
- NOTIFYICONDATA m_trayIcon;
- CMessagePush* m_push = NULL;
- };
|