亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? duallistmanager.cpp

?? 這是一個(gè)經(jīng)典畢業(yè)設(shè)計(jì)
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
///////////////////////////////////////////////////////////////////////////////
//
//  Filename:       DualListManager.cpp
//
//  AUTHOR     :    Copyright (C) Steve Aube, February 2000
//                  SteveAube@yahoo.com
//
//                  You can reuse and redistribute this code, provided this 
//                  header is kept as is.
//
//  Description:    This class is intended to handle moving item between two
//                  listboxes. One list represents the list of available items
//                  and the other represents the list of choosen items. This
//                  class is intended to be a member of CDialog, CFormView or
//                  CPropertyPage. All the parent class has to do is properly 
//                  initialize this class and call a couple of member functions
//                  and this class will take care of the following things:
//                  - If the "Add" button is pressed the selected item(s) are
//                    moved from the available list to the choosen list.
//                  - If the "Add All" button is pressed all of the items in
//                    are moved from the available list to the choosen list.
//                  - If the "Remove" button is pressed the selected item(s) 
//                    are moved from the choosen list to the available list.
//                  - If the "Remove All" button is pressed all of the items in
//                    are moved from the choosen list to the available list.
//                  - If the "Move Up" button is pressed the selected item(s)
//                    in the choosen list are moved up in the list by one.
//                    This button can be pressed repeatedly until all of the 
//                    selected items have reached the top of the list. When
//                    that occurs the button is disabled.
//                  - If the "Move Down" button is pressed the selected item(s)
//                    in the choosen list are moved down in the list by one.
//                  - Allows double clicking on an item to move it to the
//                    opposite list.
//                  - When item(s) are moved from one list to another the 
//                    item that was moved is selected in the list it was moved
//                    to. The list that had the item removed selects the item
//                    that is at the location of the first item that was moved.
//                    If the item at the bottom of the list is moved the item
//                    immediately above it is selected. If the last item in 
//                    the list is removed there is no selection.
//                  - Enabling/disabling of buttons - when items are moved 
//                    between lists and up and down in the choosen list the 
//                    availability of buttons changes. For instance if an item
//                    is moved to the top of the choosen list the "Move Up" 
//                    button doesn't make sense. When this occurs the "Move Up"
//                    button is automatically disabled.
//                  - Keyboard support - disabling a button that has the focus
//                    causes problems for keyboard users. This code checks to 
//                    see if a button has the focus before it disables it. If
//                    it does the focus is forwarded to the next avaiabled 
//                    control.
//                  
//                  How to use this class:
//                  - Add a member variable of this class type to the dialog
//                    box, property page or form view where you want to use it.
//                  - From the initialization method (OnInitDialog() for a 
//                    dialog box and a property page and OnInitialUpdate() for
//                    a view) do the following things in this order:
//                    - Add the items to the available and choosen lists with
//                      the calls AddItemToAvailableList(...) and 
//                      AddItemToChoosenList(...). The first parameter is the
//                      name of the item and the second parameter is a unique
//                      identifier for the item.
//                    - Call InitializeControls(...) with a pointer the parent
//                      window and the IDs of all of the controls.
//                  - Override OnCmdMsg(...) 
//                  
//                  Notes:
//                  - If you don't need certain features (like the ability to
//                    move an item up or down in the choosen list) simply
//                    provide a NULL value for that id. The rest of the class
//                    will continue work correctly. The IDs for the two lists
//                    are required since a dual list manager doesn't make sense
//                    unless it has two lists to work with.
//                  - This code will work with single, multiple and extended
//                    listboxes.
//                  - The order of the controls doesn't matter. You can put 
//                    the choosen list on the left, right, top or bottom of the
//                    selected list. Just make sure you supply the control IDs
//                    in the right order.
//                  
//                  Implementation details:
//                  This class keeps track of the items in both listboxes in
//                  internal CArrays. The names associated with the items
//                  are tracked in a CMap and the item data value is used as
//                  the key. Keeping these separate lists simplfies moving
//                  items and keeping track of selection state.
//
////////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DualListManager.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


