#pragma once #include "stdafx.h" #include "ObjectAdapter.h" #include "SEditOrgUser.h" #include "MessengerPro.h" class CMBAMWnd; class CMBAddToFirendWnd: public SHostWnd, public IObjectAdapterCallback { public: CMBAddToFirendWnd(void); ~CMBAddToFirendWnd(void); private: BOOL m_bLayoutInited; // ³õʼ»¯±êʶ CMBSelOrgList m_lstSelUser; BOOL m_bCloseDlg; public: // ·þÎñ CMBServerMgr *m_pServerMgr; CMBUserLogin *m_pUserLogin; CMBAMWnd *m_pMBAMWnd; CMessengerPro *m_pAMMessengerPro; public: // SComboView *m_pCbxGroupView; CObjectAdapter *m_pGroupAdapter; SEditOrgUser *m_pEditUser; public: void SetServerMgrPtr( CMBServerMgr *pMBServerMgr ); void SetAMWndPtr( CMBAMWnd *pMBAMWnd ); void SetSelUserList(CMBSelOrgList &lstSelOrg ); void ResizeUserEditCtrl( ); public: int OnCreate(LPCREATESTRUCT lpCreateStruct); BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam); void OnOK(); // È·¶¨ void OnClose(); //¹Ø±Õ void OnAddUser(); void OnAddGroup(); bool OnOrgUserEditEditorChange(SOUI::EventArgs *pEvt); bool OnOrgUserEditKeyDownEvent(SOUI::EventArgs *pEvt); protected: virtual void OnFinalMessage(HWND hWnd) { __super::OnFinalMessage(hWnd); delete this; } protected: //souiÏûÏ¢ EVENT_MAP_BEGIN() EVENT_NAME_COMMAND(L"btn_ok", OnOK) EVENT_NAME_COMMAND(L"btn_close", OnClose) EVENT_NAME_COMMAND(L"btn_adduser", OnAddUser) EVENT_NAME_COMMAND(L"btn_addgroup", OnAddGroup) EVENT_MAP_END() //HostWndÕæÊµ´°¿ÚÏûÏ¢´¦Àí BEGIN_MSG_MAP_EX(CMBAddToFirendWnd) MSG_WM_CREATE(OnCreate) MSG_WM_INITDIALOG(OnInitDialog) MSG_WM_CLOSE(OnClose) CHAIN_MSG_MAP(SHostWnd)//×¢Ò⽫ûÓд¦ÀíµÄÏûÏ¢½»¸ø»ùÀà´¦Àí REFLECT_NOTIFICATIONS_EX() END_MSG_MAP() public: virtual void OnClickCBItem(CString strCtrlName,int nIndex,CString strText); };