📄 csdemoclientdlg.cpp
字号:
// CsDemoClientDlg.cpp : implementation file
//
#include "stdafx.h"
#include "csdemoclient.h"
#include "CsDemoClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCsDemoClientDlg dialog
CCsDemoClientDlg::CCsDemoClientDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCsDemoClientDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CCsDemoClientDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CCsDemoClientDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCsDemoClientDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCsDemoClientDlg, CDialog)
//{{AFX_MSG_MAP(CCsDemoClientDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCsDemoClientDlg message handlers
void CCsDemoClientDlg::Init(IRTXCModuleSitePtr pModule)
{
if( pModule != NULL) //如果pModule不为空
{
m_ptrModule = pModule;
}
}
void CCsDemoClientDlg::OnOK()
{
if(m_ptrModule) //如果成功获取m_ptrModule
{
m_ptrRoot = m_ptrModule->RTXCRoot; //通过如果成功获取m_ptrModule 获取RTXCRoot指针
IRTXCDataPtr& ptrData = m_ptrRoot->CreateRTXCData(); //通过m_ptrRoot创建RTXCData对象
ptrData->SetString(_bstr_t("Sender"), m_ptrRoot->Account); //向prtData添加一个String类型的参数,Key为Sender,内容为herolin
ptrData->SetString(_bstr_t("Content"), "客户端插件发给应用的数据"); // 向prtData添加一个String类型的参数.Key为Contencent
m_ptrModule->SendData(_bstr_t("{16F8F6DB-EB21-4520-8371-421DD76A9148}"), ptrData, // 接收者为应用的GUID,示例应用的GUID为{16F8F6DB-EB21-4520-8371-421DD76A9148}
RTXC_SEND_DATA_FLAG_DEFAULT);
ptrData.Release();
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -