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

Tauruser

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

MFC ComboBox 使用方法(轉載)

Posted on 2007-02-28 10:29 Tauruser 閱讀(18788) 評論(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
@魔

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            夜夜嗨av一区二区三区网页| 亚洲精品色图| 亚洲欧美日韩精品久久久| 欧美四级剧情无删版影片| 一个人看的www久久| 99re6热在线精品视频播放速度| 欧美欧美全黄| 午夜精品久久久99热福利| 亚洲一区二区在线| 国产一区二区三区久久久久久久久| 欧美怡红院视频| 久久福利毛片| 亚洲精选成人| 亚洲一区二区av电影| 午夜欧美理论片| 亚洲影院色无极综合| 国产综合在线看| 亚洲国产精品精华液网站| 欧美日韩午夜在线| 久久精品电影| 欧美国产免费| 欧美一区激情| 欧美91大片| 欧美亚洲自偷自偷| 免费在线国产精品| 午夜精品福利电影| 蜜臀av性久久久久蜜臀aⅴ| 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲美女在线视频| 国产麻豆午夜三级精品| 欧美h视频在线| 国产精品国产自产拍高清av| 久久久青草婷婷精品综合日韩| 欧美风情在线观看| 欧美在线二区| 欧美区日韩区| 麻豆乱码国产一区二区三区| 欧美日韩性视频在线| 久久嫩草精品久久久久| 欧美日韩一区视频| 欧美韩日一区二区三区| 国产精品网红福利| 欧美激情第3页| 国语自产在线不卡| 亚洲一区二区三区四区五区午夜 | 狠狠色狠狠色综合系列| 亚洲毛片一区二区| 亚洲激情视频| 久久久久久亚洲精品不卡4k岛国| 亚洲五月婷婷| 欧美激情偷拍| 亚洲国产黄色片| 在线成人激情黄色| 欧美一站二站| 久久精品国产免费| 国产精品试看| 一区二区三区四区五区在线| 亚洲精品免费一二三区| 久久全国免费视频| 久久免费黄色| 国内精品免费在线观看| 午夜视频在线观看一区二区| 亚洲女性裸体视频| 欧美色偷偷大香| 99riav国产精品| 日韩亚洲欧美在线观看| 欧美多人爱爱视频网站| 亚洲国产成人av| 亚洲精品视频免费在线观看| 久久人人97超碰国产公开结果 | 亚洲一区二区三区色| 欧美日韩免费一区二区三区视频| 91久久精品www人人做人人爽 | 国产性做久久久久久| 亚洲欧美日韩国产成人| 欧美在线视频免费观看| 国产一区二区三区久久| 久久激情一区| 免费成年人欧美视频| 亚洲第一久久影院| 欧美高清在线一区二区| 亚洲三级免费电影| 亚洲综合导航| 国产一区二区观看| 久久综合色一综合色88| 亚洲成人在线视频播放 | 亚洲午夜久久久久久久久电影院| 欧美日韩视频在线第一区| 在线一区欧美| 久久久亚洲综合| 亚洲日本欧美| 国产精品看片资源| 久久精品国产清自在天天线| 欧美激情一区二区在线| 一本久道久久综合狠狠爱| 国产伦精品一区二区三区| 久久久国产亚洲精品| 亚洲人成77777在线观看网| 亚洲深夜影院| 在线播放中文字幕一区| 欧美日本成人| 小黄鸭精品aⅴ导航网站入口| 久久先锋影音av| 亚洲毛片在线观看| 国产日韩欧美亚洲| 欧美另类一区| 久久精品视频在线播放| 亚洲人体大胆视频| 久久精品亚洲国产奇米99| 亚洲美女毛片| 狠狠色狠色综合曰曰| 欧美日韩中文在线| 久久影院午夜论| 亚洲专区在线视频| 91久久精品一区二区三区| 久久精品午夜| 亚洲免费视频一区二区| 亚洲国产毛片完整版| 国产亚洲美州欧州综合国| 欧美日韩国产专区| 老色鬼精品视频在线观看播放| 亚洲在线视频一区| 亚洲精品国产精品国自产在线 | 91久久久在线| 久久中文字幕一区二区三区| 亚洲欧美日韩一区二区在线 | 中日韩男男gay无套| 黑人巨大精品欧美一区二区| 欧美日韩亚洲一区二区| 免费日韩成人| 久久久久久成人| 欧美在线综合| 香蕉成人伊视频在线观看| 99精品欧美一区二区蜜桃免费| 狂野欧美激情性xxxx| 久久精品亚洲| 午夜精品久久久久久久99水蜜桃 | 国产目拍亚洲精品99久久精品 | 亚洲欧美日韩精品在线| 亚洲最新色图| 99re6热在线精品视频播放速度| 亚洲福利免费| 亚洲第一页中文字幕| 久久久久天天天天| 久久久亚洲高清| 久久久久成人精品免费播放动漫| 欧美影视一区| 久久精品国产在热久久| 羞羞漫画18久久大片| 香蕉久久夜色精品| 午夜视频一区在线观看| 香蕉视频成人在线观看| 欧美亚洲免费电影| 欧美专区福利在线| 久久色在线播放| 嫩草国产精品入口| 亚洲激情啪啪| 亚洲精品自在久久| 亚洲午夜激情网站| 欧美一区二区三区在线| 久久精品国产一区二区三区| 久久亚洲精品欧美| 欧美精品在线视频| 国产精品vvv| 国产亚洲综合在线| 亚洲高清自拍| 亚洲神马久久| 久久久不卡网国产精品一区| 欧美成人免费小视频| 亚洲欧洲三级| 亚洲综合999| 美女性感视频久久久| 欧美视频第二页| 国产综合激情| 99视频精品在线| 久久精品一区二区三区四区 | 亚洲国产精品悠悠久久琪琪| 夜夜爽99久久国产综合精品女不卡| 亚洲午夜激情| 免费人成网站在线观看欧美高清| 欧美日韩不卡一区| 国产在线一区二区三区四区| 伊人久久综合97精品| 欧美成人中文字幕| 久久国产精品黑丝| 久久精品一区二区三区中文字幕| 免费日韩视频| 亚洲一二三级电影| 欧美暴力喷水在线| 国产日韩精品入口| 亚洲精品一区二区在线| 香蕉成人啪国产精品视频综合网| 欧美成人a∨高清免费观看| 99国产一区二区三精品乱码| 久久久精品一区二区三区| 欧美日韩一区三区| 亚洲欧洲在线看| 久久久精品欧美丰满| 这里只有精品视频| 欧美精品激情|