#if !defined(AFX_DLGALL_H__175C80B2_CE9C_4386_92D6_DEEDB3A146C0__INCLUDED_)
#define AFX_DLGALL_H__175C80B2_CE9C_4386_92D6_DEEDB3A146C0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgAll.h : header file
//
/
// CDlgAll dialog
class CDlgAll : public CDialog
{
// Construction
public:
CDlgAll(CWnd* pParent = NULL); // standard constructor
CString strSQL, strSelect, strTitle, strKey;
int intKey, intSelect;
// Dialog Data
//{{AFX_DATA(CDlgAll)
enum { IDD = IDD_ALLDLG };
CListCtrl m_ctrlListMain;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgAll)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDlgAll)
virtual BOOL OnInitDialog();
afx_msg void OnClickListAll(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGALL_H__175C80B2_CE9C_4386_92D6_DEEDB3A146C0__INCLUDED_)
// DlgAll.cpp : implementation file
//
#include "stdafx.h"
#include "SalesManagementSystem.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
//}}AFX_DATA_INIT
}
void CDlgAll::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgAll)
DDX_Control(pDX, IDC_LIST_ALL, m_ctrlListMain);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgAll, CDialog)
//{{AFX_MSG_MAP(CDlgAll)
ON_NOTIFY(NM_CLICK, IDC_LIST_ALL, OnClickListAll)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/
// CDlgAll message handlers
BOOL CDlgAll::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CADOConn adoAll;
GetDlgItem(IDC_STATIC_THEME)->SetWindowText(strTitle);
adoAll.Open(strSQL);
adoAll.InitList(&m_ctrlListMain);
adoAll.FillList(&m_ctrlListMain);
adoAll.ExitConnect();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgAll::OnClickListAll(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
POSITION pos;
int index;
pos = m_ctrlListMain.GetFirstSelectedItemPosition();
index = m_ctrlListMain.GetNextSelectedItem(pos);
strKey = m_ctrlListMain.GetItemText(index, intKey);
CDialog::OnOK();
*pResult = 0;
}
商店管理系统源代码(十三)
最新推荐文章于 2022-03-04 08:55:47 发布