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

Tauruser

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

MFC ComboBox 使用方法(轉載)

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

MFC ComboBox 使用方法(轉載)


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 使用方法(轉載)  回復  更多評論   

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>
            亚洲二区在线| 国产一区二区激情| 亚洲精品欧美日韩| 亚洲国产日韩欧美在线99| 蜜桃久久av| 欧美激情视频在线播放| 91久久精品www人人做人人爽| 久久影视三级福利片| 女人天堂亚洲aⅴ在线观看| 欧美大片专区| 一二三四社区欧美黄| 欧美一二三区精品| 久久婷婷久久| 欧美性视频网站| 国产一区二区视频在线观看| 亚洲成人在线观看视频| 亚洲免费电影在线观看| 亚洲欧美中日韩| 麻豆精品国产91久久久久久| 伊人精品成人久久综合软件| 亚洲国产mv| 亚洲一区二区高清视频| 久久久在线视频| 亚洲欧洲精品一区二区三区| 亚洲网址在线| 欧美+亚洲+精品+三区| 久久精品国产2020观看福利| 老鸭窝亚洲一区二区三区| 亚洲九九精品| 久久久久国产成人精品亚洲午夜| 免费在线亚洲欧美| 国产精品影视天天线| 亚洲人人精品| 久久五月天婷婷| 亚洲欧美美女| 欧美三级午夜理伦三级中视频| 国产欧美日韩在线视频| 日韩一区二区免费看| 久久综合九色九九| 中文亚洲欧美| 欧美激情一区二区在线| 永久免费精品影视网站| 亚洲欧美日韩综合国产aⅴ| 欧美激情国产日韩| 久久久久国产精品一区二区| 国产精品亚洲网站| 亚洲午夜极品| 亚洲国产精品久久久久秋霞蜜臀| 欧美一区三区三区高中清蜜桃| 欧美日韩在线一二三| 亚洲欧洲日韩综合二区| 久久在线91| 久久精品国产99国产精品| 国产日韩免费| 久久国产精品久久久久久久久久| 国产精品99久久99久久久二8| 欧美电影在线观看| 91久久精品美女| 欧美国产丝袜视频| 乱中年女人伦av一区二区| 一区二区在线看| 麻豆精品国产91久久久久久| 久久精品人人做人人综合| 国产亚洲欧美一区二区| 久久精品国产亚洲高清剧情介绍| 亚洲一区二区三区午夜| 国产精品永久免费视频| 欧美在线啊v一区| 欧美一区二区啪啪| 影音先锋在线一区| 亚洲电影观看| 欧美日韩亚洲高清| 亚洲一区二区精品在线| 亚洲一区久久久| 国产一区二区三区四区hd| 久久久久国产精品麻豆ai换脸| 性欧美xxxx视频在线观看| 国产一区二区三区的电影| 蜜臀av性久久久久蜜臀aⅴ| 欧美激情影院| 欧美成人免费小视频| 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲国产小视频| 欧美精品福利在线| 亚洲一区图片| 久久久.com| 一本色道久久加勒比88综合| 亚洲视频精选| 在线观看欧美日本| 日韩午夜电影av| 国产老女人精品毛片久久| 美女爽到呻吟久久久久| 欧美日韩国产不卡在线看| 欧美影院视频| 欧美成人精品不卡视频在线观看 | 女生裸体视频一区二区三区| 欧美激情亚洲一区| 欧美自拍偷拍午夜视频| 欧美国产高清| 久久狠狠久久综合桃花| 欧美激情第二页| 久久九九国产精品| 欧美日韩精品综合在线| 麻豆精品在线视频| 国产精品三级视频| 亚洲人成绝费网站色www| 国产一级揄自揄精品视频| 亚洲精品一区在线观看香蕉| 国产亚洲人成a一在线v站| 亚洲精品视频二区| 一区二区三区在线免费视频| 在线亚洲一区二区| 亚洲精品美女久久久久| 欧美尤物巨大精品爽| 亚洲午夜电影网| 欧美国产日韩免费| 蜜桃av综合| 一区二区三区在线免费视频| 亚洲男人av电影| 亚洲在线视频| 欧美精品在线网站| 欧美激情视频给我| 永久555www成人免费| 性欧美超级视频| 香蕉久久国产| 国产精品无码永久免费888| 91久久亚洲| 亚洲精品日韩在线观看| 久久性色av| 久久综合九色综合欧美就去吻| 欧美一级在线亚洲天堂| 欧美一区二区三区视频在线| 欧美日韩综合在线| 亚洲精选中文字幕| 日韩视频在线播放| 欧美顶级艳妇交换群宴| 欧美国产精品v| 亚洲国产精品久久久久婷婷884| 欧美专区日韩视频| 久久久久久久97| 黄色在线一区| 老司机免费视频一区二区三区 | 夜夜精品视频一区二区| 日韩午夜在线电影| 欧美久久在线| 亚洲私人黄色宅男| 先锋影音网一区二区| 国产女精品视频网站免费| 亚洲欧美精品suv| 久久爱www.| 在线精品在线| 欧美理论电影在线观看| 夜夜爽www精品| 香蕉成人久久| 亚洲大胆视频| 欧美日韩一区二区在线观看| 中日韩视频在线观看| 久久精品日韩| 91久久国产精品91久久性色| 欧美精品1区2区3区| 一区二区欧美日韩| 久久九九99| 99国产精品视频免费观看| 欧美午夜免费| 久久成人久久爱| 亚洲经典自拍| 久久超碰97人人做人人爱| 影音欧美亚洲| 欧美午夜无遮挡| 久久久一区二区| 在线视频欧美一区| 免费短视频成人日韩| 中文国产成人精品| 狠狠噜噜久久| 国产精品成人va在线观看| 久久激情五月丁香伊人| 亚洲免费观看高清完整版在线观看| 新67194成人永久网站| 亚洲人精品午夜在线观看| 国产欧美一区二区三区沐欲| 男人的天堂亚洲| 亚洲欧美清纯在线制服| 亚洲人成艺术| 免费欧美日韩国产三级电影| 午夜激情久久久| av不卡在线| 亚洲国产精品免费| 国产九九精品| 欧美日韩国产二区| 美女国产一区| 久久国产精品久久久久久久久久| 亚洲精品国产精品乱码不99 | 久久高清免费观看| 99国产精品国产精品毛片| 在线观看91精品国产麻豆| 欧美午夜不卡在线观看免费| 免费久久99精品国产自| 久久精品视频网| 亚洲欧美成人综合| 一区二区三区高清视频在线观看|