⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindialog.cpp

📁 采用MFC来实现QQ界面设计
💻 CPP
字号:
// MainDialog.cpp : implementation file
//

#include "stdafx.h"
#include "myqq.h"
#include "MainDialog.h"
#include "MyQQDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainDialog dialog


CMainDialog::CMainDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CMainDialog::IDD, pParent)
{
	
	//{{AFX_DATA_INIT(CMainDialog)
	m_qqnum = _T("");
	m_password = _T("");
	//}}AFX_DATA_INIT
}


void CMainDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMainDialog)
	DDX_CBString(pDX, IDC_COMBO1, m_qqnum);
	DDX_Text(pDX, IDC_EDIT1, m_password);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMainDialog, CDialog)
	//{{AFX_MSG_MAP(CMainDialog)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainDialog message handlers

void CMainDialog::OnOK() 
{
	// TODO: Add extra validation here

	CDialog::OnOK();
		UpdateData(true);
	if(m_qqnum=='1' && m_password=='1')
	{
		CMyQQDlg dlg;
		dlg.DoModal();
	}
	else MessageBox("QQ号或密码错误");
}

void CMainDialog::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -