coursedlg.h

来自「内容包括从VC++的基本范例到项目开发的许多典型的例子。是VC++初学者不可多得」· C头文件 代码 · 共 91 行

H
91
字号
#if !defined(AFX_COURSEDLG_H__2924D2D5_0A5A_47D5_AF75_B400ACF90716__INCLUDED_)
#define AFX_COURSEDLG_H__2924D2D5_0A5A_47D5_AF75_B400ACF90716__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CourseDlg.h : header file
//
//添加的
#include "MyRecordSet.h"

/////////////////////////////////////////////////////////////////////////////
// CCourseDlg dialog

class CCourseDlg : public CDialog
{
// Construction
public:
	//添加的数据集
	MyRecordSet	m_pRS;

protected:
	//添加的
	CString		m_strSQL;

	CStatusBar  m_wndStatusBar;
	//工具栏图标
	CImageList	m_TreeBootImage;
	CToolBar    m_wndToolBar;

	//添加树结点和列表项目
	void	AddTreeNodes();
	void	AddListItems();

	//根结点
	HTREEITEM	hRootItem;
	//如果该值[strValue],在指定结点的子结点中不存在,则添加一个为此值的结点;
	HTREEITEM	AddDistinctNode(HTREEITEM hParent,CString strValue);

public:
	CCourseDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CCourseDlg)
	enum { IDD = IDD_COURSEDLG_DIALOG };
	CComboBox	m_ctrlCollege;
	CListCtrl	m_ctrlList;
	CTreeCtrl	m_ctrlTree;
	CString	m_strTeacher;
	CString	m_strName;
	CString	m_strID;
	CString	m_strType;
	CString	m_strCollege;
	CString	m_strCredit;
	CString	m_strHours;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCourseDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CCourseDlg)
	afx_msg void OnItemAdd();
	afx_msg void OnItemDelete();
	afx_msg void OnItemEdit();
	afx_msg void OnItemQuit();
	afx_msg void OnItemHelp();
	afx_msg void OnItemRefresh();
	afx_msg void OnItemSave();
	afx_msg void OnItemSearch();
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnColumnclickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClickList(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_COURSEDLG_H__2924D2D5_0A5A_47D5_AF75_B400ACF90716__INCLUDED_)

⌨️ 快捷键说明

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