📄 login1.cpp
字号:
// Login1.cpp : implementation file
//
#include "stdafx.h"
#include "Img_ListView1.h"
#include "Login1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Login dialog
extern WORD CurrentUserID;
Login::Login(CWnd* pParent /*=NULL*/)
: CDialog(Login::IDD, pParent)
{
//{{AFX_DATA_INIT(Login)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void Login::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Login)
DDX_Control(pDX, IDC_COMBO1, m_Combo1);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Login, CDialog)
//{{AFX_MSG_MAP(Login)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Login message handlers
BOOL Login::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_Combo1.AddString ("10001");
m_Combo1.AddString ("10002");
m_Combo1.AddString ("10003");
m_Combo1.AddString ("10004");
m_Combo1.AddString ("10005");
m_Combo1.AddString ("10006");
m_Combo1.AddString ("10007");
m_Combo1.SetCurSel (0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void Login::OnOK()
{
// TODO: Add extra validation here
CString tempstring;
m_Combo1.GetWindowText(tempstring);
// m_Combo1.GetLBText(Ldlg.m_Combo1.GetCurSel(),tempstring);
CurrentUserID=(WORD)atoi((char *)(LPCTSTR)tempstring);
//从这里出去后,首先要检测是否上线。如要未上线,则不向服务器登录
//如果上线,则在一定时间内向服务器请求登录
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -