📄 connect.cpp
字号:
// Connect.cpp : implementation file
//
#include "stdafx.h"
#include "Client.h"
#include "Connect.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConnect dialog
CConnect::CConnect(CWnd* pParent /*=NULL*/)
: CDialog(CConnect::IDD, pParent)
{
//{{AFX_DATA_INIT(CConnect)
m_ipaddr = _T("127.0.0.1");
m_username = _T("工大学子");
//}}AFX_DATA_INIT
}
void CConnect::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConnect)
DDX_Control(pDX, IDC_QUIT, m_quit);
DDX_Control(pDX, IDC_CONNECT, m_connect);
DDX_Text(pDX, IDC_IPADDR, m_ipaddr);
DDX_Text(pDX, IDC_USERNAME, m_username);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConnect, CDialog)
//{{AFX_MSG_MAP(CConnect)
ON_BN_CLICKED(IDC_CONNECT, OnConnect)
ON_BN_CLICKED(IDC_QUIT, OnQuit)
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConnect message handlers
void CConnect::OnConnect()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
OnOK();
//MessageBox("false");
quit=false;
}
void CConnect::OnQuit()
{
//CDialog::OnDestroy();
OnOK();
//quit=true;
// TODO: Add your control notification handler code here
}
void CConnect::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
}
int CConnect::DoModal()
{
// TODO: Add your specialized code here and/or call the base class
quit=true;
return CDialog::DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -