// File CSpellBook.h

class CSpellBook:public CDialog
{
private:
	CObArray m_SpellBook;
	BOOL m_Changed;
	CString m_CurrBook;

	CComboBox * ListOfBook(){return (CComboBox *) GetDlgItem(IDC_BOOKNAME);};
	CTreeCtrl * ListOfSpell(){return (CTreeCtrl *) GetDlgItem(IDC_BOOK);};
	void LoadListBook(CComboBox *);
	int LoadFileBook(CString);
	void SaveFileBook();
	void ViewBook();
	void DeleteSpellBook();
	void MakeFile(int type);
public:
	CSpellBook(CWnd *pWnd=NULL);
	virtual BOOL OnInitDialog();
	void AddSpell(DEFSPELL dspell);
protected:
	afx_msg void OnCancel();
	afx_msg void OnDestroy();
	virtual void PostNcDestroy();
	afx_msg void OnViewBook();
	afx_msg void OnViewSpellClick(NMHDR *, LRESULT *);
	afx_msg void OnBtView();
	afx_msg void OnUndoAll();
	afx_msg void OnAutoView();
	afx_msg void OnFileRTF();
	afx_msg void OnFileHTML();
	afx_msg void OnButtonAddSpell();
//	afx_msg void OnButtonDeleteSpell();
	DECLARE_MESSAGE_MAP()
};

class CSpellBookSelect:public CDialog
{
public:
	CString selected;
	CSpellBookSelect(CWnd * pWnd):CDialog(IDD_SPELLBOOK_SELECT, pWnd){};
	CComboBox * GetSelectList(){return (CComboBox *) GetDlgItem(IDC_CAST);};
protected:
	virtual BOOL OnInitDialog();
	virtual void DoDataExchange(CDataExchange * pDX) {DDX_CBString(pDX, IDC_CAST, selected);};
};

