亚洲欧美第一页_禁久久精品乱码_粉嫩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| 亚洲一区二区三区免费视频| 激情图片小说一区| 日韩精品最新网址| 国产精品综合二区| 中文字幕视频一区二区三区久| 国产91富婆露脸刺激对白| 国产精品色婷婷| av电影在线观看完整版一区二区| 亚洲精品亚洲人成人网| 欧美日韩中字一区| 久久99热狠狠色一区二区| 精品国产成人系列| 成人午夜免费av| 亚洲免费在线观看| 欧美伦理电影网| 国产一区啦啦啦在线观看| 国产女人水真多18毛片18精品视频| 91免费看片在线观看| 亚洲一区在线免费观看| 日韩欧美123| 成人视屏免费看| 亚洲国产欧美在线| 日韩欧美国产午夜精品| 成人午夜视频福利| 午夜久久久久久久久久一区二区| 欧美成人伊人久久综合网| av中文字幕亚洲| 亚洲激情自拍偷拍| 久久久久久亚洲综合| 91小视频在线观看| 久久精品噜噜噜成人av农村| 国产精品区一区二区三区| 欧美日韩免费一区二区三区视频| 国内精品在线播放| 亚洲一区二区三区不卡国产欧美| 欧美成人a∨高清免费观看| 91香蕉视频mp4| 九一久久久久久| 亚洲在线观看免费视频| 26uuu久久天堂性欧美| 91福利国产成人精品照片| 麻豆免费看一区二区三区| 亚洲精选免费视频| 欧美韩国日本综合| 日韩欧美一区二区免费| 91免费观看国产| 国产精品夜夜嗨| 午夜伦欧美伦电影理论片| 中文字幕一区二区三中文字幕| 欧美一级二级三级乱码| 色8久久人人97超碰香蕉987| 国产伦精品一区二区三区免费 | 国内精品国产成人| 亚洲一级片在线观看| 国产亚洲精品超碰| 日韩精品综合一本久道在线视频| 色婷婷精品久久二区二区蜜臀av | 成人国产一区二区三区精品| 天天色 色综合| 亚洲欧美色一区| 国产精品区一区二区三区| 久久久久久久综合日本| 日韩精品一区二区三区视频在线观看| 91在线你懂得| 91啪在线观看| 色悠悠亚洲一区二区| 丁香另类激情小说| 国产成人精品亚洲777人妖 | 高清视频一区二区| 精品一区二区三区蜜桃| 日韩av在线发布| 亚洲电影一级片| 亚洲午夜日本在线观看| 亚洲人123区| 17c精品麻豆一区二区免费| 中文字幕欧美国产| 亚洲国产精品99久久久久久久久| 亚洲精品一区二区三区香蕉| 欧美sm极限捆绑bd| 精品久久国产老人久久综合| 精品久久久久久久久久久久包黑料| 7777精品伊人久久久大香线蕉的| 欧美喷水一区二区| 欧美高清精品3d| 日韩美女一区二区三区四区| 日韩精品一区二区三区在线观看 | 亚洲综合男人的天堂| 一区二区三区美女| 亚洲在线观看免费| 五月天欧美精品| 午夜成人在线视频| 激情五月激情综合网| 国产精品香蕉一区二区三区| 成熟亚洲日本毛茸茸凸凹| 大美女一区二区三区| 99精品1区2区| 欧美午夜精品一区二区三区| 777奇米四色成人影色区| 日韩欧美一二三区| 中文字幕免费不卡| 一区二区三区四区高清精品免费观看| 一区二区高清免费观看影视大全| 亚洲激情男女视频| 久久精品噜噜噜成人av农村| 国产成a人亚洲精品| 欧美性大战久久久久久久蜜臀| 4438成人网| 国产亚洲综合色| 亚洲色欲色欲www| 日本美女一区二区| 国产精品综合av一区二区国产馆| 色婷婷亚洲一区二区三区| 欧美日韩国产综合视频在线观看| 日韩欧美在线网站| 国产精品成人网| 亚洲午夜久久久久久久久电影院 | 亚洲最新在线观看| 日本不卡123| 成人在线视频一区二区| 欧美精品亚洲一区二区在线播放| 欧美mv日韩mv国产| 亚洲一区在线视频| 国产酒店精品激情| 欧美视频一区二| 久久久亚洲精华液精华液精华液| 亚洲精品视频一区二区| 激情国产一区二区| 欧美日韩在线播放三区四区| wwwwww.欧美系列| 香蕉av福利精品导航| 成人h动漫精品一区二区| 在线播放91灌醉迷j高跟美女| 久久久久久亚洲综合影院红桃 | 极品少妇xxxx精品少妇| 91麻豆自制传媒国产之光| 日韩一级免费观看| 亚洲一区二区成人在线观看| 国产成人亚洲综合色影视| 91精品欧美久久久久久动漫| 国产精品久久久久久久第一福利| 六月丁香婷婷久久| 在线观看日韩电影| 日韩一区在线看| 国产91精品在线观看| 精品国产一二三| 日本欧美韩国一区三区| 在线视频国产一区| 日韩一区在线播放| 成人教育av在线| 国产欧美日韩综合精品一区二区| 美女一区二区三区在线观看| 欧美日韩久久一区| 亚洲风情在线资源站| 色欧美片视频在线观看在线视频| 国产欧美一区在线| 国产aⅴ综合色| 精品国产一二三| 国内成+人亚洲+欧美+综合在线| 欧美男女性生活在线直播观看| 一区二区三区四区不卡在线| av一区二区三区在线| 国产精品久久久久久久久动漫 | 国产成人精品一区二 | 国产蜜臀av在线一区二区三区| 秋霞电影一区二区| 欧美一区二区在线视频| 日本成人超碰在线观看| 欧美日韩精品一区二区天天拍小说| 亚洲人成在线观看一区二区| 成人黄色777网| 亚洲伦在线观看| 91蜜桃在线观看| 亚洲与欧洲av电影| 欧美视频在线一区| 婷婷综合另类小说色区| 欧美日韩dvd在线观看| 五月开心婷婷久久| 日韩欧美黄色影院| 福利一区福利二区| 国产精品午夜在线| 91猫先生在线| 亚瑟在线精品视频| 日韩精品在线看片z| 国产乱码精品一区二区三区五月婷| 久久久青草青青国产亚洲免观| 国产在线精品一区二区不卡了| 国产精品视频免费| 91免费观看在线| 天堂久久一区二区三区| 精品久久久三级丝袜| 丁香六月久久综合狠狠色| 一区二区三区高清在线| 欧美日韩一区二区三区高清| 免费观看在线色综合| 欧美国产禁国产网站cc| 色88888久久久久久影院按摩| 奇米精品一区二区三区在线观看 | 国产精品久久久久久久午夜片| 99re热视频精品|