| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #pragma once
- #include "../pch/pch.h"
- #include "../control/CWaimaiOrderItemUI.h"
- #include "../order/CWaimaiOrder.h"
- #include "../tool/CPosPrinter.h"
- 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)
- {
- bHandled = FALSE;
- return 0;
- }
- LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- ::PostQuitMessage(0L);
- bHandled = FALSE;
- return 0;
- }
- LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- if(::IsIconic(*this))
- {
- bHandled = FALSE;
- }
- return (wParam == 0) ? TRUE : FALSE;
- }
- LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- return 0;
- }
- LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- return 0;
- }
- 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);
- public:
- CPaintManagerUI m_pm;
- private:
- CButtonUI* m_pCloseBtn;
- CButtonUI* m_pMaxBtn;
- CButtonUI* m_pRestoreBtn;
- CButtonUI* m_pMinBtn;
- };
|