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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dduallistmanager.cpp

?? 這個程序是有關于考勤的應用系統
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
///////////////////////////////////////////////////////////////////////////////
//
//  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)
{
}

///////////////////////////////////////////////////////////////////////////////
//
//  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)
{
    // 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;

    // 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.
    m_ctrlAvailableList.Attach(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();
}


///////////////////////////////////////////////////////////////////////////////
//
//  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:
//

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频资源站| 亚洲视频在线一区二区| 国产精品成人免费精品自在线观看| 亚洲视频中文字幕| 国产一区二区导航在线播放| 欧美精品欧美精品系列| 国产精品你懂的在线| 精品在线一区二区| 欧美精品日韩精品| 午夜私人影院久久久久| 成人免费视频一区二区| 亚洲精品一区二区三区蜜桃下载| 亚洲国产另类av| 99久久久精品免费观看国产蜜| 欧美xxxx在线观看| 亚洲成人7777| 91黄色免费看| 亚洲视频一区在线| 成人av电影在线观看| 日本一二三四高清不卡| 精品午夜久久福利影院| 欧美精品xxxxbbbb| 亚洲国产精品久久久男人的天堂| av亚洲产国偷v产偷v自拍| 国产日韩欧美一区二区三区乱码 | 一区二区三区丝袜| 成人av在线资源网| 国产精品久久久久久久久免费相片| 精品一区二区三区在线播放 | 色香蕉成人二区免费| 中文字幕一区二区三区乱码在线 | 欧美疯狂做受xxxx富婆| 亚洲在线一区二区三区| 欧美视频一区二| 天堂蜜桃一区二区三区| 制服丝袜亚洲网站| 免费av成人在线| 久久综合九色综合97_久久久| 精品一区二区三区的国产在线播放| 日韩欧美在线影院| 国产麻豆视频一区| 18涩涩午夜精品.www| 色天使久久综合网天天| 亚洲成人动漫精品| 精品999在线播放| 成人午夜av电影| 亚洲欧洲制服丝袜| 欧美精品电影在线播放| 激情成人午夜视频| 国产精品久线在线观看| 91国产免费观看| 首页综合国产亚洲丝袜| 精品国产乱码久久久久久闺蜜| 国产一区二区视频在线播放| 日韩一区欧美小说| 欧美片在线播放| 国产一区二区网址| 一区二区三区中文字幕| 日韩午夜在线播放| 成人一道本在线| 亚洲一区二区三区四区在线免费观看 | 免费成人在线视频观看| 久久精品夜夜夜夜久久| 色天天综合色天天久久| 久久成人免费网站| 亚洲人成人一区二区在线观看| 欧美妇女性影城| av午夜一区麻豆| 久久99久久久欧美国产| 亚洲视频资源在线| 国产视频一区在线播放| 日本乱码高清不卡字幕| 黄色日韩三级电影| 亚洲综合色视频| 国产亚洲精品久| 欧美精品在线一区二区| 91在线视频官网| 久久机这里只有精品| 亚洲乱码精品一二三四区日韩在线| 欧美福利电影网| 一本久久精品一区二区| 韩国一区二区视频| 日韩精品成人一区二区在线| 中文一区在线播放| 欧美成人免费网站| 欧美三日本三级三级在线播放| 国产精品69毛片高清亚洲| 亚洲国产乱码最新视频| 综合欧美亚洲日本| 欧美极品xxx| 精品国产乱码久久久久久蜜臀| 欧美日精品一区视频| 99久久久无码国产精品| 国产精品一色哟哟哟| 日本不卡123| 香蕉久久夜色精品国产使用方法 | 日韩国产精品久久| 伊人开心综合网| 中文字幕不卡一区| 久久网站热最新地址| 日韩欧美国产综合在线一区二区三区| 色婷婷激情综合| eeuss鲁一区二区三区| 国产黄人亚洲片| 国产精品996| 韩日av一区二区| 国内外成人在线| 久久精品噜噜噜成人av农村| 日本成人在线电影网| 日韩精品亚洲一区二区三区免费| 一区二区三区成人| 亚洲综合区在线| 亚洲免费观看在线视频| 亚洲视频一区二区免费在线观看| 欧美高清在线精品一区| 国产精品久久久久久亚洲毛片| 国产欧美中文在线| 国产精品国产自产拍高清av| 国产农村妇女毛片精品久久麻豆 | 欧美在线小视频| 91福利区一区二区三区| 欧美在线免费播放| 欧美日韩久久久久久| 欧美精品少妇一区二区三区| 欧美在线观看你懂的| 91麻豆精品国产91久久久更新时间 | 亚洲国产cao| 偷窥少妇高潮呻吟av久久免费| 天天做天天摸天天爽国产一区| 亚洲国产精品一区二区www在线 | 1区2区3区国产精品| 亚洲精品免费视频| 日韩一区精品视频| 国产精品一区不卡| 日本精品一区二区三区高清| 欧美日韩不卡一区二区| 精品久久久久久无| 国产精品久久99| 亚洲一卡二卡三卡四卡无卡久久| 日韩高清欧美激情| 国产不卡在线视频| 在线一区二区三区| 日韩一区二区三区观看| 欧美高清在线视频| 三级欧美在线一区| 成人激情电影免费在线观看| 欧美视频你懂的| 精品欧美乱码久久久久久| 国产精品美女久久久久久久久久久| 亚洲激情网站免费观看| 久久精品国产999大香线蕉| 丁香天五香天堂综合| 9191久久久久久久久久久| 国产亚洲精品免费| 天天色天天操综合| 97久久超碰精品国产| 日韩一级欧美一级| 亚洲欧洲中文日韩久久av乱码| 男人的天堂久久精品| 99精品久久只有精品| 日韩免费观看高清完整版 | 色婷婷综合五月| 久久品道一品道久久精品| 亚洲精品国久久99热| 国产中文字幕一区| 欧美久久一区二区| 国产精品久久久久久久久晋中| 美女在线观看视频一区二区| 欧美综合天天夜夜久久| 国产精品国产三级国产专播品爱网 | 久久久欧美精品sm网站| 天天做天天摸天天爽国产一区 | 亚洲精品一二三| 国产成人精品网址| 日韩欧美专区在线| 亚洲高清免费观看| 91黄色免费看| 亚洲日本在线a| www.日韩av| 国产精品欧美精品| 国产精品综合久久| 日韩精品一区二区三区三区免费 | 欧美一区二区三级| 亚洲五码中文字幕| 91久久香蕉国产日韩欧美9色| 中文av一区二区| 国产乱码精品一区二区三区五月婷| 欧美一区二区三区小说| 亚洲国产成人高清精品| 欧美三级日韩三级国产三级| 亚洲女人****多毛耸耸8| av男人天堂一区| 亚洲人成网站在线| 色哟哟国产精品| 亚洲欧美日韩中文播放| 99久久国产免费看| 亚洲欧美韩国综合色| 欧美中文字幕一区二区三区| 亚洲一区二区三区四区在线免费观看| 色香蕉久久蜜桃|