📄 sortdlg.cpp
字号:
// SORTDLG.cpp : implementation file
//
#include "stdafx.h"
#include "DB.h"
#include "SORTDLG.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// SORTDLG dialog
SORTDLG::SORTDLG(CWnd* pParent /*=NULL*/)
: CDialog(SORTDLG::IDD, pParent)
{
//{{AFX_DATA_INIT(SORTDLG)
m_findstr = _T("");
//}}AFX_DATA_INIT
}
void SORTDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(SORTDLG)
DDX_Control(pDX, IDC_COMBO1, m_sortstr);
DDX_Text(pDX, IDC_EDIT1, m_findstr);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(SORTDLG, CDialog)
//{{AFX_MSG_MAP(SORTDLG)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// SORTDLG message handlers
BOOL SORTDLG::OnInitDialog()
{
CDialog::OnInitDialog();
if(!showflag)
{GetDlgItem(IDC_EDIT1)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_TT)->ShowWindow(SW_HIDE);
SetWindowText("排序对话框");}
else
SetWindowText("查找对话框");
m_sortstr.InsertString(0,"sno");
m_sortstr.InsertString(1,"sname");
m_sortstr.InsertString(2,"sage");
m_sortstr.InsertString(3,"ssex");
m_sortstr.InsertString(4,"sdept");
m_sortstr.SetCurSel(2);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void SORTDLG::OnOK()
{
int k=m_sortstr.GetCurSel();
m_sortstr.GetLBText(k,sortstr);
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -