#if !defined(AFX_APPRNOTEDLG_H__209B5758_0791_421F_AFB3_9BB30F23E6BD__INCLUDED_)
#define AFX_APPRNOTEDLG_H__209B5758_0791_421F_AFB3_9BB30F23E6BD__INCLUDED_

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

#include "resource.h"
#include "apl_api.h"
#include <apl_gui.h>
/////////////////////////////////////////////////////////////////////////////
// CApprNoteDlg dialog

class CApprNoteDlg : public CaplTranslateDialog
{
// Construction
public:
	CaplRichEditCtrl *m_richedit;
	CaplAPI *m_api;
	CaplInstance *m_appr;
	CaplInstance *m_item;
	CaplInstance *m_parent;
	CaplInstance *m_note;
	CaplInstance **m_pNote;
	bool m_bNewNote;
	CString m_mode;

	CApprNoteDlg(CWnd* pParent = NULL);   // standard constructor
	void SelChangeRE(NMHDR* pNMHDR, LRESULT* pResult);
	
	void AddFonts();
	bool GetLastNote();
	
	void SaveNote();

// Dialog Data
	//{{AFX_DATA(CApprNoteDlg)
	enum { IDD = IDD_APPRNOTE_DLG };
	CComboBox	m_sizefont;
	CComboBox	m_font;
	CaplButton	m_right;
	CaplButton	m_paste;
	CaplButton	m_left;
	CaplButton	m_select_font;
	CaplButton	m_cut;
	CaplButton	m_copy;
	CaplButton	m_center;
	//}}AFX_DATA


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

// Implementation
	void SetAnchors();
protected:
	
	void OKClicked();
	void OKClickedExists(CaplInstance *note);
	void SetRTF(CaplInstance *note);

	// Generated message map functions
	//{{AFX_MSG(CApprNoteDlg)
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	afx_msg void OnApprnoteCut();
	afx_msg void OnApprnoteCopy();
	afx_msg void OnApprnotePaste();
	afx_msg void OnApprnoteSelfont();
	afx_msg void OnApprnoteAleft();
	afx_msg void OnApprnoteAcenter();
	afx_msg void OnApprnoteAright();
	afx_msg void OnCloseupApprnoteFontname();
	afx_msg void OnCloseupApprnoteFontsize();
	afx_msg void OnFontUpdate();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_APPRNOTEDLG_H__209B5758_0791_421F_AFB3_9BB30F23E6BD__INCLUDED_)

