ize
// must use CBS_OWNERDRAWVARIABLE for this to work
if (EDGE_STYLE == EDGE)
lpMeasureItemStruct->itemHeight = ITEM_HEIGHT;
}
//////////////////////////////////////////
//********************************************
//
/////////////////////////////////////////////
int CJComboBox::AddString(LPCTSTR lpszString)
{
//AfxMessageBox(lpszString);
return CJComboBox::AddItem(lpszString,0,CComboBox::GetCount());
}
int CJComboBox::AddItem(CString strItem,int nCol,int nRow,int nMask,int nFmt)
{
int CB_MSG;
if (nColShow == nCol) //nRow == PrevRow &&
CB_MSG = CComboBox::AddString(strItem);
cItem[nCol].AddTail( strItem );
// if(EDGE_STYLE == NORMAL)
AddItemPtr(nCol,cItem[nCol].GetCount()-1);
PrevRow = cItem[nCol].GetCount()-1;
return CB_MSG;
}
////////////////////////////////////////
//For index key lookup operations//////
/////////////////////////////////////////
void CJComboBox::AddItemPtr(int nCol, int nRow)
{
/////////////////////////////////////////////////////////////
// This portion of the code can be used if user set the
// index starting from 0..n
// I keep it for my half-day-wasting-time lesson.
// where pCurrent->next cannot be constructed
// if the pCurrent is invalid
上一篇:
JCOMBO.CPP
下一篇:
秋天是疼痛的