#pragma once
#include "afxcmn.h"
#include "resource.h"
#include "GFResizeDialogHelper.h"
#include "MultiEditListCtrl.h"

// RegDumpFDDDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRegDumpDlg dialog

class CDebugger;

class CRegDumpFDDDlg : public CDialogEx
{
		GFResizeDialogHelper m_Resizer;
		CDebugger           *m_pDebugger;
		CMultiEditListCtrl   m_listFDD;
		CMultiEditListCtrl   m_listHDD;
		CFont                hFont;
		HACCEL               m_hAccelTable;
		CToolTipCtrl m_ToolTip;

		static const UINT m_pLISTFDDIDs[4];
		static const CString m_plistHDDHDrs[10];

		//номера колонок для listFDD
		enum : int
		{
			LISTFDD_NAME_COL = 0,
			LISTFDD_VALUE_COL
		};

		//номера строки для listFDD
		enum : int
		{
			FDDREG177130IN_LINE = 0,
			FDDREG177130OUT_LINE,
			FDDREG177132IN_LINE,
			FDDREG177132OUT_LINE
		};

		//номера колонок для listHDD
		enum : int
		{
			LISTHDD_NAME1_COL = 0,
			LISTHDD_VALUE11_COL,
			LISTHDD_VALUE12_COL,
			LISTHDD_NAME2_COL,
			LISTHDD_VALUE21_COL,
			LISTHDD_VALUE22_COL
		};

		//номера строк для listHDD
		enum : int
		{
			R1F0_LINE = 0,
			R1F1_LINE,
			R1F2_LINE,
			R1F3_LINE,
			R1F4_LINE,
			R1F5_LINE,
			R1F6_LINE,
			R1F7_LINE,
			R3F6_LINE,
			R3F7_LINE
		};

// Construction
	public:
		CRegDumpFDDDlg(CWnd *pParent = nullptr);   // standard constructor
		virtual ~CRegDumpFDDDlg() override;

		enum { IDD = IDD_REGDUMP_FDD_DLG };
		CSize               GetMinSize();
		void                AttachDebugger(CDebugger *pDbgr);
		void                DisplayFDDData();
		void                DisplayHDDData();

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // DDX/DDV support
		virtual BOOL PreTranslateMessage(MSG *pMsg) override;

		void                ResizeList(CMultiEditListCtrl *list, int height);

		// Generated message map functions
		virtual BOOL OnInitDialog() override;
		virtual void OnOK() override;
		virtual void OnCancel() override;
		afx_msg void OnSize(UINT nType, int cx, int cy);
		afx_msg void OnLvnItemchangedMdFddData(NMHDR *pNMHDR, LRESULT *pResult);

		DECLARE_MESSAGE_MAP()
};
