华辉中间件项目(代码服务器上没有,用杨成电脑的源代码上传的)

AgentPage.cpp 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // AgentPage.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "AgentPage.h"
  5. #include "afxdialogex.h"
  6. #include "../MsgCenter.h"
  7. // CAgentPage 对话框
  8. IMPLEMENT_DYNAMIC(CAgentPage, CDialog)
  9. CAgentPage::CAgentPage(CWnd* pParent /*=NULL*/)
  10. : CDialog(CAgentPage::IDD, pParent)
  11. {
  12. }
  13. CAgentPage::~CAgentPage()
  14. {
  15. }
  16. void CAgentPage::DoDataExchange(CDataExchange* pDX)
  17. {
  18. CDialog::DoDataExchange(pDX);
  19. DDX_Control(pDX, IDC_LIST_AGENT, m_AgentList);
  20. }
  21. BEGIN_MESSAGE_MAP(CAgentPage, CDialog)
  22. END_MESSAGE_MAP()
  23. // CAgentPage 消息处理程序
  24. /*****************************************************************
  25. **【函数名称】 onMessage
  26. **【函数功能】 系统消息处理
  27. **【参数】
  28. **【返回值】
  29. *****************************************************************/
  30. void CAgentPage::onMessage( UINT MsgType, const PARAM lpContent )
  31. {
  32. if(MsgType == ACD_MSG_AGENT_STATE_UPDAET)
  33. {
  34. m_AgentList.onAgentStateUpdated((UINT)lpContent);
  35. }
  36. else if(MsgType == ACD_MSG_AGENT_LOGOUT)
  37. {
  38. m_AgentList.onAgentStateUpdated((UINT)lpContent);
  39. }
  40. }
  41. BOOL CAgentPage::OnInitDialog()
  42. {
  43. __super::OnInitDialog();
  44. // TODO: 在此添加额外的初始化
  45. m_AgentList.format();
  46. CMsgCenter::GetInstance().regist(ACD_MSG_AGENT_STATE_UPDAET, this);
  47. CMsgCenter::GetInstance().regist(ACD_MSG_AGENT_LOGOUT, this);
  48. return TRUE; // return TRUE unless you set the focus to a control
  49. // 异常: OCX 属性页应返回 FALSE
  50. }