CDiandanNatureWnd.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #pragma once
  2. #include "../pch/pch.h"
  3. #include "CMainWnd.h"
  4. #include "../control/CDiandanFoodItemUI.h"
  5. #include "../control/CDiandanNatureItemUI.h"
  6. class CDiandanNatureWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
  7. {
  8. public:
  9. CDiandanNatureWnd(int mode)
  10. {
  11. m_mode = mode;
  12. }
  13. LPCTSTR GetWindowClassName() const
  14. {
  15. return _T("UIDiandanNatureFrame");
  16. };
  17. UINT GetClassStyle() const
  18. {
  19. return UI_CLASSSTYLE_DIALOG;
  20. };
  21. void OnFinalMessage(HWND /*hWnd*/)
  22. {
  23. //WindowImplBase::OnFinalMessage(hWnd);
  24. m_pm.RemovePreMessageFilter(this);
  25. //delete this;
  26. };
  27. void Init();
  28. void SetFooditemUI(CDiandanFoodItemUI* item);
  29. std::vector<FoodNatureSelectValue> GetNatureSelectedArray();
  30. void Notify(TNotifyUI& msg);
  31. LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  32. LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  33. LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  34. LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  35. LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  36. LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
  38. LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
  39. public:
  40. CPaintManagerUI m_pm;
  41. int m_mode; //为1表示新建,为2表示修改
  42. //这个表示点击哪个商品(或者套餐)弹出的属性框
  43. CDiandanFoodItemUI* m_fooditemUI;
  44. //当前弹框下的属性控件数组
  45. std::vector<CDiandanNatureItemUI*> m_natureitems;
  46. //这个就是所选中的所有属性的信息,对话框关闭后就返回这个,利用这个数据就知道选中的是哪些属性
  47. std::vector<FoodNatureSelectValue> m_NatureSelectedArray;
  48. };