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

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

?? duallistmanager.cpp

?? 這是一個經(jīng)典畢業(yè)設計
?? CPP
?? 第 1 頁 / 共 3 頁
字號:

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			EnableButtons
//
//  Purpose:		Enables/disables all of the buttons Add; Add All; Remove: 
//                  Remove All; Move Up; Move Down; based on the contents and 
//                  selction state of the listbox controls.
//
//  Inputs:
//
//		void
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::EnableButtons(bool bIsCur)//void
{
    int     iSelCountAvailable;
    int     iCountAvailable    = m_ctrlAvailableList.GetCount();
    int     iSelCountChoosen   = m_ctrlChoosenList.GetSelCount();
    int     iCountChoosen      = m_ctrlChoosenList.GetCount();

    // If either of the listboxes are single selection listboxes the call to 
    // GetSelCount() will return -1 even if an item is selected. This code 
    // checks the style flag for each control and calls GetCurSel or 
    // GetSelCount depending on which style the given listbox has.
    // Get the count for the available list
    if(TRUE == m_bAvailableListSingleSelType)
    {
        iSelCountAvailable = (-1 == m_ctrlAvailableList.GetCurSel()) ? 0 : 1;
    }
    else
    {
        iSelCountAvailable = m_ctrlAvailableList.GetSelCount();
    }
    // Get the count for the choosen list
    if(TRUE == m_bChoosenListSingleSelType)
    {
        iSelCountChoosen = (-1 == m_ctrlChoosenList.GetCurSel()) ? 0 : 1;
    }
    else
    {
        iSelCountChoosen = m_ctrlChoosenList.GetSelCount();
    }

    BOOL    bEnableMoveUp   = FALSE;
    BOOL    bEnableMoveDown = FALSE;

    // Now enable/disable the move buttons based on the contents and selction 
    // state of the listbox controls.
    EnableWindow( m_iIDAddButton, iSelCountAvailable > 0 ? bIsCur : FALSE);
    EnableWindow( m_iIDAddAllButton, iCountAvailable > 0 ? bIsCur : FALSE);
    EnableWindow( m_iIDRemoveButton, iSelCountChoosen > 0 ? bIsCur : FALSE);
    EnableWindow( m_iIDRemoveAllButton, iCountChoosen > 0 ? bIsCur : FALSE);

    // Determine whether or not the up and down buttons should be enabled or
    // disabled based on what is selected and where it is in the list.
    if(0 < iSelCountChoosen)
    {
        int     iSelFirst = -1, iSelLast = -1;

        // Loop through all of the items in the list.
        for(int iIndex = 0; iIndex < iCountChoosen; ++iIndex)
        {
            // Check if this item is selected.
            if( 0 < m_ctrlChoosenList.GetSel( iIndex ) )
            {
                if(-1 == iSelFirst)
                {
                    iSelFirst = iIndex;
                }
                iSelLast = iIndex;
            }
        }

        // Up is disabled if all of the selected items are at the top of the listbox
        bEnableMoveUp   = (iSelFirst == 0 &&  (iSelLast - iSelFirst + 1) == iSelCountChoosen)
                          ? FALSE: TRUE;

        // Down is disabled if all of the selected items are at the bottom of the listbox
        bEnableMoveDown = (iSelLast == iCountChoosen - 1  &&  (iSelLast - iSelFirst + 1) == iSelCountChoosen)
                          ? FALSE: TRUE;
    }

    // Enable/disable the up and down buttons
    EnableWindow(m_iIDMoveUpButton, bEnableMoveUp);
    EnableWindow(m_iIDMoveDownButton, bEnableMoveDown);
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			EnableWindow
//
//  Purpose:		Enables/disables a control based on the contents and 
//                  selection state of the listboxes. Advances the focus to the
//                  next control if the control being disabled has the focus.
//
//  Inputs:
//
//		int iIDControl
//
//		BOOL bEnable
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::EnableWindow(int iIDControl, BOOL bEnable)
{
    // If we are about to disable a control and it is the control that currently
    // has the focus advance the focus to the next control before disabling it.
    CWnd * pWnd = m_pWndParent->GetFocus();
    if(NULL != pWnd)
    {
        if( FALSE == bEnable && m_pWndParent->GetFocus()->GetDlgCtrlID() == iIDControl)
        {
            // Use SendMessage instead of call NextDlgCtrl() which would force
            // us to cast the rWndParent. Since we don't know if it is a CDialog,
            // CView, CProperyPage etc. calling SendMessage is the way to go.
            m_pWndParent->SendMessage(WM_NEXTDLGCTL, 0, 0L);
        }
    }

    // Now disable the control whose id was passed in if it is a valid window.
    // It may not be if this class was constructed with a NULL ID for a given
    // control
    pWnd = m_pWndParent->GetDlgItem(iIDControl);
    if(NULL != pWnd)
    {
        pWnd->EnableWindow( bEnable );
    }
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			SelectLBItem
//
//  Purpose:		Checks to see if the listbox is a single or multi select
//                  listbox and calls the appropriate selection method on the
//                  CListBox class.
//
//  Inputs:
//
//		CListBox & rListBox
//
//		int iItem
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		void 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
void CDualListManager::SelectLBItem(CListBox & rListBox, int iItem)
{
    if(rListBox.GetStyle() & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL))
    {
        rListBox.SetSel(iItem);
    }
    else
    {
        rListBox.SetCurSel(iItem);
    }
}

///////////////////////////////////////////////////////////////////////////////
//
//  Method:			ProcessCmdMsg
//
//  Purpose:		Should be called from the parents OnCmdMsg(...) method.
//                  Processes the windows commands associated with the buttons
//                  and listbox controls. Normally this would happen in the 
//                  message map but since the ids of the controls are passed
//                  into this class the message map cannot be used.
//                  
//                  The parent can also process the message if it wants or it
//                  can check the return code and bypass the message if it was
//                  handled by this method.
//
//  Inputs:
//
//		int nID - id of the control the message is associated with
//
//		int nCode - message value
//
//  Outputs:
//
//		None
//
//  Return value:
//
//		BOOL 
//
//  Exceptions:		None
//
///////////////////////////////////////////////////////////////////////////////
BOOL CDualListManager::ProcessCmdMsg(int nID, int nCode) 
{
    BOOL bProcessed = TRUE;

    // Add - button handler
    if(nID == m_iIDAddButton)
        MoveSelected(m_ctrlAvailableList, m_ArrayAvailable, m_ArrayChoosen, FALSE);
    // Add All - button handler
    else if(nID == m_iIDAddAllButton)
        MoveAll(m_ctrlAvailableList, m_ctrlChoosenList, m_ArrayAvailable, m_ArrayChoosen);
    // Remove - button handler
    else if(nID == m_iIDRemoveButton)
        MoveSelected(m_ctrlChoosenList, m_ArrayChoosen, m_ArrayAvailable, TRUE);
    // Remove All - button handler
    else if(nID == m_iIDRemoveAllButton)
        MoveAll(m_ctrlChoosenList, m_ctrlAvailableList, m_ArrayChoosen, m_ArrayAvailable);
    // Move Down - button handler
    else if(nID == m_iIDMoveDownButton)
        MoveUpOrDown(FALSE);
    // Move Up - button handler
    else if(nID == m_iIDMoveUpButton)
        MoveUpOrDown(TRUE);
    // Double Click on an item in the from list - handler
	else if(nID == m_iIDAvailableList && nCode == LBN_DBLCLK)
        MoveSelected(m_ctrlAvailableList, m_ArrayAvailable, m_ArrayChoosen, FALSE);
    // Double Click on an item in the to list - handler
	else if(nID == m_iIDChoosenList && nCode == LBN_DBLCLK)
        MoveSelected(m_ctrlChoosenList, m_ArrayChoosen, m_ArrayAvailable, TRUE);
    // Selection changed in the from list - handler
	else if(nID == m_iIDAvailableList && nCode == LBN_SELCHANGE)
        EnableButtons(m_bIsCur);
    // Selection changed in the to list - handler
	else if(nID == m_iIDChoosenList && nCode == LBN_SELCHANGE)
        EnableButtons(m_bIsCur);
    // All other messages are sent to the base class.
    else
        bProcessed = FALSE;

    // If we processed the message then update the buttons to reflect any 
    // changes we made.
    if(TRUE == bProcessed)
    {
        EnableButtons(m_bIsCur);
    }
	
    return bProcessed;
}

/////////////////////////////////////////////////////////////////////////////
// CDualListManager dialog


//CDualListDialog::CDualListDialog(CWnd* pParent /*=NULL*/)
/*	: CDialog(CDualListDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDualListManager)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDualListDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDualListManager)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDualListDialog, CDialog)
	//{{AFX_MSG_MAP(CDualListManager)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
*/
/////////////////////////////////////////////////////////////////////////////
// CDualListManager message handlers


void CDualListManager::GetChoosenItem(CAttendanceDlg *pDlg)
{
    int iCount = m_ArrayChoosen.GetSize();
	pDlg->m_iHoliday=iCount;
	pDlg->m_ArrayHoliday.SetSize(iCount);
    for(int iIndex = 0; iIndex < iCount; ++iIndex)
    {
		long l=m_ArrayChoosen[iIndex];
		pDlg->m_ArrayHoliday[iIndex] = m_ArrayChoosen[iIndex]+1;
		l=pDlg->m_ArrayHoliday[iIndex];
/*		CString csName;
        m_KeyMap.Lookup(m_ArrayChoosen[iIndex], csName);
        iIndex2 = m_ctrlChoosenList.AddString(csName);
        m_ctrlChoosenList.SetItemData(iIndex2, m_ArrayChoosen[iIndex]);
*/  }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区欧美一区| 91麻豆6部合集magnet| 欧美日韩一区成人| 亚洲成国产人片在线观看| 在线观看av一区| 亚洲国产你懂的| 日韩三级在线观看| 免费成人在线网站| 欧美激情一区二区三区| 久久国产精品99久久久久久老狼 | 精品久久久三级丝袜| 麻豆freexxxx性91精品| 国产欧美1区2区3区| 91婷婷韩国欧美一区二区| 亚洲成人免费看| 久久久久免费观看| 欧美三级韩国三级日本一级| 男男成人高潮片免费网站| 中文字幕va一区二区三区| 色吊一区二区三区| 国产综合色在线| 亚洲国产视频一区二区| 国产欧美日韩在线视频| 欧美男人的天堂一二区| 大胆欧美人体老妇| 免费精品视频在线| 亚洲在线视频网站| 日本一区二区三级电影在线观看 | 国产欧美精品一区二区色综合 | 亚洲国产经典视频| 欧美白人最猛性xxxxx69交| 日本乱码高清不卡字幕| 国产精品一卡二| 精品中文字幕一区二区小辣椒| 国产农村妇女毛片精品久久麻豆 | 欧美丝袜自拍制服另类| 国产 欧美在线| 国产一区二区看久久| 日韩激情av在线| 亚洲成人av在线电影| 亚洲人成在线播放网站岛国| 国产精品美女久久久久久久网站| 26uuu国产电影一区二区| 日韩欧美电影一二三| 欧美日韩国产123区| 666欧美在线视频| 欧美日本免费一区二区三区| 欧美视频在线观看一区| 欧美在线制服丝袜| 欧美精品99久久久**| 蜜臀av亚洲一区中文字幕| 综合激情成人伊人| 亚洲黄色av一区| 天天做天天摸天天爽国产一区| 亚洲mv在线观看| 精品一区二区三区在线视频| 久久爱www久久做| 不卡av在线网| 欧美色网一区二区| 欧美xxxxxxxxx| 亚洲欧美日韩国产另类专区 | 精品乱码亚洲一区二区不卡| 久久久激情视频| 亚洲国产精品自拍| 国产一区二区精品在线观看| 91啪亚洲精品| 精品裸体舞一区二区三区| 国产精品美女久久久久aⅴ| 有码一区二区三区| 日av在线不卡| 色偷偷一区二区三区| 日韩欧美久久一区| 亚洲天堂成人网| 国产伦精品一区二区三区免费| 不卡视频在线观看| 日韩欧美一级在线播放| 亚洲天堂2016| 成人h动漫精品一区二区| 日韩女同互慰一区二区| 亚洲电影在线免费观看| 成人午夜视频在线| 久久这里都是精品| 日韩国产高清影视| 欧美日韩精品欧美日韩精品| 国产精品久久久一本精品 | 亚洲综合成人网| 成人免费看片app下载| 久久日韩精品一区二区五区| 日韩中文字幕一区二区三区| 色狠狠色噜噜噜综合网| **欧美大码日韩| 成人av在线资源网站| 国产精品麻豆一区二区| 国产一区 二区| 日韩一级片网站| 另类欧美日韩国产在线| 日韩亚洲国产中文字幕欧美| 日韩高清在线不卡| 制服丝袜av成人在线看| 视频一区视频二区中文| 欧美一区二区三区啪啪| 久久精品理论片| 国产精品午夜在线| 97精品国产露脸对白| 亚洲线精品一区二区三区八戒| 欧美亚洲国产怡红院影院| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩欧美一级二级| 99久久国产综合色|国产精品| 亚洲精品日韩综合观看成人91| 欧美精品一级二级三级| 国产一区二区不卡在线| 亚洲男人的天堂网| 欧美一二三在线| 99久久精品国产导航| 免费不卡在线视频| 一区免费观看视频| 日韩精品一区二区三区中文精品| 国产激情91久久精品导航 | 99视频在线观看一区三区| 亚洲国产美国国产综合一区二区| 精品国内片67194| 欧美伊人久久久久久午夜久久久久| 久久国产精品免费| 亚洲一区二区三区四区在线| 国产亚洲欧美色| 精品国内片67194| 欧美日韩国产在线观看| 91在线精品一区二区三区| 韩国精品免费视频| 日产国产欧美视频一区精品| 樱花影视一区二区| 亚洲情趣在线观看| 亚洲视频狠狠干| 日韩精品最新网址| 欧美人xxxx| 欧美三级视频在线观看| av亚洲精华国产精华精华| 国产成人综合精品三级| 狠狠狠色丁香婷婷综合久久五月| 天堂精品中文字幕在线| 香蕉久久夜色精品国产使用方法| 中文字幕在线播放不卡一区| 中文字幕免费在线观看视频一区| 久久这里只有精品6| 亚洲精品在线免费观看视频| 精品国产sm最大网站免费看| 日韩情涩欧美日韩视频| 日韩一级二级三级| 26uuu国产日韩综合| 国产精品理伦片| 一区二区三区日韩欧美精品| 亚洲一线二线三线久久久| 亚洲1区2区3区视频| 欧美a级一区二区| 国产精品911| 欧美日韩综合不卡| 久久只精品国产| 亚洲精品一二三| 日韩avvvv在线播放| 国产sm精品调教视频网站| 色老汉av一区二区三区| 日韩一区二区三区视频在线| 久久久精品国产99久久精品芒果| 国产精品麻豆一区二区| 亚洲国产日韩一区二区| 国产乱国产乱300精品| 色哟哟在线观看一区二区三区| 91精品国产综合久久福利软件| 国产三级精品视频| 亚洲资源在线观看| 国产综合色视频| 99精品国产热久久91蜜凸| 日韩精品一区二区三区四区| 中文字幕一区二区三区在线播放| 奇米精品一区二区三区四区| av在线播放成人| 久久久www成人免费无遮挡大片| 亚洲一区二区三区四区在线观看 | 免费黄网站欧美| 欧美视频一区二| 自拍av一区二区三区| 国产高清一区日本| 久久女同互慰一区二区三区| 爽好久久久欧美精品| 欧美中文字幕久久| 亚洲精品中文字幕在线观看| www.日韩大片| 中文字幕亚洲一区二区av在线 | 蜜臀国产一区二区三区在线播放| 国产大片一区二区| 欧美日本乱大交xxxxx| 亚洲综合av网| 91成人在线精品| 亚洲高清免费观看高清完整版在线观看| 亚洲国产综合视频在线观看| 国产免费久久精品| 石原莉奈一区二区三区在线观看| 狠狠色丁香婷婷综合| 欧美一区二区二区|