2007年7月25日 星期三

Combo Box

IDC_COMBO1
CComboBox* pComb=(CComboBox*)this->GetDlgItem(IDC_COMBO1);
CString sShowString = "Combo index String ";
pComb->AddString(sShowString); // insert string to combo box
int nCount = pComb->GetCount(); // get item count
pComb->SetCurSel(0); // set first item

ref:

http://msdn.microsoft.com/library/cht/default.asp?url=/library/CHT/vcsample/html/_sample_mfc_dynabind.asp

標籤:

0 個意見:

張貼留言

訂閱 張貼留言 [Atom]

<< 首頁