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

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

?? duallistmanager.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)
, 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成年人午夜久久久| 综合久久一区二区三区| 免费成人在线视频观看| 欧美日韩亚洲综合一区二区三区| 亚洲蜜臀av乱码久久精品| 99riav一区二区三区| 亚洲欧美日韩国产另类专区| av中文字幕在线不卡| 亚洲欧美日韩在线| 欧美性色黄大片| 日日夜夜精品视频免费| 欧美电影免费观看高清完整版在线观看 | 91蜜桃在线免费视频| 17c精品麻豆一区二区免费| 99久久777色| 亚洲二区在线视频| 欧美大片一区二区| 粉嫩在线一区二区三区视频| 亚洲欧洲三级电影| 欧美视频中文字幕| 精品亚洲免费视频| 国产精品久线在线观看| 欧美亚一区二区| 蜜桃av一区二区三区电影| 久久精品亚洲精品国产欧美| 97se亚洲国产综合自在线| 香蕉av福利精品导航| 欧美精品一区二区三区蜜桃| 成人不卡免费av| 天天操天天综合网| 国产精品国产成人国产三级| 91免费观看视频| 蜜桃av一区二区三区| 国产精品久久午夜夜伦鲁鲁| 欧美日韩国产电影| 国产成人免费视频网站| 亚洲成a人片综合在线| 精品美女在线播放| 91精品1区2区| 国产精品18久久久久久久久| 亚洲高清免费观看 | 久久久精品天堂| 欧洲国内综合视频| 国产高清不卡一区| 婷婷国产在线综合| 亚洲欧洲三级电影| 精品国产一区二区在线观看| 在线观看国产精品网站| 国产精选一区二区三区| 亚洲线精品一区二区三区| 中文字幕免费一区| 日韩久久精品一区| 欧美日本在线一区| 91丨porny丨国产入口| 久久av资源网| 亚洲国产你懂的| 亚洲天堂网中文字| 国产精品入口麻豆原神| 精品日韩一区二区| 884aa四虎影成人精品一区| aaa亚洲精品| 国产成人午夜片在线观看高清观看| 午夜婷婷国产麻豆精品| 亚洲欧美一区二区久久| 中文字幕的久久| 日韩欧美中文字幕一区| 欧美日韩亚洲综合一区二区三区| 91在线视频免费91| www.亚洲在线| 成人a免费在线看| 久久精品噜噜噜成人av农村| 午夜伦欧美伦电影理论片| 亚洲一区二区影院| 亚洲免费在线观看| 亚洲三级免费观看| 亚洲男人都懂的| 亚洲最大成人网4388xx| 亚洲精品日产精品乱码不卡| 一区在线中文字幕| 亚洲欧洲日韩一区二区三区| 中文字幕欧美激情| 中国色在线观看另类| 欧美国产综合色视频| 国产亚洲综合性久久久影院| 欧美精品一区二区三区蜜桃视频| 精品粉嫩超白一线天av| 久久日韩粉嫩一区二区三区| 欧美不卡一区二区三区四区| 日韩欧美一区二区视频| 精品国产亚洲在线| 精品电影一区二区三区| 国产色综合久久| 国产精品免费丝袜| 亚洲三级小视频| 亚洲综合一区二区三区| 亚洲国产综合色| 日韩和的一区二区| 久久99精品久久久久婷婷| 久久机这里只有精品| 国产在线播放一区二区三区| 国产成人免费视频精品含羞草妖精 | 久久国产精品免费| 国产一区二区三区四区五区美女 | 欧美三级中文字幕| 欧美一区二区三区在| 久久久精品国产免大香伊| 国产欧美日韩在线看| 亚洲你懂的在线视频| 日韩一区精品视频| 国产精品77777竹菊影视小说| av中文字幕不卡| 色拍拍在线精品视频8848| 欧美日韩aaaaa| 久久久亚洲高清| 亚洲欧美经典视频| 免费看黄色91| 成人小视频免费观看| 欧美色综合网站| 日韩你懂的电影在线观看| 国产精品三级在线观看| 亚洲国产欧美在线| 国产在线一区观看| 在线观看免费成人| 亚洲福利一二三区| 国内精品视频666| 91免费看片在线观看| 欧美一区二区三区啪啪| 国产精品丝袜一区| 无吗不卡中文字幕| 不卡一区二区三区四区| 日韩一区二区在线观看视频播放 | 中文字幕日本不卡| 麻豆高清免费国产一区| 色综合色综合色综合| 欧美成va人片在线观看| 亚洲一区二区四区蜜桃| 夫妻av一区二区| 欧美电视剧免费全集观看| 亚洲视频一二三| 国产乱码精品一区二区三区av | 丰满少妇在线播放bd日韩电影| 欧美日韩五月天| 1区2区3区精品视频| 国产资源精品在线观看| 欧美日韩激情在线| 成人欧美一区二区三区白人 | 精品理论电影在线| 午夜免费久久看| 色综合久久久久综合体| 久久久99免费| 久久se精品一区二区| 欧美精品久久一区| 亚洲与欧洲av电影| 91在线观看成人| 国产午夜精品一区二区三区视频| 麻豆免费精品视频| 欧美日韩国产欧美日美国产精品| 国产精品国产三级国产aⅴ无密码| 国产一区亚洲一区| 日韩精品一区二| 麻豆国产精品一区二区三区| 69久久99精品久久久久婷婷 | 亚洲一区二区在线观看视频| 97成人超碰视| 国产精品天美传媒| 成人午夜视频福利| 中文字幕+乱码+中文字幕一区| 经典三级视频一区| 日韩午夜在线观看| 免费黄网站欧美| 欧美成人精品高清在线播放| 人人爽香蕉精品| 91精品国产色综合久久久蜜香臀| 午夜久久久久久久久| 欧美日韩五月天| 免费观看久久久4p| 日韩精品一区二区三区视频 | 自拍偷拍国产精品| 99国产精品久久久久久久久久| 亚洲va欧美va天堂v国产综合| 99久久综合精品| 亚洲人午夜精品天堂一二香蕉| 99久久亚洲一区二区三区青草| 中文字幕在线不卡| 色综合天天做天天爱| 依依成人综合视频| 欧美性猛片aaaaaaa做受| 午夜久久久久久久久| 日韩一区二区麻豆国产| 国产伦理精品不卡| 中文幕一区二区三区久久蜜桃| 国产suv精品一区二区883| 国产精品卡一卡二| 欧美专区日韩专区| 视频一区视频二区中文| 精品国一区二区三区| av一区二区三区| 亚洲精品精品亚洲| 欧美一区二区免费| 国产激情视频一区二区在线观看|