注册 登录
编程论坛 VC++/MFC

这个程序在VS2005中运行为什么总提示如下的错误(程序后的红字):

kxfei5555w 发布于 2010-10-07 10:12, 522 次点击
BOOL CDlgall::OnInitDialog()
{
    CDialog::OnInitDialog();

    // TODO:  Add extra initialization here

    LV_COLUM lvc
        char*display[7]={"检查号","姓名","日期","性别","年龄","左右利","方式","诊断病历"};
        lvc.mask=LVCF_FMT|LVCF_TEXT|LVCF_SUBITEM|LVCF_WIDTH;
    lvc.fmt=LVCFMT_LEFT;
    lvc.cx=80;
    for(int i=0;i<7;i++)
    {
        lvc.iSubItem=i;
        lvc.pszText=display[i];
        m_List.InsertColumn(i,&lvc);
    }
m_List.SetExtendedStyle(m_List.GetExtendedStyle()|LVS_EX_FULLROWSELECT)    ;
    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
1>e:\14\14\dlgadd.cpp(72) : error C2065: 'm_Left' : undeclared identifier
1>e:\14\14\dlgadd.cpp(72) : error C2228: left of '.AddString' must have class/struct/union
1>        type is ''unknown-type''
1>e:\14\14\dlgadd.cpp(73) : error C2228: left of '.AddString' must have class/struct/union
1>        type is ''unknown-type''
1>e:\14\14\dlgadd.cpp(74) : error C2065: 'm_Sex' : undeclared identifier
1>e:\14\14\dlgadd.cpp(74) : error C2228: left of '.SetCurSel' must have class/struct/union
1>        type is ''unknown-type''
1>e:\14\14\dlgadd.cpp(75) : error C2228: left of '.SetCurSel' must have class/struct/union
1>        type is ''unknown-type''
1 回复
#2
红色警戒2010-10-07 13:39
拼写不全,应该是LV_COLUMN
1