锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品电影观看,美女诱惑一区,国内精品国语自产拍在线观看http://m.shnenglu.com/Tauruser/category/3682.htmlEnjoy Every Dayzh-cnMon, 19 May 2008 21:04:01 GMTMon, 19 May 2008 21:04:01 GMT60CListCtrl For Beginners(杞澆)http://m.shnenglu.com/Tauruser/archive/2007/03/07/19381.htmlTauruserTauruserWed, 07 Mar 2007 13:23:00 GMThttp://m.shnenglu.com/Tauruser/archive/2007/03/07/19381.htmlhttp://m.shnenglu.com/Tauruser/comments/19381.htmlhttp://m.shnenglu.com/Tauruser/archive/2007/03/07/19381.html#Feedback0http://m.shnenglu.com/Tauruser/comments/commentRss/19381.htmlhttp://m.shnenglu.com/Tauruser/services/trackbacks/19381.htmlThe List Control (MFC CListCtrl class) is the type of control that the Windows Explorer uses for it's right-side pane, but figuring out how to use the control can be a different kind of pain. The control is usually used only in "report view", which provides columns for each item. The following shows the basics of adding data to a List Control:

聽(tīng)聽(tīng)聽(tīng)聽(tīng) int 聽(tīng)I(yíng)ndex;
// 聽(tīng)I(yíng)nsert聽(tīng)columns
ListCtrl.InsertColumn( 0 ,聽(tīng) " One " ,聽(tīng)LVCFMT_LEFT,聽(tīng) - 1 ,聽(tīng) 0 );
ListCtrl.InsertColumn(
1 ,聽(tīng) " Two " ,聽(tīng)LVCFMT_LEFT,聽(tīng) - 1 ,聽(tīng) 1 );
// 聽(tīng)I(yíng)nsert聽(tīng)first聽(tīng)row
Index聽(tīng) = 聽(tīng)ListCtrl.InsertItem(LVIF_TEXT,聽(tīng) 0 ,聽(tīng) " One聽(tīng)one " ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng)NULL);
ListCtrl.SetItem(Index,聽(tīng)
1 ,聽(tīng)LVIF_TEXT,聽(tīng) " One聽(tīng)two " ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng)NULL);
// 聽(tīng)I(yíng)nsert聽(tīng)second聽(tīng)row
Index聽(tīng) = 聽(tīng)ListCtrl.InsertItem(LVIF_TEXT,聽(tīng) 1 ,聽(tīng) " Two聽(tīng)one " ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng)NULL);
ListCtrl.SetItem(Index,聽(tīng)
1 ,聽(tīng)LVIF_TEXT,聽(tīng) " Two聽(tīng)two " ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng) 0 ,聽(tīng)NULL);
// 聽(tīng)Set聽(tīng)column聽(tīng)widths聽(tīng)(an聽(tīng)optional聽(tīng)nice聽(tīng)touch)
ListCtrl.SetColumnWidth( 0 ,聽(tīng)LVSCW_AUTOSIZE);
ListCtrl.SetColumnWidth(
1 ,聽(tīng)LVSCW_AUTOSIZE);

If you are using CListView, then you will need to use something such as the following to access the CListCtrl:

CListCtrl聽(tīng)&ListCtrl聽(tīng)=聽(tīng)GetListCtrl();

Note that for these to work, the control must have the "LVS_REPORT" style. For list controls in dialogs, including dialogs for CFormView, this style can be set in the dialog editor. If you are using CListView or you are creating list controls using Create, the style can be set in a PreCreateWindow override, as in:

BOOL聽(tīng)CDumpView::PreCreateWindow(CREATESTRUCT&聽(tīng)cs)聽(tīng){
cs.style聽(tīng)
|=聽(tīng)LVS_REPORT;
return聽(tīng)CListView::PreCreateWindow(cs);
}


Getting a Count of Columns

The solution for determining the number of columns is not obvious. You must get the header control from the list control and get the number of items (rows) in the header control. So I suggest putting the following in your header:

CHeaderCtrl聽(tīng)*GetHeaderCtrl()聽(tīng)const聽(tīng){return聽(tīng)(CHeaderCtrl*)GetDlgItem(0);};
int聽(tīng)GetColumnsCount()聽(tīng)const聽(tīng){return聽(tīng)GetHeaderCtrl()->GetItemCount();};


Deleting All Columns

Using GetColumnsCount() from above, it is easy to delete all columns.

void聽(tīng)CListControl::DeleteAllColumns()聽(tīng){
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
int聽(tīng)i,聽(tīng)n;
n聽(tīng)
=聽(tīng)GetColumnsCount();
for聽(tīng)(i=0;聽(tīng)i<n;聽(tīng)++i)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)DeleteColumn(
0);
}

