#pragma once #include #include class CSlotTableCtrl : public CWnd { public: struct Row { CString slot; CString glassId; CString type; }; BOOL Create(CWnd* pParent, const RECT& rc, UINT nID); void SetRows(const std::vector& rows); void SetTitle(const CString& title); void SetRowHeight(int height); void SetPadding(int padding); void SetHeaderHeight(int height); void SetTitleHeight(int height); void SetLineColor(COLORREF color); void SetHeaderBgColor(COLORREF color); void Clear(); protected: afx_msg void OnPaint(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); DECLARE_MESSAGE_MAP() private: std::vector m_rows; CString m_title; int m_rowHeight = 20; int m_padding = 8; int m_headerHeight = 22; int m_titleHeight = 20; COLORREF m_lineColor = RGB(230, 230, 230); COLORREF m_headerBgColor = RGB(245, 245, 245); };