ComboBox的使用

ComboBox的操作:

(1)添加项:

ComboBox_AddString(hwndCtrl,str);

(2)确定目前选项的索引:

int ComboBox_GetCurSel(HWND hwndCtl);Cur:Current Sel:Selection

(3)删除项:

int ComboBox_DeleteString(HWND hwndCtl, int index);

(4)取得有多少项:

int ComboBox_GetCount(HWND hwndCtl);

(5)选定某一项:int ComboBox_SetCurSel(HWND hwndCtl, int index);

(6)得到某项的值:int ComboBox_GetLBText(HWND hwndCtl, int index, LPCTSTR lpszBuffer);

 

更多详见:http://msdn.microsoft.com/en-us/library/bb775792(v=VS.85).aspx

你可能感兴趣的:(ComboBox的使用)