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

📄 deletedlg.cpp

📁 程序可以实现对数据库中汽车按各种方式的查找
💻 CPP
字号:
// DeleteDlg.cpp : implementation file
//

#include "stdafx.h"
#include "SunDmsofAuto.h"
#include "DeleteDlg.h"
#include "SunDmsofAutoSet.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDeleteDlg dialog


CDeleteDlg::CDeleteDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDeleteDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDeleteDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDeleteDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDeleteDlg)
	DDX_Control(pDX, IDC_COMBODelete, m_combodelete);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CDeleteDlg message handlers

BOOL CDeleteDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CSunDmsofAutoSet m_set;
	if(m_set.Open()) m_set.Close();
	m_set.Open();
	int total;
	int n;
	total=m_combodelete.GetCount();
	for(n=0;n<=total-1;n++)
	{			
		m_combodelete.DeleteString(0);
	}
	while(!m_set.IsEOF())
	{
		m_combodelete.AddString(m_set.m_column2);
		m_set.MoveNext();
	}
	m_set.Close();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDeleteDlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(true);
	m_combodelete.GetLBText(m_combodelete.GetCurSel(),m_strdelete);
	if(MessageBox("你确定要删除此项信息吗?","NULL",MB_OKCANCEL)==IDOK)
	{
		CDialog::OnOK();
	}
}

⌨️ 快捷键说明

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