// memberinfodlg_dataformat.h : header file
//
#if !defined(_MEMBERINFODLG_DATAFORMAT_H_)
#define _MEMBERINFODLG_DATAFORMAT_H_

#include "enums.h"
#include "PropertyEditorDlg.h"
#include "CfgEdit.h"
#include "CfgComboBox.h"

class CXmlMemberInfo;
class CXmlBaseElement;

/////////////////////////////////////////////////////////////////////////////
// CMemberInfoDlg_DataFormat dialog

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

// Dialog Data
	//{{AFX_DATA(CMemberInfoDlg_DataFormat)
	enum { IDD = IDD_MEMBERINFO_DATAFORMAT };
	CStatic	lblDecimalPlaces_;
	CStatic	lblDigitNumber_;
	CStatic	lblMaxChar_;
	CSpinButtonCtrl	spinMaxChar_;
	CSpinButtonCtrl	spinDigitNumber_;
	CSpinButtonCtrl	spinDecimalPlaces_;
	CCfgEdit	txtMaxChar_;
	CCfgEdit	txtDigitNumber_;
	CCfgEdit	txtDecimalPlaces_;
	CCfgComboBox	cboDataType_;
	CButton chkMultilineString_;
	//}}AFX_DATA

public:	
	void StoreData();
	void SetData(CXmlBaseElement* element);
	void OnDataUpdate();

	void OnOK(){};
	void OnCancel(){};

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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CMemberInfoDlg_DataFormat)
	afx_msg void OnSelChangeCboDatatype();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	void UpdateFields(enDataType dataType);
	void UpdateWindowSize();

	CXmlMemberInfo* memberInfo_;
};

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

#endif // !defined(_MEMBERINFODLG_DATAFORMAT_H_)
