#pragma once
#include "afxcmn.h"
#include "afxwin.h"
#include "resource.h"

struct SMapListDescr
{
	SMapListDescr(){format=0;count=0;multipl=1;}

	SMapListDescr(DWORD _format, DWORD _count, DWORD _multipl){format=_format; count=_count; multipl=_multipl;}

	SMapListDescr(SMapListDescr* src)
	{
		format = src->format;
		count = src->count;
		multipl = src->multipl;
	}

	DWORD format;
	DWORD count;
	DWORD multipl;
};


// CDocFormatListsDlg dialog

class CDocFormatListsDlg : public CaplTranslateDialog
{
	DECLARE_DYNAMIC(CDocFormatListsDlg)

public:
	CDocFormatListsDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDocFormatListsDlg();

	void BeginEditLabel(int column);
	BOOL TestEndEdit(MSG* pMsg);


// Dialog Data
	enum { IDD = IDD_DOC_FORMAT_LISTS };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	CListCtrl m_ListFormats;
	CEdit m_Edit4Edit;
	DWORD m_num_edit_item;
	DWORD m_num_edit_column;
	CaplButton	m_cancel_btn;
	CaplButton	m_ok_btn;

	CaplTAggr<SMapListDescr*,SMapListDescr*,APLAGGR_LIST_OR_AUTOKILLREF> m_list_num_lists;

	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnDblclkListFormats(NMHDR* pNMHDR, LRESULT* pResult);

};
