📄 testdlg.cpp
字号:
// TestDlg.cpp : implementation file
//
#include "stdafx.h"
#include "SGIPGateWay.h"
#include "TestDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog
CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTestDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestDlg)
mstrCallee = _T("");
mstrCaller = _T("");
mstrMsg = _T("");
//}}AFX_DATA_INIT
}
void CTestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestDlg)
DDX_Text(pDX, IDC_CALLEEEDIT, mstrCallee);
DDX_Text(pDX, IDC_CALLEREDIT, mstrCaller);
DDX_Text(pDX, IDC_CALLMSGEDIT, mstrMsg);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
//{{AFX_MSG_MAP(CTestDlg)
ON_BN_CLICKED(IDC_SENDBTN, OnSendbtn)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestDlg message handlers
#include "ChildView.h"
#include "SystemProfile.h"
#include "spserver.h"
#include "wjdpacket.h"
void CTestDlg::OnSendbtn()
{
// TODO: Add your control notification handler code here
UpdateData();
BYTE lpBuffer[1024];
CWJDPacket wjdPacket;
if( gSPServer.HasWJDClient() == FALSE )
{
MessageBox("没有王均达的客户端连接!");
return;
}
int nLen = wjdPacket.GetPacket(lpBuffer, 1, mstrCaller, mstrCallee, mstrMsg);
gSPServer.SendToWJD(lpBuffer, nLen);
}
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
mstrCaller="13008143540";
mstrCallee="6637";
mstrMsg="DA";
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -