青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Tauruser

Enjoy Every Day
posts - 34, comments - 95, trackbacks - 0, articles - 5
  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

MFC ComboBox 使用方法(轉(zhuǎn)載)

Posted on 2007-02-28 10:29 Tauruser 閱讀(18766) 評論(1)  編輯 收藏 引用 所屬分類: MFC

MFC ComboBox 使用方法(轉(zhuǎn)載)


Combo box controls are space savers. Wherever there is no need for a multi-select from a list of items, combo box is a good choice in such places. This article " CComboBox Example" explains how to use the MFC CComboBox class for manipulation of a list of strings.

CComboBox Example - Initializing a Combo Box:

?? It is assumed that the readers of the sample have already created a dialog box (either in a dialog based application or SDI/MDI application) and placed a combo box control from the controls toolbox on the Resource Editor.

?? After placing the combo box control on the dialog box, open the class wizard by pressing Ctrl + W keys or Menu --> View --> ClassWizard. In the Member Variables tab, Add a Variable for the CComboBox class. This CComboBox example assumes that the variable name is,

????? CComboBox? m_cbExample;

?? This m_cbExample will be used further in our CComboBox example MFC code.

CComboBox Example - Adding Items to a Combo Box:

?? The function AddString is used for adding items to a combo box. If there is a constant set of data, these values can also be added in the Resource Editor itself. The Combo Box control properties dialog has a tab for adding data. Otherwise the data can be added as follows.

??? m_cbExample.AddString("StringData1");
??? m_cbExample.AddString("StringData2");
??? m_cbExample.AddString("StringData3");

CComboBox Example - Retrieving Items from a Combo Box:

?? Usually
a requirement for retrieving items from the combo box will arise from selecting the data. This article also assumes the same. Now the data selected in a combo box needs to be retrieved.

?? To do this, the first step is to find out the index of the selected item inside the combo box control.
Then the item at the corresponding position needs to be pulled out as follows.


??? int nIndex = m_cbExample.GetCurSel();
??? CString strCBText;

??? m_cbExample.GetLBText(
nIndex, strCBText);


?? In the above CComboBox example code, the value will be retrieved and stored in strCBText variable. There is another overloaded version for GetLBText. But the version which uses CString is the easiest one.


CComboBox Example - Finding Items inside a Combo Box:


?? This kind of Find operations on a Combo box will most probably be useful in programs that dynamically modify the values in a combo box. The function FindStringExact is used to find the exact string match inside a combo box.


??? int nIndex = m_cbExample.FindStringExact(0, "Value to be found");

?? The string position inside the combo box control is the return value. It returns CB_ERR if it was unsuccessful in finding the string.


CComboBox Example - Deleting Items from a Combo Box:


??? This operation can be done by using the CCombobox member function DeleteString. This function needs the index of the item inside the combo box.


???? m_cbExample
.DeleteString(nIndex);

Feedback

# re: MFC ComboBox 使用方法(轉(zhuǎn)載)  回復(fù)  更多評論   

