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

📄 sortdlg.cpp

📁 数据库操作程序,不错的,
💻 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)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void SORTDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SORTDLG)
	DDX_Control(pDX, IDC_COMBO1, m_combo);
	//}}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_WHAT)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_2)->ShowWindow(SW_HIDE);
	SetWindowText("排序对话框");
	}
	else
	{
	SetWindowText("查找对话框");
	}
	

	m_combo.InsertString(0,"sno");
	m_combo.InsertString(1,"sname");
	m_combo.InsertString(2,"sage");
	m_combo.SetCurSel(0);
	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_combo.GetCurSel();
	m_combo.GetLBText(k,strtemp);
	CDialog::OnOK();
}

⌨️ 快捷键说明

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