就是初始化列表控件问题呢??老是说什么未能识别的标拾

解决方案 »

  1.   

    void DATA::On_LIST_DATA() 
    {
    // TODO: Add your control notification handler code here

    }
    void DATA::InitControl()
    {
    DWORD dwExStryle = LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES |LVS_EX_HEADERDRAGDROP | LVS_EX_ONECLICKACTIVATE |LVS_EX_UNDERLINEHOT;
    m_LIST_DATA.setExtendedStyle(dwExStyle);
    m_LIST_DATA.InsertColumn(0,"员工编号",LVCFMT_CENTER,70);
    m_LIST_DATA.InsertColumn(1,"姓名",LVCFMT_CENTER,80);
    m_LIST_DATA.InsertColumn(2,"性别",LVCFMT_CENTER,40);
    m_LIST_DATA.InsertColumn(3,"年龄",LVCFMT_CENTER,40);
    m_LIST_DATA.InsertColumn(4,"学历",LVCFMT_CENTER,40);
    }void DATA::OnSelchangeListData() C:\Program Files\VC++\MyProjects\作业\DATA.cpp(72) : error C2039: 'On_LIST_DATA' : is not a member of 'DATA'
            c:\program files\vc++\myprojects\作业\data.h(13) : see declaration of 'DATA'
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(77) : error C2039: 'InitControl' : is not a member of 'DATA'
            c:\program files\vc++\myprojects\作业\data.h(13) : see declaration of 'DATA'
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(80) : error C2065: 'm_LIST_DATA' : undeclared identifier
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(80) : error C2228: left of '.setExtendedStyle' must have class/struct/union type
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(80) : error C2065: 'dwExStyle' : undeclared identifier
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(81) : error C2228: left of '.InsertColumn' must have class/struct/union type
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(82) : error C2228: left of '.InsertColumn' must have class/struct/union type
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(83) : error C2228: left of '.InsertColumn' must have class/struct/union type
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(84) : error C2228: left of '.InsertColumn' must have class/struct/union type
    C:\Program Files\VC++\MyProjects\作业\DATA.cpp(85) : error C2228: left of '.InsertColumn' must have class/struct/union type
      

  2.   


    你定义的变量是:  dwExStryle后边使用时就变成:dwExStyle
      

  3.   

    这几种类型的BUG我初学的时候也会经常遇到。A类调用B类的成员函数时要完成两个步骤。A类中包含B类的头文件;A类中声名B类的对象。