📄 testserver.cpp
字号:
// TestServer.cpp : implementation file
//
#include "stdafx.h"
#include "FALCON_JXC.h"
#include "TestServer.h"
#include "mainfrm.h"
#include "FALCON_JXCView.h"
#include "message.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestServer dialog
CTestServer::CTestServer(CWnd* pParent /*=NULL*/)
: CDialog(CTestServer::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestServer)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CTestServer::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestServer)
DDX_Control(pDX, IDC_IPADDRESS1, m_ctr);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestServer, CDialog)
//{{AFX_MSG_MAP(CTestServer)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestServer message handlers
void CTestServer::OnButton1()
{
// TODO: Add your control notification handler code here
CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
CFALCON_JXCDoc* pDoc= pView->GetDocument();
if(pDoc->ConnectToServer())
{
pDoc->SendMsg("select * from [成绩]",0);
}
else
return;
}
void CTestServer::OnOK()
{
// TODO: Add extra validation here
CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
CFALCON_JXCDoc* pDoc=pView->GetDocument();
pDoc->sendcloseMessage();
AfxMessageBox("finished");
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -