TestDlg.h
资源名称:querydef.zip [点击查看]
上传用户:yunnanyeer
上传日期:2007-01-03
资源大小:86k
文件大小:2k
源码类别:
数据库编程
开发平台:
Visual C++
- // TestDlg.h : header file
- //
- #if !defined(AFX_TESTDLG_H__A94B98E0_5F3C_11D1_898E_0080C83612CB__INCLUDED_)
- #define AFX_TESTDLG_H__A94B98E0_5F3C_11D1_898E_0080C83612CB__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- /////////////////////////////////////////////////////////////////////////////
- // CTestDlg dialog
- class CListCtrlDB : public CListCtrl,public CQueryDefDefaultSink // exemplifies notifications
- {
- CQueryDef* m_pQset; // the data source
- int m_nCols; // number of columns in this list
- EVNHANDLE m_qDefEvt; // handle to QueryDef notifications
- int CalcColumnWidth(const CQueryCol& col);
- public:
- CListCtrlDB();
- virtual ~CListCtrlDB();
- BOOL Bind(CQueryDef& qDef,int nCol = -1); // set the data source for this ctl
- void SetAspect(int bCol = -1); // set no of columns
- protected:
- DECLARE_MESSAGE_MAP()
- LPARAM RSNotifyOpen(EVNHANDLE); // displays various notifications from the bound data set
- LPARAM RSNotifyClose(EVNHANDLE);
- LPARAM RSNotifyFormatChanged(EVNHANDLE,BYTE nFormat);
- LPARAM RSNotifyMove(EVNHANDLE);
- };
- class CTestDlg : public CDialog
- {
- // Construction
- public:
- CTestDlg(CWnd* pParent = NULL); // standard constructor
- // Dialog Data
- //{{AFX_DATA(CTestDlg)
- enum { IDD = IDD_TEST_DIALOG };
- CListCtrlDB m_result;
- CString m_sql;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CTestDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- HICON m_hIcon;
- // Generated message map functions
- //{{AFX_MSG(CTestDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- virtual void OnOK();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- CQueryDef m_qDef;
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_TESTDLG_H__A94B98E0_5F3C_11D1_898E_0080C83612CB__INCLUDED_)