본문 바로가기

Windows/MFC

CListCtrl, InsertColumn (컬럼 추가하기)

[code]void CDunzipCloneDlg::InsertColumn()
{
    m_szLoadString.LoadString(IDS_COLUMN_NAME);
    m_zipFiles.InsertColumn(0, m_szLoadString, LVCFMT_LEFT,        150);
    m_szLoadString.LoadString(IDS_COLUMN_COMPRESS_SIZE);
    m_zipFiles.InsertColumn(1, m_szLoadString, LVCFMT_RIGHT,    70);
    m_szLoadString.LoadString(IDS_COLUMN_SIZE);
    m_zipFiles.InsertColumn(2, m_szLoadString, LVCFMT_RIGHT,    70);
    m_szLoadString.LoadString(IDS_COLUMN_PERCENTAGE);
    m_zipFiles.InsertColumn(3, m_szLoadString, LVCFMT_RIGHT,    50);
    m_szLoadString.LoadString(IDS_COLUMN_TYPE);
    m_zipFiles.InsertColumn(4, m_szLoadString, LVCFMT_LEFT,        100);
    m_szLoadString.LoadString(IDS_COLUMN_CHANGE_DATE);
    m_zipFiles.InsertColumn(5, m_szLoadString, LVCFMT_CENTER,    120);
}[/code]