// DialogTestDlg.h : header file
//

#if !defined(AFX_DIALOGTESTDLG_H__90F85626_6C61_4979_889B_5C80C2918DF9__INCLUDED_)
#define AFX_DIALOGTESTDLG_H__90F85626_6C61_4979_889B_5C80C2918DF9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CDialogTestDlg dialog

#include "ExtDataModel.h"
#include "MyDrawWnd.h"

class CDialogTestDlg : public CDialog
{
// Construction
public:
	CDialogTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CDialogTestDlg)
	enum { IDD = IDD_DIALOGTEST_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	CFOPDrawWnd		m_wndCanvas;
	CExtDataModel *	m_pDataModel;

	CMyDrawWnd m_NewCanvas;

	// Toolbox wnd.
	CFOMultiToolBoxWnd m_wndTool;

	// Attributes
	CFOListItemObjList m_Shapes;

	// Load resource file.
	virtual void LoadFromFile();

	// Find item with id.
	// nIndex -- the id of item.
	virtual CFOListItemObj *FindObjByID(int nIndex);
	
	// Add link shape.
	CFOLinkShape *AddLinkShape(CFOListPortShape *pFrom,CFOListPortShape *pTo);

	// Do create toolbox pages.
	virtual void DoCreatePages();

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDialogTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnDestroy();
	afx_msg void OnDrawLine();
	afx_msg void OnUpdateDrawLine(CCmdUI* pCmdUI);
	afx_msg void OnInitMenuPopup(CMenu* pMenu, UINT nIndex, BOOL bSysMenu);
	afx_msg void OnDrawSelect();
	afx_msg void OnUpdateDrawSelect(CCmdUI* pCmdUI);
	afx_msg void OnDrawRectangle();
	afx_msg void OnUpdateDrawRectangle(CCmdUI* pCmdUI);
	afx_msg void OnDrawEllipse();
	afx_msg void OnUpdateDrawEllipse(CCmdUI* pCmdUI);
	afx_msg void OnFileOpen();
	afx_msg void OnUpdateFileOpen(CCmdUI* pCmdUI);
	afx_msg void OnFileSave();
	afx_msg void OnPageSetup();
	afx_msg void OnUpdatePageSetup(CCmdUI* pCmdUI);
	afx_msg void OnFilePrint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DIALOGTESTDLG_H__90F85626_6C61_4979_889B_5C80C2918DF9__INCLUDED_)
