#pragma once #include "stdafx.h" #define EDITITEM_CAMPARE_FIRSTVALUE 0x0001 #define EDITITEM_CAMPARE_SECONDVALUE 0x0002 #define EDITITEM_CAMPARE_ALLVALUE 0x0003 class CMBInputWnd: public SHostDialog { public: CMBInputWnd(void); ~CMBInputWnd(void); private: BOOL m_bLayoutInited; // ³õʼ»¯±êʶ CString m_strInputTip; CString m_strTitle; CString m_strName; CString m_strValue; bool m_bValueMultiRow; bool m_bValueNumberOnly; CStringArray m_arExistText; public: int OnCreate(LPCREATESTRUCT lpCreateStruct); BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); void OnOK(); // È·¶¨ bool OnContentEventDown(EventArgs *pEvtBase); protected: //souiÏûÏ¢ EVENT_MAP_BEGIN() EVENT_NAME_COMMAND(L"btn_ok", OnOK) EVENT_MAP_END() //HostWndÕæÊµ´°¿ÚÏûÏ¢´¦Àí BEGIN_MSG_MAP_EX(CMBInputWnd) MSG_WM_CREATE(OnCreate) MSG_WM_INITDIALOG(OnInitDialog) // ¼ì²â¿ì½Ý¼ü MSG_WM_KEYDOWN(OnKeyDown) CHAIN_MSG_MAP(SHostDialog) REFLECT_NOTIFICATIONS_EX() END_MSG_MAP() private: void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); public: void SetExistValueData( CStringArray &arExistText); void SetWndData(CString strTitle,CString strInputTip, CString strName); void SetValueData( CString strValue); CString GetValueData(); void SetValueAttr( bool bValueMultiRow,bool bValueNumberOnly); int FindEditItem(CString strValue); };