
- 加为好友
- 发送私信
- 在线聊天
|
| 发表于:2008-03-31 11:38:492楼 得分:0 |
CRect rect; if(mm_ListCtrl) { mm_ListCtrl.DestroyWindow(); } CWnd *CFrmWnd=AfxGetMainWnd(); CFrmWnd->SetFocus(); CFrmWnd->GetClientRect(rect); rect.top+=3; CStatic mm_Static; mm_ListCtrl.Create(WS_CHILD ¦WS_VISIBLE ¦WS_BORDER ¦LVS_REPORT,rect,CFrmWnd,1); CFrmWnd->GetClientRect(rect); //mm_ListCtrl.SetBkColor(RGB(177,151,240)); mm_ListCtrl.SetTextColor(RGB(0,0,0)); //mm_ListCtrl.SetTextBkColor(RGB(177,151,240)); mm_ListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT ¦LVS_EX_GRIDLINES ¦LVS_EX_HEADERDRAGDROP); mm_ListCtrl.InsertColumn(0,_T("右键标准编号"),LVCFMT_LEFT,100); mm_ListCtrl.InsertColumn(1,_T("右键标准名称"),LVCFMT_LEFT,100); mm_ListCtrl.BringWindowToTop(); CString str; for(int i=0;i <4;i++) { str.Format("编号%d",i+1); mm_ListCtrl.InsertItem(i,str); str.Format("房间%d",i+1); mm_ListCtrl.SetItemText(i,1,str); } 以上是我的代码,运行后mm_ListCtrl无法显示 | | |
修改
删除
举报
引用
回复
| |