///////////////////////////////////////////////////////////////////////////////
//
//  Method:			CDualListManager
//
//  Purpose:		Constructor - initializes member data
//
//  Inputs:
//
//		void
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		None
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
CDualListManager::CDualListManager(void)
: m_pWndParent(NULL)
, m_iIDAvailableList(0)
, m_iIDChoosenList(0)
, m_iIDAddButton(0)
, m_iIDAddAllButton(0)
, m_iIDRemoveButton(0)
, m_iIDRemoveAllButton(0)
, m_iIDMoveUpButton(0)
, m_iIDMoveDownButton(0)
, m_bAvailableListSingleSelType(0)
, m_bChoosenListSingleSelType(0)
, m_bIsCur(false)
{
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			~CDualListManager
//
//  Purpose:		Destructor - detach the listbox handles
//
//  Inputs:
//
//      void
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		None
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
CDualListManager::~CDualListManager(void)
{
    m_ctrlAvailableList.Detach();
    m_ctrlChoosenList.Detach();
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			InitializeControls
//
//                  Should be called from the initialization method 
//                  (OnInitDialog() for a dialog box and a property page and 
//                  OnInitialUpdate() for a view). Before calling this method 
//                  the client code should add the listbox items to the two 
//                  lists with calls to AddItemToAvailableList(...) and 
//                  AddItemToChoosenList(...). 
//                  
//                  This method sets up this class to handle all of the 
//                  messages for the given controls.
//  Inputs:
//
//		CWnd*  pWndParent   - pointer to the parent window (should be a CDialog
//                            CPropertyPage, CFormView etc.)
//
//		int    iIDAvailableList - resource id of the available listbox
//
//		int    iIDChoosenList - resource id of the choosen listbox
//
//		int    iIDAddButton - resource id of the add button
//
//		int    iIDAddAllButton - resource id of the add all button
//
//		int    iIDRemoveButton - resource id of the remove button
//
//		int    iIDRemoveAllButton - resource id of the remove all button
//
//		int    iIDMoveUpButton - resource id of the up button
//
//		int    iIDMoveDownButton - resource id of the down button
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::InitializeControls(CWnd*  pWndParent,
                                         int    iIDAvailableList,
                                         int    iIDChoosenList,
                                         int    iIDAddButton,
                                         int    iIDAddAllButton,
                                         int    iIDRemoveButton,
                                         int    iIDRemoveAllButton,
                                         int    iIDMoveUpButton,
                                         int    iIDMoveDownButton,
										 bool	bIsCur)
{
    // Hold on to all of the passed in parameters.
    m_pWndParent = pWndParent;
    m_iIDAvailableList = iIDAvailableList;
    m_iIDChoosenList = iIDChoosenList;
    m_iIDAddButton = iIDAddButton;
    m_iIDAddAllButton = iIDAddAllButton;
    m_iIDRemoveButton = iIDRemoveButton;
    m_iIDRemoveAllButton = iIDRemoveAllButton;
    m_iIDMoveUpButton = iIDMoveUpButton;
    m_iIDMoveDownButton = iIDMoveDownButton;
    m_bAvailableListSingleSelType = FALSE;
    m_bChoosenListSingleSelType = FALSE;
	m_bIsCur = bIsCur;

    // This class doesn't make sense unless a parent window and two listboxes 
    // are supplied. It also doesn't make sense without at least some of the 
    // other controls. However, there is no specific set of controls that are 
    // required so no checks are done here.
    ASSERT(m_pWndParent);
    ASSERT(m_iIDAvailableList);
    ASSERT(m_iIDChoosenList);

    // Attach the control items to the windows. The lists have to exist and we
    // access them continually so having a listbox control just simplifies this
    // code.
	HWND h=m_pWndParent->GetDlgItem(m_iIDAvailableList)->GetSafeHwnd();
    m_ctrlAvailableList.Attach(h);//m_pWndParent->GetDlgItem(m_iIDAvailableList)->GetSafeHwnd());
    m_ctrlChoosenList.Attach(m_pWndParent->GetDlgItem(m_iIDChoosenList)->GetSafeHwnd());

    // Check to see whether each list is a single or multi select listbox
    m_bAvailableListSingleSelType = (m_ctrlAvailableList.GetStyle() & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL) ) ? FALSE: TRUE ;
    m_bChoosenListSingleSelType   = (m_ctrlChoosenList.GetStyle() & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL) ) ? FALSE: TRUE ;

    // Re-fill the listboxes with the contents of the array
    FillListboxes();

    // Select the first item in each of the listboxes
    SelectLBItem(m_ctrlAvailableList, 0);
    SelectLBItem(m_ctrlChoosenList, 0);

    // Now enable/disable the move buttons based on the contents and selction 
    // state of the listbox controls.
    EnableButtons(bIsCur);
}