Confusing Terminology


Microsoft has made things very confusing because the Platform SDK name for a listbox is "ListBox Control" but MFC programmers usually use "list control" to refer to an instance of the CListCtrl class, which is confusing. Also, the MFC class name for a "List View Control" is CListCtrl and CListView is the view class for it. The MFC class name for a "ListBox Control" is CListBox so we would expect the view class for it to also be CListView except there is not a view class. The following summarizes this.

Platform SDK name:List Boxes
Window class name: ListBox (See under "Predefined Controls" in User Controls and the documentation for CreateWindow and CreateWindowEx)
MFC class name:CListBox
MFC view class name: none

Platform SDK name:ListView Control
Window class name: SysListView32 (use WC_LISTVIEW in source code instead, which is defined as "SysListView32")
MFC class name:CListCtrl
MFC view class name:CListView

























Tauruser 2007-03-07 21:23 鍙戣〃璇勮
]]>
MFC ComboBox 浣跨敤鏂規(guī)硶錛堣漿杞斤級(jí)http://m.shnenglu.com/Tauruser/archive/2007/02/28/19038.htmlTauruserTauruserWed, 28 Feb 2007 02:29:00 GMThttp://m.shnenglu.com/Tauruser/archive/2007/02/28/19038.htmlhttp://m.shnenglu.com/Tauruser/comments/19038.htmlhttp://m.shnenglu.com/Tauruser/archive/2007/02/28/19038.html#Feedback3http://m.shnenglu.com/Tauruser/comments/commentRss/19038.htmlhttp://m.shnenglu.com/Tauruser/services/trackbacks/19038.htmlMFC ComboBox 浣跨敤鏂規(guī)硶錛堣漿杞斤級(jí)

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:

聽(tīng)聽(tīng) 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.

聽(tīng)聽(tīng) 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,

聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) CComboBox聽(tīng) m_cbExample;

聽(tīng)聽(tīng) This m_cbExample will be used further in our CComboBox example MFC code.

CComboBox Example - Adding Items to a Combo Box:

聽(tīng)聽(tīng) 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.

聽(tīng)聽(tīng)聽(tīng) m_cbExample.AddString("StringData1");
聽(tīng)聽(tīng)聽(tīng) m_cbExample.AddString("StringData2");
聽(tīng)聽(tīng)聽(tīng) m_cbExample.AddString("StringData3");

CComboBox Example - Retrieving Items from a Combo Box:

聽(tīng)聽(tīng) 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.

聽(tīng)聽(tīng) 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.


聽(tīng)聽(tīng)聽(tīng) int nIndex = m_cbExample.GetCurSel();
聽(tīng)聽(tīng)聽(tīng) CString strCBText;

聽(tīng)聽(tīng)聽(tīng) m_cbExample.GetLBText(
nIndex, strCBText);


聽(tīng)聽(tīng) 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:


聽(tīng)聽(tīng) 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.


聽(tīng)聽(tīng)聽(tīng) int nIndex = m_cbExample.FindStringExact(0, "Value to be found");

聽(tīng)聽(tīng) 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:


聽(tīng)聽(tīng)聽(tīng) This operation can be done by using the CCombobox member function DeleteString. This function needs the index of the item inside the combo box.


聽(tīng)聽(tīng)聽(tīng)聽(tīng) m_cbExample
.DeleteString(nIndex);



