列表控件的“插入列”命令中列的对齐对第一列(MFC类)不起作用 [英] Alignment of the column in Insert column command of list control is not working for first column(MFC classes)

查看:130
本文介绍了列表控件的“插入列”命令中列的对齐对第一列(MFC类)不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了以下代码。

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

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) ;


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

返回TRUE; //除非您将焦点设置为控件,否则返回TRUE
}

    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.

推荐答案

错误的论坛。这是个人资料论坛。您可以在另一个MSDN论坛中提出这个问题,或者如果您愿意的话,我可以将它移到特定的论坛。

Wrong forum. This is the profile forum. You can ask this in another MSDN forum, or I can move it into a specific forum for you if you'd like.

谢谢!

这篇关于列表控件的“插入列”命令中列的对齐对第一列(MFC类)不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