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

📄 dlgall.cpp

📁 这个是一个比较全的超市管理系统
💻 CPP
字号:
// DlgAll.cpp : implementation file
//

#include "stdafx.h"
#include "ncshop.h"
#include "DlgAll.h"
#include "ADOConn.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgAll dialog


CDlgAll::CDlgAll(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgAll::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgAll)
		// NOTE: the ClassWizard will add member initialization here
	strTitle="";
	strSql="";
	intOpen=0;
	intKey=0;
	//}}AFX_DATA_INIT
}


void CDlgAll::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgAll)
	DDX_Control(pDX, IDC_LIST1, m_listMain);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgAll, CDialog)
	//{{AFX_MSG_MAP(CDlgAll)
	ON_NOTIFY(NM_DBLCLK, IDC_LIST1, OnDblclkList1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgAll message handlers

BOOL CDlgAll::OnInitDialog() 
{
	CDialog::OnInitDialog();
	// TODO: Add extra initialization here
	CADOConn adoMain;
	GetDlgItem(IDC_STATIC1)->SetFont(&ftHeader);
	GetDlgItem(IDC_STATIC1)->SetWindowText(strTitle);
	adoMain.Open(strSql);
	adoMain.InitList(&m_listMain,intOpen);
	adoMain.FillList(&m_listMain,intOpen);
	adoMain.ExitConnect();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgAll::OnDblclkList1(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	POSITION pos;
	int i;
	pos=m_listMain.GetFirstSelectedItemPosition();
	i=m_listMain.GetNextSelectedItem(pos);
	if (i>=0)
	{
		intSelect=i;
		strKey=m_listMain.GetItemText(i,intKey);
		CDialog::OnOK();
	}
	*pResult = 0;	
}

⌨️ 快捷键说明

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