首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

MDI程序中,用Create在View中创建的CListCtrl如何没显示出来

2012-01-12 
MDI程序中,用Create在View中创建的CListCtrl怎么没显示出来?在View类的.h文件中声明有变量:CListCtrlm_lis

MDI程序中,用Create在View中创建的CListCtrl怎么没显示出来?
在View类的.h文件中声明有变量:
CListCtrlm_listCtrl;
在View类的.cpp文件的OnCreate中:
// TODO: Add your specialized creation code here
CRect rect;
GetClientRect(rect);

m_listCtrl.Create(WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_REPORT, CRect(rect.left + 10, rect.top + 10, rect.right - 10, rect.bottom - 10 - 60), this, 10);

m_listCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES );
m_listCtrl.ShowWindow(SW_SHOW);

但控件并没能显示出来,请各位高手帮忙看看是怎么回事

[解决办法]
CListView
[解决办法]
http://hi.baidu.com/crazyhight/blog/item/604f864f58d28602b3de05d7.html
[解决办法]
你跟进去看看rect的值
[解决办法]

探讨
在View类的.h文件中声明有变量:
CListCtrl m_listCtrl;
在View类的.cpp文件的OnCreate中:
// TODO: Add your specialized creation code here
CRect rect;
GetClientRect(rect);

m_listCtrl.Create(WS_CHILD | WS_VISIBLE | WS……

热点排行