Tauruser 2007-02-28 10:29 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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| 午夜精品久久久久久久99黑人| 久久疯狂做爰流白浆xx| 日韩香蕉视频| 国内一区二区三区在线视频| 一区二区亚洲| 国产日韩一区二区三区在线播放 | 亚洲免费影视| 亚洲国产一区二区三区高清| 国产精品www网站| 国产精品日本精品| 亚洲黄色一区二区三区| 午夜日本精品| 午夜视频在线观看一区| 亚洲精品视频一区| 性做久久久久久| 最近中文字幕日韩精品| 亚洲欧美日韩另类| 欧美国产日韩精品| 国产一区二区三区四区五区美女 | 欧美中文字幕在线播放| 亚洲第一色中文字幕| 亚洲一区中文字幕在线观看| 99精品国产高清一区二区| 午夜一区在线| 欧美日韩一区免费| 亚洲精品专区| 免费欧美在线视频| 一区二区三区日韩精品视频| 久久av一区二区三区亚洲| 日韩小视频在线观看| 久久国产精品99精品国产| 欧美三级网址| 日韩午夜电影在线观看| 欧美福利视频在线观看| 女仆av观看一区| 欧美亚洲一区二区在线观看| 国产精品国产a| 国产精品porn| 国产精品一二三| 亚洲天堂网在线观看| 亚洲黄色片网站| 欧美成人精品一区| 欧美另类99xxxxx| 欧美日韩免费观看中文| 亚洲激情在线| 亚洲福利视频二区| 欧美大片网址| 国产精品自在线| 国产日韩欧美一区在线| 午夜精品美女自拍福到在线| 亚洲午夜高清视频| 国产欧美一区二区视频| 国产综合色精品一区二区三区| 亚洲性图久久| 亚洲午夜激情网页| 欧美亚洲综合网| 久久亚洲精品伦理| 欧美国产视频在线观看| 亚洲国产综合91精品麻豆| 一区二区三区免费观看| 亚洲天天影视| 欧美一站二站| 久久一区二区精品| 欧美激情视频一区二区三区免费| 欧美韩日一区二区| 欧美成人精品h版在线观看| 欧美午夜在线观看| 国产综合在线视频| 亚洲免费观看高清在线观看| 国产日韩欧美黄色| 免费观看在线综合| 一本色道久久综合亚洲精品婷婷| 亚洲小说区图片区| 国产亚洲美州欧州综合国| 另类尿喷潮videofree| 日韩一级大片在线| 久久久久久精| 国产精品一区二区你懂的| 久久成人国产| 欧美国产日本高清在线| 一区二区在线视频观看| 91久久黄色| 国产综合一区二区| 销魂美女一区二区三区视频在线| 亚洲欧美一区二区激情| 亚洲日韩欧美视频一区| 国产精品久久久久久福利一牛影视| 亚洲视频欧美视频| 欧美在线播放| 亚洲精品日韩久久| 欧美成人免费全部观看天天性色| 欧美网站在线观看| 久久久久久久久久久久久久一区| 亚洲人线精品午夜| 在线中文字幕不卡| 日韩亚洲国产欧美| 国产亚洲精品成人av久久ww| 久久免费偷拍视频| 亚洲欧美99| 在线一区二区日韩| 亚洲一区二区在线视频| 国模大胆一区二区三区| 99精品国产福利在线观看免费 | 亚洲一区二区精品在线| 久久精品一区中文字幕| 亚洲激情一区二区| 国产精品爱啪在线线免费观看| 欧美一区精品| 欧美日韩国产黄| 欧美国产亚洲精品久久久8v| 性欧美1819性猛交| 久久久五月婷婷| 最近中文字幕日韩精品| 亚洲福利电影| 欧美一区在线直播| 亚洲影院在线观看| 欧美私人网站| 欧美一区二区网站| 免费看精品久久片| 一区二区精品在线| 国产色视频一区| 一本大道久久精品懂色aⅴ| 亚洲自拍偷拍一区| 久久亚洲二区| 国产一区二区中文| 91久久线看在观草草青青| 一本色道久久88亚洲综合88| 欧美精品免费播放| 国产农村妇女精品| 国模私拍一区二区三区| 亚洲免费高清| 久久久噜噜噜久久人人看| 狠狠色狠色综合曰曰| 宅男噜噜噜66国产日韩在线观看| 亚洲精品乱码久久久久久日本蜜臀| 亚洲网站视频| 国产精品视频内| 亚洲美女性视频| 国产精品va在线播放我和闺蜜| 久久都是精品| 亚洲东热激情| 久久精品在线观看| 欧美黄色免费| 日韩视频在线观看国产| 欧美激情一区二区三级高清视频| 欧美一级理论片| 亚洲一区二区三区精品在线观看 | 今天的高清视频免费播放成人| 欧美 日韩 国产精品免费观看| 国内成人自拍视频| 久久久999精品视频| 亚洲精品国产精品久久清纯直播| 久久久久久久综合狠狠综合| 久久精品国产亚洲一区二区三区 | 国产日韩欧美日韩大片| 久久国产成人| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美日韩国产免费观看| 一本一道久久综合狠狠老精东影业| 国产精品99久久不卡二区| 亚洲永久字幕| 欧美日韩国产区一| 国产一区二区精品| 99精品视频免费观看视频| 久久精品国产第一区二区三区| 久久久久久穴| 久久国产主播| 欧美在线一区二区| 91久久久久久| 亚洲黄色成人| 亚洲永久在线观看| 在线看片成人| 99re66热这里只有精品3直播| 国产精品亚洲综合色区韩国| 香蕉精品999视频一区二区| 久久久亚洲欧洲日产国码αv | 欧美成人午夜视频| 国产专区精品视频| 久久久青草婷婷精品综合日韩 | 美女诱惑一区| 欧美成人中文| 久久疯狂做爰流白浆xx| 欧美网站在线观看| 亚洲一区欧美二区| 9l国产精品久久久久麻豆|