locked
Alignment of the column in Insert column command of list control is not working for first column(MFC classes) RRS feed

  • Question

  •  

    I used the following code.

    BOOL CcolumnDlg::OnInitDialog()
    {
        CDialog::OnInitDialog();


        m_List.InsertColumn(0,_T("Employee No"),LVCFMT_CENTER, 100);
        m_List.InsertColumn(1, _T("Employee Name"), LVCFMT_CENTER, 80);

        return TRUE; // return TRUE unless you set the focus to a control
    }

    Data in Employee No field is supposed to appear in center alignment but appears in Left alignment.

    View is set as 'Report' only.

    • Moved by Naomi N Tuesday, February 21, 2012 6:41 PM C++ question (From:Forums Issues (not product support))
    Tuesday, August 5, 2008 11:20 AM

All replies