锘??xml version="1.0" encoding="utf-8" standalone="yes"?>免费人成精品欧美精品,一二三区精品福利视频,午夜精品区一区二区三http://www.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://www.shnenglu.com/Tauruser/archive/2007/03/07/19381.htmlTauruserTauruserWed, 07 Mar 2007 13:23:00 GMThttp://www.shnenglu.com/Tauruser/archive/2007/03/07/19381.htmlhttp://www.shnenglu.com/Tauruser/comments/19381.htmlhttp://www.shnenglu.com/Tauruser/archive/2007/03/07/19381.html#Feedback0http://www.shnenglu.com/Tauruser/comments/commentRss/19381.htmlhttp://www.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:

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

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

CListCtrl聽&ListCtrl聽=聽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聽CDumpView::PreCreateWindow(CREATESTRUCT&聽cs)聽{
cs.style聽
|=聽LVS_REPORT;
return聽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聽*GetHeaderCtrl()聽const{return聽(CHeaderCtrl*)GetDlgItem(0);};
int聽GetColumnsCount()聽const{return聽GetHeaderCtrl()->GetItemCount();};


Deleting All Columns

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

void聽CListControl::DeleteAllColumns()聽{
聽聽聽聽
int聽i,聽n;
n聽
=聽GetColumnsCount();
for聽(i=0;聽i<n;聽++i)
聽聽聽聽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 浣跨敤鏂規硶錛堣漿杞斤級http://www.shnenglu.com/Tauruser/archive/2007/02/28/19038.htmlTauruserTauruserWed, 28 Feb 2007 02:29:00 GMThttp://www.shnenglu.com/Tauruser/archive/2007/02/28/19038.htmlhttp://www.shnenglu.com/Tauruser/comments/19038.htmlhttp://www.shnenglu.com/Tauruser/archive/2007/02/28/19038.html#Feedback3http://www.shnenglu.com/Tauruser/comments/commentRss/19038.htmlhttp://www.shnenglu.com/Tauruser/services/trackbacks/19038.htmlMFC 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);



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>
            亚洲精品1区2区| 亚久久调教视频| 欧美成人午夜激情视频| 尤物九九久久国产精品的特点 | 国产精品日产欧美久久久久| 在线午夜精品| 亚洲性人人天天夜夜摸| 国产在线播精品第三| 麻豆国产精品va在线观看不卡| 久久久水蜜桃av免费网站| 亚洲欧洲综合| 一本久久综合| 国产一区视频在线看| 欧美高清在线| 国产精品高潮呻吟| 久久午夜电影| 欧美日韩免费观看一区=区三区| 亚洲欧美日韩一区二区三区在线观看| 亚洲欧美另类在线观看| 亚洲国产精品久久人人爱蜜臀| 亚洲乱码日产精品bd| 国产精品中文在线| 亚洲国产高清自拍| 国产农村妇女精品一区二区| 男人的天堂亚洲| 欧美四级伦理在线| 久久美女性网| 欧美日韩一区精品| 久久女同精品一区二区| 欧美人成网站| 久久久五月天| 国产精品久久国产精麻豆99网站| 久久一区二区三区国产精品| 欧美日韩1区2区| 六月丁香综合| 国产精品日韩欧美一区二区三区| 牛牛国产精品| 国产视频在线观看一区二区| 亚洲精品老司机| 在线视频成人| 久久av资源网| 午夜精品久久久久久久99热浪潮| 久久综合九九| 久久天堂成人| 国产日韩欧美综合一区| 中国成人亚色综合网站| 亚洲人成网站色ww在线| 久久se精品一区二区| 亚洲欧美日韩在线| 欧美日韩影院| 亚洲激情网站| 亚洲精品永久免费| 久久三级福利| 久久激情综合| 国产日韩一区二区三区| 亚洲一级高清| 亚洲欧美国产高清| 欧美日韩亚洲高清一区二区| 亚洲国产精品999| 亚洲精美视频| 欧美a级大片| 亚洲国产精品视频| 日韩视频精品| 欧美日韩国产综合视频在线观看 | 欧美成人一区二区三区| 国产主播精品在线| 欧美中文字幕视频在线观看| 欧美一区二区三区视频在线| 国产精品一区二区三区免费观看 | 亚洲欧美日韩中文在线制服| 亚洲欧美精品在线| 国产精品久久网站| 亚洲自拍偷拍麻豆| 欧美与黑人午夜性猛交久久久| 国产伦一区二区三区色一情| 亚洲影院在线观看| 久久久精品免费视频| 国产日韩在线视频| 久久久久国产精品人| 欧美成人精品| aa级大片欧美| 国产精品日韩久久久| 性欧美1819性猛交| 欧美高清在线视频| 在线亚洲精品| 国产婷婷色一区二区三区| 久久精品亚洲精品| 亚洲国产欧美在线人成| 亚洲免费中文| 伊人狠狠色丁香综合尤物| 欧美激情a∨在线视频播放| 在线视频精品| 久久在线精品| 亚洲一级黄色片| 国产在线国偷精品产拍免费yy| 久久久久91| 一本久久a久久免费精品不卡| 久久av免费一区| 亚洲精品1区2区| 国产精品亚洲激情| 欧美99久久| 欧美一级理论性理论a| 欧美激情一区二区三区| 午夜一区不卡| 亚洲国产视频一区| 国产麻豆91精品| 欧美久久婷婷综合色| 午夜精品区一区二区三| 亚洲人成在线观看| 久久国产乱子精品免费女 | 亚洲国产va精品久久久不卡综合| 欧美精品色综合| 欧美一区二区三区四区夜夜大片| 欧美护士18xxxxhd| 久久www免费人成看片高清| 亚洲国产裸拍裸体视频在线观看乱了| 国产精品av久久久久久麻豆网| 久久久久成人网| 亚洲欧美卡通另类91av| 99精品视频网| 亚洲激情第一页| 免费欧美网站| 久久久久久久久一区二区| 亚洲午夜国产一区99re久久| 亚洲国产综合91精品麻豆| 国产女人18毛片水18精品| 欧美午夜免费影院| 欧美区日韩区| 免费在线成人| 老巨人导航500精品| 欧美在线日韩精品| 欧美在线精品一区| 午夜精品久久久久久久99热浪潮 | 欧美一区二区三区四区在线观看| 亚洲人成网站影音先锋播放| 国内精品一区二区| 国产精品蜜臀在线观看| 欧美天天综合网| 欧美视频在线免费看| 欧美精品福利| 欧美伦理影院| 欧美—级高清免费播放| 欧美成人亚洲成人| 欧美精品久久久久久久| 欧美精品123区| 欧美日韩精品一区二区在线播放 | 国产精品夜夜夜| 国产精品久久久久久久久免费樱桃| 欧美日韩精品三区| 欧美日韩亚洲一区在线观看| 欧美日韩伊人| 国产精品爽黄69| 国产欧美亚洲一区| 国内一区二区三区在线视频| 狠狠色狠狠色综合系列| 亚洲第一视频| 99ri日韩精品视频| 亚洲伊人伊色伊影伊综合网| 午夜视频在线观看一区二区三区 | 亚洲精品久久久久久一区二区| 亚洲激情网址| 亚洲一区二区三区免费观看| 亚洲欧美国产精品va在线观看| 欧美一区三区二区在线观看| 久久久久99| 亚洲国产精品精华液网站| 亚洲人成高清| 亚洲欧美高清| 猫咪成人在线观看| 欧美色道久久88综合亚洲精品| 国产精品免费观看在线| 国户精品久久久久久久久久久不卡| 在线免费观看成人网| 99国产精品久久| 午夜在线视频观看日韩17c| 老鸭窝毛片一区二区三区| 亚洲福利电影| 亚洲一区二区三区在线看 | 午夜亚洲福利| 男女激情视频一区| 国产精品婷婷| 亚洲国产日韩欧美| 亚洲欧美日韩精品综合在线观看| 久久免费99精品久久久久久| 亚洲激情在线激情| 亚洲欧美日韩精品在线| 美女主播一区| 国产亚洲欧美中文| 亚洲美女中文字幕| 久久一综合视频| 亚洲一区二区三区色| 久久午夜电影网| 国产欧美短视频| 中文亚洲欧美| 欧美国产日韩精品免费观看| 亚洲欧美日韩视频一区| 欧美另类高清视频在线| 在线欧美视频| 久久久久一区二区三区四区| 亚洲精品自在久久|