商店管理系统源代码(十三)

来源:互联网 发布:java获取本机ip地址 编辑:程序博客网 时间:2024/04/30 20:19
#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 dialogclass CDlgAll : public CDialog{// Constructionpublic:CDlgAll(CWnd* pParent = NULL);   // standard constructorCString strSQL, strSelect, strTitle, strKey;int intKey, intSelect;// Dialog Data//{{AFX_DATA(CDlgAll)enum { IDD = IDD_ALLDLG };CListCtrlm_ctrlListMain;//}}AFX_DATA// Overrides// ClassWizard generated virtual function overrides//{{AFX_VIRTUAL(CDlgAll)protected:virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support//}}AFX_VIRTUAL// Implementationprotected:// Generated message map functions//{{AFX_MSG(CDlgAll)virtual BOOL OnInitDialog();afx_msg void OnClickListAll(NMHDR* pNMHDR, LRESULT* pResult);//}}AFX_MSGDECLARE_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_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CDlgAll dialogCDlgAll::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_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CDlgAll message handlersBOOL CDlgAll::OnInitDialog() {CDialog::OnInitDialog();// TODO: Add extra initialization hereCADOConn 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 herePOSITION pos;int index;pos = m_ctrlListMain.GetFirstSelectedItemPosition();index = m_ctrlListMain.GetNextSelectedItem(pos);strKey = m_ctrlListMain.GetItemText(index, intKey);CDialog::OnOK();*pResult = 0;}

原创粉丝点击