Click here to Skip to main content
15,895,746 members
Articles / Desktop Programming / MFC

Develop MFC Doc/View Application Which Supports Any Number Document Template

Rate me:
Please Sign up or sign in to vote.
1.57/5 (3 votes)
2 Jun 20052 min read 36.5K   1.7K   26  
This article provides an introduction to TangramLittle, a C++ Framework for MFC and the .NET Framework. Knowledge in MFC and the .NET Framework is assumed.
#pragma once


// CDocTemplateDlg dialog
/***********************************************************
CDocTemplateDlg�Ǹ������ĵ�ģ��ĶԻ���TangramLittleͨ��һ
��xml�ļ������ɼ��ص�ģ����Ϣ�����е��ĵ�ģ�������ļ����洢
��һ��DocTemplateĿ¼�У�����λ�ÿ��Բ鿴Ŀ¼��
..\..\Program Files\TangramUniverseDocument\Your Company Name\MSDNDocIntegrationSample,
CDocTemplateDlg�������Ŀ¼�Լ���Ŀ¼�е�xml�ļ����÷�ҳ�ķ�ʽ
���ɼ��ص�ģ����֯�����Ա��û�ѡ�񡣾��������ο�CDocTemplateDlg::OnInitDialog()
��ʵ�֡��û��������ĵ�ʱ�����򴴽�����Ի�������Ի��������
�Ǹ������������߿����ڴ˻����Ͻ��������Ѻõ��ĵ�ģ��Ի���
***********************************************************/
class CDocTemplateDlg : public CDialog
{
	DECLARE_DYNAMIC(CDocTemplateDlg)
public:
	CDocTemplateDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDocTemplateDlg();

// Dialog Data
	enum { IDD = IDD_DOCTEMPLATE };
	CString strCurTabText;
	CString m_strTemplateDoc;
	CTabCtrl m_tabCtrl;
	CListCtrl m_TemplateList;

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

public:
	afx_msg void OnLvnItemchangedTemplatelist(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkTemplatelist(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnBnClickedOk();
	afx_msg void OnTcnSelchangeTemplatetab(NMHDR *pNMHDR, LRESULT *pResult);
	DECLARE_MESSAGE_MAP()
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here



Comments and Discussions