📄 logindialog.h
字号:
#pragma once
#include "stdafx.h"
#include "afxwin.h"
//服务器记录
typedef struct tag_TSERVER
{
std::string name;
std::string address;
int port;
}_TSERVER,*_LPTSERVER;
//对比名字操作
class fCompareName
{
private:
std::string m_name;
public:
explicit fCompareName(std::string name) : m_name(name) { }
bool operator()(const _TSERVER &s) const
{
return s.name == m_name;
}
};
// CLoginDialog 对话框
class CLoginDialog : public CDialog
{
DECLARE_DYNAMIC(CLoginDialog)
public:
CLoginDialog(CWnd* pParent = NULL); // 标准构造函数
virtual ~CLoginDialog();
// 对话框数据
enum { IDD = IDD_LOGINDIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnServerChange();//选择服务器
afx_msg void OnBnClickedOk(); //登录游戏
virtual BOOL OnInitDialog();
private:
void AddServer(char* s);
public:
CListBox m_ServerList; //服务器列表
CEdit m_ServerName; //服务器名字
CEdit m_ServerAddress; //服务器地址
CEdit m_ServerPort; //服务器端口
CEdit m_Account; //用户账号
CEdit m_Password; //用户密码
std::list<_TSERVER> m_Servers;
std::string ret_ServerName,ret_ServerAddress,ret_Account,ret_Password;
UINT ret_ServerPort;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -