#if !defined(AFX_RECTPROPERDLG_H__DFB47272_E457_4F4D_AB0A_B47AAFF49D45__INCLUDED_)
#define AFX_RECTPROPERDLG_H__DFB47272_E457_4F4D_AB0A_B47AAFF49D45__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CRectProperDlg dialog
#include "PageDialog.h"
#include <apl_gui.h>

class CReportSheet;

class CRectProperDlg : public CPageDialog
{
// Construction
protected:
	CReportElement* elem;

	COLORREF m_line_color;
	bool		m_bChangedColor;
public:
	bool TestUpdate();
	CString m_str_x;
	CString m_str_y;
	CString m_str_cx;
	CString m_str_cy;
	CString m_str_lw;
	RE_Array *m_elems;
	int mode;
	virtual bool UpdateDlg(BOOL UPD = TRUE);
	CRectProperDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CRectProperDlg)
	enum { IDD = IDD_RECT_PROPER_DLG };
	CSpinButtonCtrl	m_SpinYCtrl;
	CSpinButtonCtrl	m_SpinXCtrl;
	CSpinButtonCtrl	m_SpinHCtrl;
	CSpinButtonCtrl	m_SpinWCtrl;
	CSpinButtonCtrl	m_SpinLWCtrl;
	CaplStatic	m_color_ctrl;
	double	m_cx;
	double	m_cy;
	double	m_x;
	double	m_y;
	double	m_line_width;
	BOOL	m_fixed;
	//}}AFX_DATA


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

// Implementation
protected:
	bool IsValidPositionandSize(CPoint pt, CSize sz, CReportSheet* pOwner);

	// Generated message map functions
	//{{AFX_MSG(CRectProperDlg)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnStaticColor();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnFixed();
	afx_msg void OnDeltaposSpinLw(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinX(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinW(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinH(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDeltaposSpinY(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_RECTPROPERDLG_H__DFB47272_E457_4F4D_AB0A_B47AAFF49D45__INCLUDED_)