2007-05-30 13:32 by
@魔
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久久久国产精品一区三寸 | 久久综合久久综合这里只有精品 | 欧美电影在线播放| 亚洲国产精品www| 欧美黄色一区| 欧美日韩精品免费看| 亚洲专区一区二区三区| 亚洲欧美日韩精品在线| 影院欧美亚洲| 91久久精品一区二区三区| 欧美日韩精品一本二本三本| 性欧美1819sex性高清| 久久人人97超碰国产公开结果| 亚洲日韩成人| 亚洲在线1234| 亚洲精品乱码久久久久久日本蜜臀| 亚洲乱码国产乱码精品精可以看| 国产乱码精品一区二区三区忘忧草| 免费观看在线综合色| 欧美日韩三级视频| 麻豆精品在线视频| 欧美无乱码久久久免费午夜一区| 久久久久国产一区二区| 欧美裸体一区二区三区| 久久久999精品| 欧美日韩国产大片| 美女诱惑一区| 国产乱码精品一区二区三区五月婷 | 激情婷婷亚洲| 一区二区91| 亚洲国产一区二区三区青草影视 | 久久久精品国产一区二区三区| 一区二区三区视频在线播放| 久久精品一区二区| 先锋亚洲精品| 欧美四级在线| 亚洲夫妻自拍| 伊人久久综合97精品| 亚洲一区二区三区欧美| 一区二区精品| 欧美高清一区| 欧美aaaaaaaa牛牛影院| 国产午夜精品久久久久久免费视| 亚洲美女淫视频| 亚洲三级影院| 嫩草影视亚洲| 欧美成人午夜激情在线| 激情五月婷婷综合| 久久成人精品无人区| 欧美一区二区免费观在线| 欧美日韩日本网| 亚洲欧洲精品一区二区三区不卡| 在线观看国产精品淫| 久久成人精品视频| 久久久噜噜噜久久| 国产在线成人| 久久se精品一区二区| 久久视频一区| 136国产福利精品导航网址应用 | 久久久国产精品一区| 久久精品72免费观看| 国产一区亚洲| 久久久久久久精| 欧美成年网站| 亚洲人精品午夜| 欧美人与性禽动交情品| 亚洲伦理在线免费看| 亚洲一区二区三区在线| 国产精品国产三级国产专播精品人| 99精品福利视频| 亚洲一区二区三区午夜| 国产精品永久| 久久se精品一区精品二区| 模特精品裸拍一区| 亚洲毛片一区| 欧美午夜电影完整版| 性色av一区二区三区| 裸体素人女欧美日韩| 亚洲日产国产精品| 国产精品久久久久高潮| 久久国内精品自在自线400部| 蜜臀久久99精品久久久久久9| 亚洲黄色三级| 国产精品国产| 久久久欧美一区二区| 亚洲欧洲一级| 欧美一区二区私人影院日本| 1024精品一区二区三区| 欧美日韩一区自拍| 久久精品91久久香蕉加勒比| 亚洲大片av| 久久不射网站| 亚洲人成网站在线观看播放| 国产精品久久久久毛片大屁完整版 | 亚洲欧美日韩在线播放| 欧美成人午夜影院| 亚洲免费综合| 亚洲第一综合天堂另类专| 欧美日韩国产一区二区三区地区 | 亚洲国产成人91精品| 欧美一级大片在线观看| 亚洲三级免费电影| 国产日韩欧美一区二区| 欧美日本一道本在线视频| 欧美在线999| 日韩亚洲国产精品| 欧美成人dvd在线视频| 欧美亚洲三级| 一区二区毛片| 亚洲经典在线| 国产欧美三级| 国产精品xxxav免费视频| 欧美成年人视频| 欧美在线电影| 午夜精品久久久久久久99黑人| 亚洲国产婷婷综合在线精品| 久久久久久有精品国产| 午夜性色一区二区三区免费视频| 99国内精品久久| 亚洲高清久久网| 韩国成人福利片在线播放| 国产精品激情偷乱一区二区∴| 欧美va天堂va视频va在线| 久久九九精品99国产精品| 亚洲在线一区| 亚洲无亚洲人成网站77777 | 亚洲韩国日本中文字幕| 老司机午夜精品视频| 欧美在线看片| 欧美中在线观看| 西西裸体人体做爰大胆久久久| 亚洲一区欧美一区| 亚洲视频在线视频| 亚洲色在线视频| 一本色道久久| 亚洲午夜精品17c| 亚洲午夜女主播在线直播| 亚洲美洲欧洲综合国产一区| 亚洲精品一区二区在线观看| 亚洲黄色av一区| 亚洲精品中文字幕在线| 亚洲人体1000| 一区二区三区视频免费在线观看| 日韩图片一区| 亚洲视频观看| 欧美一区二区三区免费大片| 欧美一级久久| 久久九九99| 欧美www视频| 亚洲欧洲一区二区天堂久久| 日韩一区二区免费高清| 亚洲性图久久| 久久精品国产亚洲精品| 农夫在线精品视频免费观看| 欧美理论电影在线播放| 欧美午夜精品久久久久久浪潮| 国产精品视频免费| 精品96久久久久久中文字幕无| 亚洲国产日韩一区二区| 一区二区三区回区在观看免费视频| 一本色道综合亚洲| 欧美一区二区三区四区在线| 久久这里有精品15一区二区三区| 农夫在线精品视频免费观看| 亚洲人成人一区二区三区| 亚洲一区日韩在线| 久久午夜精品一区二区| 欧美日韩高清在线观看| 国产三区精品| 亚洲理论在线| 欧美一区在线直播| 亚洲国产欧美另类丝袜| 亚洲欧美韩国| 欧美大片第1页| 国产欧美一区二区白浆黑人| 亚洲国产你懂的| 亚洲欧美日韩国产一区二区三区 | 久久久免费观看视频| 91久久综合亚洲鲁鲁五月天| 午夜精品久久久久久久99黑人| 欧美成人一区在线| 国产视频丨精品|在线观看| 亚洲精品在线视频观看| 欧美在线影院在线视频| 亚洲欧洲一区二区三区在线观看 | 亚洲女与黑人做爰| 欧美日韩不卡视频| 黄色精品一区| 欧美一区二区私人影院日本| 亚洲人午夜精品| 久久久亚洲国产天美传媒修理工| 国产精品二区三区四区| 亚洲欧洲一区二区天堂久久| 久久久亚洲影院你懂的| 一区二区高清视频在线观看| 欧美大片在线观看一区二区| 狠狠干狠狠久久| 欧美一区二区视频在线观看| 在线视频精品一区| 欧美精品一区二区三区四区|