| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #pragma once
- #include "../pch/pch.h"
- #include "CMainWnd.h"
- #include "../control/CDiandanFoodItemUI.h"
- #include "../control/CDiandanNatureItemUI.h"
- class CDiandanNatureWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
- {
- public:
- CDiandanNatureWnd(int mode)
- {
- m_mode = mode;
- }
- LPCTSTR GetWindowClassName() const
- {
- return _T("UIDiandanNatureFrame");
- };
- UINT GetClassStyle() const
- {
- return UI_CLASSSTYLE_DIALOG;
- };
- void OnFinalMessage(HWND /*hWnd*/)
- {
- //WindowImplBase::OnFinalMessage(hWnd);
- m_pm.RemovePreMessageFilter(this);
- //delete this;
- };
- void Init();
- void SetFooditemUI(CDiandanFoodItemUI* item);
- std::vector<FoodNatureSelectValue> GetNatureSelectedArray();
- void Notify(TNotifyUI& msg);
- LRESULT OnCreate(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 HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
- LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
- public:
- CPaintManagerUI m_pm;
- int m_mode; //为1表示新建,为2表示修改
- //这个表示点击哪个商品(或者套餐)弹出的属性框
- CDiandanFoodItemUI* m_fooditemUI;
- //当前弹框下的属性控件数组
- std::vector<CDiandanNatureItemUI*> m_natureitems;
- //这个就是所选中的所有属性的信息,对话框关闭后就返回这个,利用这个数据就知道选中的是哪些属性
- std::vector<FoodNatureSelectValue> m_NatureSelectedArray;
- };
|