///////////////////////////////////////////////////////////////////////////////
//
//  Method:			AddItemToAvailableList
//
//  Purpose:		Adds the passed in item to the array of items identified
//                  as being currently available for selection.  Also adds the 
//                  item to the map so the name can be looked up later.
//
//  Inputs:
//
//		LPCTSTR lpszItem
//
//		long lItemData
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::AddItemToAvailableList(LPCTSTR lpszItem, long lItemData)
{
    m_ArrayAvailable.Add(lItemData);
    m_KeyMap.SetAt(lItemData, lpszItem);
}


///////////////////////////////////////////////////////////////////////////////
//
//  Method:			AddItemToChoosenList
//
//  Purpose:		Adds the passed in item to the array of items identified
//                  as being currently choosen. Also adds the item to the
//                  map so the name can be looked up later.
//
//  Inputs:
//
//		LPCTSTR lpszItem
//
//		long lItemData
//
//  Outputs:
//
//		None

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产在天天线2019| 日韩欧美美女一区二区三区| 91欧美一区二区| 久久蜜桃av一区精品变态类天堂| 精彩视频一区二区三区| 久久av中文字幕片| 国产精品超碰97尤物18| 亚洲日本护士毛茸茸| 亚洲永久精品大片| 久久99久久99小草精品免视看| 日韩欧美在线网站| 成人精品国产免费网站| 欧美日韩国产成人在线免费| 欧美精品一区二区三区蜜桃视频 | 国产成人av资源| 欧美色精品在线视频| 久久先锋影音av| 日韩电影在线一区二区三区| 精品国免费一区二区三区| 国产精品成人免费精品自在线观看 | 懂色中文一区二区在线播放| 日韩毛片高清在线播放| 美女网站色91| 欧美性大战xxxxx久久久| 日本一区二区电影| 精品国产3级a| 日韩激情一区二区| 欧美专区日韩专区| 亚洲欧洲制服丝袜| 99久久精品免费看国产| 久久香蕉国产线看观看99| 久久91精品国产91久久小草| 亚洲愉拍自拍另类高清精品| 国产精品免费av| 国产精品久久久久久久蜜臀| 蜜臂av日日欢夜夜爽一区| 日本强好片久久久久久aaa| 日本久久一区二区三区| 亚洲欧美一区二区在线观看| 成人美女视频在线看| 久久久无码精品亚洲日韩按摩| 欧美tickling挠脚心丨vk| 麻豆成人免费电影| 久久先锋影音av鲁色资源| 国产原创一区二区| 中文字幕乱码日本亚洲一区二区| 国产精品视频看| 99精品桃花视频在线观看| 亚洲黄色性网站| 欧美日韩美少妇| 麻豆极品一区二区三区| 国产三级三级三级精品8ⅰ区| 国产精品久久久久久久岛一牛影视 | 久久久天堂av| 91捆绑美女网站| 午夜av区久久| 国产精品免费网站在线观看| 亚洲国产日产av| 日韩精品中文字幕一区| 亚洲精品国产精华液| 欧美电视剧免费观看| 国产成人精品免费| 日韩成人免费电影| 91国产免费观看| 国产成人精品aa毛片| 日韩av电影免费观看高清完整版 | 在线综合亚洲欧美在线视频| 免费xxxx性欧美18vr| 欧美一区午夜视频在线观看| 不卡一区二区中文字幕| 免费视频最近日韩| 亚洲麻豆国产自偷在线| 国产一区啦啦啦在线观看| 国产精品美女久久久久高潮| 欧美美女bb生活片| 成人一级片网址| 日韩精品成人一区二区在线| 亚洲特黄一级片| 亚洲国产精品国自产拍av| 91精品国产入口| 亚洲美女淫视频| 91免费观看视频在线| 国产精品中文字幕日韩精品 | 国产精品99久久久久久似苏梦涵| 欧美一区二区三区系列电影| 91小视频在线| 国产成人亚洲综合a∨婷婷 | 在线免费观看日本一区| 丰满少妇在线播放bd日韩电影| 6080日韩午夜伦伦午夜伦| 色94色欧美sute亚洲线路一久| 国产婷婷色一区二区三区在线| 免费人成在线不卡| 在线视频观看一区| 日本韩国精品在线| 亚洲国产日日夜夜| 911精品国产一区二区在线| 懂色av一区二区夜夜嗨| 尤物在线观看一区| 欧美羞羞免费网站| 欧美日韩国产精品成人| 欧美久久久久久蜜桃| 91精品久久久久久蜜臀| 欧美一级夜夜爽| 国产成人啪免费观看软件| 粉嫩aⅴ一区二区三区四区| 91亚洲精品乱码久久久久久蜜桃| 国产精品沙发午睡系列990531| 丁香啪啪综合成人亚洲小说 | 欧美电影免费观看高清完整版| 黄色资源网久久资源365| 国产一区二三区| 亚洲一二三级电影| 国产精品自在在线| 天堂一区二区在线| 亚洲欧美自拍偷拍色图| 日韩成人av影视| 成人av手机在线观看| 蜜臀av一区二区在线免费观看| 日韩伦理电影网| 极品少妇xxxx精品少妇| 一区二区三区四区在线免费观看 | 国产精品久久久久久久裸模| 91精品国产综合久久精品麻豆| 国产精品123区| 日韩欧美在线网站| 亚洲另类在线一区| 另类综合日韩欧美亚洲| 欧美丝袜丝交足nylons| 国产精品动漫网站| 国产一区二区三区日韩| 欧美日韩亚洲综合| 一区二区高清视频在线观看| 国产高清视频一区| 亚洲国产精品二十页| 欧美韩日一区二区三区四区| 精品中文字幕一区二区| 欧美va在线播放| 国产欧美日韩在线观看| 国产亚洲成av人在线观看导航| 久久久www免费人成精品| 裸体在线国模精品偷拍| 国产清纯在线一区二区www| 激情另类小说区图片区视频区| 国产一区二区在线视频| 从欧美一区二区三区| 色综合天天综合给合国产| 亚洲精品乱码久久久久久久久 | 国产在线播精品第三| 色av成人天堂桃色av| 日韩一级免费观看| 国产精品一区二区免费不卡| 国产精品女主播在线观看| 91久久精品一区二区| 久久香蕉国产线看观看99| 成人97人人超碰人人99| 国产一区二区三区av电影| 成人免费视频在线观看| 欧美一二三区在线观看| 欧洲一区二区av| 久久成人麻豆午夜电影| 亚洲少妇最新在线视频| 日韩一二三区不卡| 91免费视频网址| 国产成人免费在线视频| 日韩精品一级二级| 日韩美女视频19| 久久久久久久久久久99999| 欧美精品视频www在线观看| 国产人成亚洲第一网站在线播放| 免费观看在线综合色| 亚洲伦理在线精品| 国产一区中文字幕| 毛片一区二区三区| 日韩精品一区二| 青椒成人免费视频| 亚洲电影视频在线| 亚洲一区二区三区视频在线播放 | 亚洲人成人一区二区在线观看| 国产在线精品免费| 2020国产精品| 国产午夜亚洲精品午夜鲁丝片| 亚洲bt欧美bt精品| 精品国产露脸精彩对白| fc2成人免费人成在线观看播放 | 精一区二区三区| 激情综合网av| 中文字幕五月欧美| 亚洲日本中文字幕区| 亚洲一区二区精品3399| 狠狠狠色丁香婷婷综合激情| 国产高清不卡一区| 成人黄色电影在线| 视频一区二区中文字幕| 精品久久国产字幕高潮| 国产毛片精品视频| 亚洲成人免费在线观看| 另类小说视频一区二区| 成人动漫视频在线| 一区二区三区四区精品在线视频|