//显示发热量试验信息 void CPageOut::DisQListView(DATA_Q *pQ) { CString str[5]; int iCol; m_listView.DeleteAllItems(); while (m_listView.DeleteColumn(0)); //删除列表中所有列 iCol=sizeof(_gQColText)/sizeof(int); BuildColumns(iCol, _gQColSize, _gQColText); for(int i=0;i<MAX_DATA_Q;i++) { if(!pQ->D[i].bActive) break; str[0]=pQ->D[i].strYangPinNum; str[1].Format(_T("%1.4f"),pQ->D[i].fYangPinM); str[2].Format(_T("%4d"),pQ->D[i].lQbad); str[3].Format(_T("%4d"),pQ->D[i].lQgrad); str[4].Format(_T("%4d"),pQ->D[i].lQnetvad); FormatList(i,str,iCol); } //显示平均值 m_lAverageQ=pQ->lAverageQbad; m_lMaxDiffQ=pQ->lMaxDiffQbad; m_sTest=_T("发热量"); Invalidate(true); }
void CPageOut::DisEListView(DATA_E *pD) { CString str[5]; int iCol; m_listView.DeleteAllItems(); while (m_listView.DeleteColumn(0)); //删除列表中所有列 iCol=sizeof(_gEColText)/sizeof(int); BuildColumns(iCol, _gEColSize, _gEColText); for(int i=0;i<MAX_DATA_E;i++) { if(!pD->D[i].bActive) break; str[0]=pD->D[i].strTestNum; str[1].Format(_T("%1.4f"),pD->D[i].fYangPinZhiLiang); str[2].Format(_T("%d"),pD->D[i].lE); // str[3].Format(_T("%d"),pD->D[i].lMaxDiff); str[3].Format(_T("%s"),pD->D[i].bOk ? _T("合格"):_T("超差")); FormatList(i,str,iCol); } //显示平均值 m_lMaxDiffE=pD->lMaxDiff; m_fSErrorE=pD->fSError; m_fRSErrorE=pD->fRSError; m_lAverageE=pD->lAverageE; m_sTest=_T("热容量"); Invalidate(true); }
BOOL CPageOut::OnInitDialog() { CPropertyPage::OnInitDialog(); // TODO: Add extra initialization here m_listView.ModifyStyleEx(0, WS_EX_CLIENTEDGE); // m_listView.ModifyStyleEx(0, WS_EX_CLIENTEDGE|LVS_SORTASCENDING); // AddExStyle (LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_CHECKBOXES); AddExStyle (LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); BuildColumns(sizeof(_gEColText)/sizeof(int), _gEColSize, _gEColText); //初始化列表控件的风格 m_listView.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT); //生成网格线|选择整行 return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CShortcutBarView::InitializeHeaderControl() { // Insert the columns. BuildColumns(_countof(arColWidths), arColWidths, arColLabels_keywords); // Subclass the flat header control. SubclassHeader(false); // add images to the header columns. int nCol; for (nCol = 0; nCol < _countof(arHeaderBmps); ++nCol) { // m_flatHeader.SetBitmap(nCol, arHeaderBmps[nCol]/*, HDF_STRING*/); } // use sort arrows. m_flatHeader.ShowSortArrow(TRUE); }
BOOL CLogWnd::OnInitDialog() { CDialog::OnInitDialog(); BOOL bRes = m_imglist.Create(IDB_LOGIMG,16,1,0xFFFFFF); m_ListLog.SetImageList(&m_imglist, LVSIL_SMALL); m_ListLog.ModifyStyleEx(0, WS_EX_STATICEDGE); m_ListLog.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); BuildColumns(1, _gColSize, _gColText); /*m_ListLog.InsertItem(0, "Some sample text."); m_ListLog.SetItem(0,1,LVIF_TEXT,"More text.", 0,LVIF_TEXT,LVIF_TEXT,0);*/ return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }