📄 lookup.cpp
字号:
// Lookup.cpp : implementation file
//
#include "stdafx.h"
#include "qq.h"
#include "Lookup.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLookup dialog
CLookup::CLookup(CWnd* pParent /*=NULL*/)
: CDialog(CLookup::IDD, pParent)
{
//{{AFX_DATA_INIT(CLookup)
m_stuidradio = -1;
m_sturadio = -1;
m_tchradio = -1;
m_keyradio = -1;
m_thesisradio = -1;
//}}AFX_DATA_INIT
strText = "";
}
void CLookup::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLookup)
DDX_Control(pDX, IDC_THESIS_EDIT, m_thesis);
DDX_Control(pDX, IDC_TCH_EDIT, m_tch);
DDX_Control(pDX, IDC_STUID_EDIT, m_stuid);
DDX_Control(pDX, IDC_STU_EDIT, m_stu);
DDX_Control(pDX, IDC_KEY_EDIT, m_key);
DDX_Radio(pDX, IDC_RADIO2, m_stuidradio);
DDX_Radio(pDX, IDC_RADIO4, m_sturadio);
DDX_Radio(pDX, IDC_RADIO6, m_tchradio);
DDX_Radio(pDX, IDC_RADIO8, m_keyradio);
DDX_Radio(pDX, IDC_RADIO10, m_thesisradio);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLookup, CDialog)
//{{AFX_MSG_MAP(CLookup)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
ON_BN_CLICKED(IDC_RADIO9, OnRadio9)
ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLookup message handlers
void CLookup::OnOK()
{
// TODO: Add extra validation here
CString strTmp;
UpdateData(false);
m_stuid.GetWindowText(strTmp);
switch( m_stuidradio )
{
case 0:
strText += strTmp +"$@";
break;
case 1:
strText += strTmp +"$&";
break;
default:
strText += "$";
break;
}
m_stu.GetWindowText(strTmp);
switch( m_sturadio )
{
case 0:
strText += strTmp +"$@";
break;
case 1:
strText += strTmp +"$&";
break;
default:
strText += "$";
break;
}
m_tch.GetWindowText(strTmp);
switch( m_tchradio )
{
case 0:
strText += strTmp +"$@";
break;
case 1:
strText += strTmp +"$&";
break;
default:
strText += "$";
break;
}
m_key.GetWindowText(strTmp);
switch( m_keyradio )
{
case 0:
strText += strTmp +"$@";
break;
case 1:
strText += strTmp +"$&";
break;
default:
strText += "$";
break;
}
m_thesis.GetWindowText(strTmp);
switch( m_thesisradio )
{
case 0:
strText += strTmp +"$@";
break;
case 1:
strText += strTmp +"$&";
break;
default:
strText += "$";
break;
}
CDialog::OnOK();
// MessageBox("34"+strText);
}
void CLookup::OnRadio2()
{
// TODO: Add your control notification handler code here
m_stuidradio = 0;
}
void CLookup::OnRadio3()
{
// TODO: Add your control notification handler code here
m_stuidradio = 1;
}
void CLookup::OnRadio4()
{
// TODO: Add your control notification handler code here
m_sturadio = 0;
}
void CLookup::OnRadio5()
{
// TODO: Add your control notification handler code here
m_sturadio = 1;
}
void CLookup::OnRadio6()
{
// TODO: Add your control notification handler code here
m_tchradio = 0;
}
void CLookup::OnRadio7()
{
// TODO: Add your control notification handler code here
m_tchradio = 1;
}
void CLookup::OnRadio8()
{
// TODO: Add your control notification handler code here
m_keyradio = 0;
}
void CLookup::OnRadio9()
{
// TODO: Add your control notification handler code here
m_keyradio = 1;
}
void CLookup::OnRadio10()
{
// TODO: Add your control notification handler code here
m_thesisradio = 0;
}
void CLookup::OnRadio11()
{
// TODO: Add your control notification handler code here
m_thesisradio = 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -