📄 newmaildialog.cpp
字号:
//增加新邮箱对话框
#include "stdafx.h"
#include "resource.h"
#include "NEWMAILDIALOG.h"
#include "xmldata.h"
#include <string>
#include <atlsimpstr.h>
#include ".\newmaildialog.h"
extern CXMLDATA XmlData;
using namespace std;
//
LRESULT CNewMailDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
// center the dialog on the screen
this->CenterWindow ();
return TRUE;
}
LRESULT CNewMailDialog::OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
// TODO: Add validation code
char buf[200];
memset(buf,0,200);
GetDlgItem(IDC_EDIT_LOGINCODE).GetWindowText (buf,200);
if(strlen(buf)!=160)
{
this->MessageBox ("登陆码错误","错误");
return 0;
}
XmlData.VLogInCode .push_back (buf);
memset(buf,0,200);
GetDlgItem(IDC_EDIT_MAILNAME).GetWindowText (buf,200);
XmlData.VName .push_back (buf);
memset(buf,0,200);
GetDlgItem(IDC_EDIT_DOWNLOADCODE).GetWindowText (buf,200);
XmlData.VDownLoadCode .push_back (buf);
EndDialog(wID);
return 0;
}
LRESULT CNewMailDialog::OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
EndDialog(wID);
return 0;
}
LRESULT CNewMailDialog::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
this->EndDialog (0);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -