home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / database / daoctl / daocndlg.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  3KB  |  95 lines

  1. // DAOCnDlg.h : header file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CDAOContDlg dialog
  15. //{{AFX_INCLUDES()
  16. #include "daoedit.h"
  17. #include "accpict.h"
  18. //}}AFX_INCLUDES
  19.  
  20. class CDAOContDlg : public CDialog
  21. {
  22. // Construction
  23. public:
  24.     CDAOContDlg(CWnd* pParent = NULL);  // standard constructor
  25.     ~CDAOContDlg();
  26.  
  27. // Dialog Data
  28.     //{{AFX_DATA(CDAOContDlg)
  29.     enum { IDD = IDD_DAOCONT_DIALOG };
  30.     CStatic m_ctlRecNum;
  31.     CSpinButtonCtrl m_ctlSpin;
  32.     CTreeCtrlEx m_ctlTree;
  33.     CAccessPict m_ctlPicture;
  34.     BOOL    m_bAllowEdits;
  35.     //}}AFX_DATA
  36.     CStatic     m_ctlColName[4];
  37.     CDaoEdit    m_ctlEdit[4];
  38.  
  39.     // ClassWizard generated virtual function overrides
  40.     //{{AFX_VIRTUAL(CDAOContDlg)
  41.     protected:
  42.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  43.     //}}AFX_VIRTUAL
  44.  
  45. // Implementation
  46. protected:
  47.     enum ImageIDS{
  48.         IID_DATABASE = 0,IID_DATABASES,
  49.         IID_TABLE,IID_TABLES,
  50.         IID_FIELD,IID_FIELDS,
  51.         IID_INDEX,IID_INDEXES,
  52.         IID_RELATION,IID_RELATIONS,
  53.         IID_QUERYDEF,IID_QUERYDEFS,
  54.         IID_COLLECT,IID_FOLDER,
  55.         IID_GOODFIELD,IID_BADFIELD,
  56.         IID_PICTURE
  57.     };
  58.  
  59.     HICON m_hIcon;
  60.     CImageList m_ctlImage;
  61.     CDaoDatabase* m_pDB;
  62.     CDaoRecordset* m_pRS;
  63.     CTreeCursor m_cursDB,m_cursTDS,m_cursQDS;
  64.     CTreeCursor m_cursTD,m_cursQD;
  65.     BOOL m_bODBC;
  66.     UINT m_nEditIndex;
  67.     UINT m_nRecNum;
  68.     CString m_strTableName;
  69.     BOOL m_bUpdating;
  70.     CString m_strPictCol;
  71.  
  72.     // Generated message map functions
  73.     //{{AFX_MSG(CDAOContDlg)
  74.     virtual BOOL OnInitDialog();
  75.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  76.     afx_msg void OnPaint();
  77.     afx_msg HCURSOR OnQueryDragIcon();
  78.     afx_msg void OnConnectDao();
  79.     afx_msg void OnConnectOdbc();
  80.     afx_msg void OnDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult);
  81.     afx_msg void OnDeltaposSpin1(NMHDR* pNMHDR, LRESULT* pResult);
  82.     afx_msg BOOL OnRequestEdit(UINT nID, BOOL* pBool);
  83.     afx_msg BOOL OnChanged(UINT nID);
  84.     DECLARE_EVENTSINK_MAP()
  85.     //}}AFX_MSG
  86.  
  87.     void PopulateTree();
  88.     void AddItem(WORD nItemType, LPCTSTR lpszName);
  89.     void SetRecordset(LPCTSTR strTableName);
  90.     void UpdateFields();
  91.     void Clear();
  92.  
  93.     DECLARE_MESSAGE_MAP()
  94. };
  95.