#if !defined(AFX_NOTESVIEW_H__6AD6C8C3_2534_4E58_B174_B1024D7C6C44__INCLUDED_)
#define AFX_NOTESVIEW_H__6AD6C8C3_2534_4E58_B174_B1024D7C6C44__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NotesView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CNotesView view
#include <afxrich.h>

class CPSMDoc;

class CNotesView : public CRichEditView
{
protected:
	CNotesView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CNotesView)

// Attributes
public:

// Operations
public:
	static DWORD CALLBACK CBStreamIn(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
	
	CPSMDoc* GetDocument();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNotesView)
	public:
	virtual void OnInitialUpdate();
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CNotesView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	bool AddNotesRec(CaplInstance *note, aplExtent &notes, CString level);
	bool GetChildNote(CaplInstance *parent, aplExtent &notes, aplExtent &childs);
	void AddNotes(CaplInstance *inst);
	bool SetRTF(CString sBuf, UINT Flags = APL_RC_ALL);
	//{{AFX_MSG(CNotesView)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


#ifndef _DEBUG
inline CPSMDoc* CNotesView::GetDocument(){return (CPSMDoc*)m_pDocument;};
#endif
/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_NOTESVIEW_H__6AD6C8C3_2534_4E58_B174_B1024D7C6C44__INCLUDED_)
