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

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

?? intlstvw.cpp

?? 基于evc下的控件編程
?? CPP
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// intlstvw.cpp : implementation file
//
// This is a part of the Microsoft Foundation Classes C++ library.
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.

#include "stdafx.h"
#include "collect.h"
#include "colledoc.h"
#include "intlstvw.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIntListView

IMPLEMENT_DYNCREATE(CIntListView, CFormView)

CIntListView::CIntListView()
	: CFormView(CIntListView::IDD)
{
	//{{AFX_DATA_INIT(CIntListView)
	m_int = 0;
	//}}AFX_DATA_INIT
}

CIntListView::~CIntListView()
{
}

void CIntListView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();

	// Copy all of the integers from the document's CList<int,int>
	// to the listbox.
	m_ctlList.ResetContent();
	CList<int,int>& intList = GetDocument()->m_intList;
	POSITION pos = intList.GetHeadPosition();
	while (pos != NULL)
	{
		int n = intList.GetNext(pos);
		AddIntToListBox(n);
	}
}


void CIntListView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CIntListView)
	DDX_Control(pDX, IDC_LIST, m_ctlList);
	DDX_Text(pDX, IDC_ELEMENT, m_int);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CIntListView, CFormView)
	//{{AFX_MSG_MAP(CIntListView)
	ON_BN_CLICKED(IDC_ADD, OnAdd)
	ON_BN_CLICKED(IDC_UPDATE, OnUpdate)
	ON_BN_CLICKED(IDC_REMOVE, OnRemove)
	ON_BN_CLICKED(IDC_REMOVE_ALL, OnRemoveAll)
	ON_LBN_SELCHANGE(IDC_LIST, OnSelChangeList)
	ON_BN_CLICKED(IDC_INSERT_BEFORE, OnInsertBefore)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()



/////////////////////////////////////////////////////////////////////////////
// CIntListView diagnostics

#ifdef _DEBUG
void CIntListView::AssertValid() const
{
	CFormView::AssertValid();
}

void CIntListView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

CCollectDoc* CIntListView::GetDocument() // non-debug version is inline
{
	return STATIC_DOWNCAST(CCollectDoc, m_pDocument);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CIntListView internal implementation

BOOL CIntListView::FindInt(int& nSel, POSITION& pos)
{
	nSel = m_ctlList.GetCurSel();
	if (nSel == LB_ERR)
	{
		AfxMessageBox(IDS_SELECT_INTEGER);
		return FALSE;
	}

	int nValue = (int)m_ctlList.GetItemData(nSel);

	// Find the integer in the integer list.
	pos = GetDocument()->m_intList.Find(nValue);

	// If the integer is in the listbox, it must also be in the integer list
	ASSERT(pos != NULL);

	return TRUE;
}

void CIntListView::AddIntToListBox(int n, int nSel)
{
	// Add new integer to the listbox.
	CString str;
	str.Format(_T("%i"),n);
	if (nSel == -1)
		nSel = m_ctlList.AddString(str);
	else
		m_ctlList.InsertString(nSel, str);

	// Save the integer as the listbox entry's "data item".
	m_ctlList.SetItemData(nSel, (DWORD)n);
}


/////////////////////////////////////////////////////////////////////////////
// CIntListView message handlers

void CIntListView::OnAdd()
{
	if (UpdateData() != TRUE)
		return;

	// Add new integer to the CList<int,int>
	GetDocument()->m_intList.AddTail(m_int);

	AddIntToListBox(m_int);
	m_ctlList.SetCurSel(m_ctlList.GetCount()-1);
}

void CIntListView::OnInsertBefore()
{
	if (UpdateData() != TRUE)
		return;

	int nSel;
	POSITION pos;
	// Find the integer in both the CList<int,int> and the listbox.
	if (FindInt(nSel, pos) != TRUE)
		return;


	// Insert in front of the integer found in the CList<int,int>
	POSITION posTemp = GetDocument()->m_intList.InsertBefore(pos, m_int);

	// Insert new integer in the listbox
	AddIntToListBox(m_int, nSel);
	m_ctlList.SetCurSel(nSel);
}

void CIntListView::OnUpdate()
{
	if (UpdateData() != TRUE)
		return;

	int nSel;
	POSITION pos;
	// Find the integer in both the CList<int,int> and the listbox.
	if (FindInt(nSel, pos) != TRUE)
		return;

	// Replace the integer in the CList<int,int>.
	GetDocument()->m_intList.SetAt(pos, m_int);

	// Update the old integer in the listbox by removing
	// the old entry and adding a new entry.
	m_ctlList.DeleteString(nSel);
	AddIntToListBox(m_int, nSel);
	m_ctlList.SetCurSel(nSel);
}

void CIntListView::OnRemove()
{
	int nSel, iCount;
	POSITION pos;
	// Find the string in both the CList<int,int> and in the listbox.
	if (FindInt(nSel, pos) != TRUE)
		return;


	// Remove the integer from the CList<int,int>.
	GetDocument()->m_intList.RemoveAt(pos);

	// Remove the integer from the listbox.
	m_ctlList.DeleteString(nSel);

	iCount=m_ctlList.GetCount();
	if ((nSel+1)>=iCount)
	{
		nSel=iCount-1;
	}
	m_ctlList.SetCurSel(nSel);
	if (nSel!=LB_ERR) OnSelChangeList();
}

void CIntListView::OnRemoveAll()
{
	// Remove all of the integers from the CList<int,int>.
	GetDocument()->m_intList.RemoveAll();

	// Remove all of the integers from the listbox.
	m_ctlList.ResetContent();
}

void CIntListView::OnSelChangeList()
{
	// Update the edit control to reflect the new selection
	// in the listbox.
	m_int = (int)m_ctlList.GetItemData(m_ctlList.GetCurSel());
	UpdateData(FALSE);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品婷婷国产综合久久| 国产91清纯白嫩初高中在线观看| 国产精品视频一二| 国产性色一区二区| 国产精品天美传媒沈樵| 国产亚洲欧美色| 国产精品日产欧美久久久久| 国产精品狼人久久影院观看方式| 久久精品夜色噜噜亚洲a∨| 久久久久久久久久看片| 中文字幕成人在线观看| 亚洲欧美一区二区三区孕妇| 亚洲同性gay激情无套| 亚洲制服丝袜av| 人人超碰91尤物精品国产| 免费av成人在线| 风流少妇一区二区| 91麻豆自制传媒国产之光| 欧美日韩一级大片网址| 日韩一区二区三| 亚洲国产高清aⅴ视频| 一区二区三区在线视频免费| 日韩成人精品在线观看| 国产成人综合自拍| 在线免费观看一区| 欧美成人猛片aaaaaaa| 久久久久国产精品麻豆| 一区二区在线电影| 老司机一区二区| 色综合久久综合网| 91精品国产综合久久福利| 国产欧美日产一区| 午夜欧美视频在线观看| 丁香婷婷综合网| 欧美日韩在线不卡| 国产婷婷色一区二区三区在线| ...中文天堂在线一区| 日本aⅴ精品一区二区三区| 成人午夜激情视频| 日韩午夜激情视频| 亚洲男人天堂av| 国产美女一区二区| 欧美精品第1页| 亚洲色图视频免费播放| 九九久久精品视频| 欧美区视频在线观看| 国产精品色眯眯| 精品在线一区二区| 欧美日韩电影在线播放| 亚洲欧洲99久久| 国产精品自拍一区| 日韩欧美国产综合一区 | 亚洲精品videosex极品| 国产精品18久久久久久久久久久久 | 欧美一级欧美三级| 亚洲一区精品在线| 色哟哟一区二区三区| 久久精品欧美一区二区三区不卡| 视频一区二区中文字幕| 在线观看国产91| 亚洲三级久久久| av网站免费线看精品| 久久一二三国产| 久久99久久久久| 欧美一级在线免费| 亚洲mv大片欧洲mv大片精品| 在线一区二区三区四区五区| 亚洲天堂成人网| 成人h精品动漫一区二区三区| 久久综合九色综合欧美98| 久久99久久久久久久久久久| 日韩免费在线观看| 激情小说亚洲一区| 精品福利av导航| 国产精品456| 国产精品女主播av| 一本色道久久综合狠狠躁的推荐| 久久先锋影音av| 国产精品69毛片高清亚洲| 国产亚洲1区2区3区| 国产综合色产在线精品| 久久一区二区视频| 成人av在线资源| 一区二区三区成人在线视频| 欧美午夜免费电影| 三级欧美韩日大片在线看| 欧美一级夜夜爽| 国产麻豆日韩欧美久久| 国产日韩欧美高清在线| av色综合久久天堂av综合| 亚洲一区二区综合| 日韩欧美www| 大胆欧美人体老妇| 亚洲激情中文1区| 欧美久久高跟鞋激| 国内成人精品2018免费看| 国产精品丝袜一区| 欧美怡红院视频| 日本在线播放一区二区三区| 国产欧美一区二区在线观看| 9人人澡人人爽人人精品| 亚洲与欧洲av电影| 精品久久久久久综合日本欧美| 国产成人超碰人人澡人人澡| 亚洲欧美视频在线观看| 日韩亚洲欧美成人一区| 成人在线视频一区| 舔着乳尖日韩一区| 欧美国产精品v| 51精品视频一区二区三区| 国产精一品亚洲二区在线视频| 一区二区国产盗摄色噜噜| 欧美xfplay| 欧美在线观看视频在线| 国产精品一二三四| 日韩不卡手机在线v区| 国产精品你懂的在线欣赏| 欧美一区二区三区四区视频| 成人av在线资源网| 国产中文一区二区三区| 亚洲国产另类精品专区| 中文字幕欧美三区| 欧美一区二区在线看| 色一区在线观看| 国产精品一区二区在线播放| 午夜伦欧美伦电影理论片| 国产精品美女久久久久av爽李琼| 6080午夜不卡| 一本到三区不卡视频| 国产乱码精品1区2区3区| 视频一区欧美日韩| 亚洲成av人在线观看| 亚洲欧洲成人av每日更新| 久久久国产午夜精品| 91精品国产入口| 欧美日韩国产经典色站一区二区三区| 国产不卡视频在线播放| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲一区免费视频| 亚洲一区在线免费观看| 亚洲日本在线观看| 中文字幕字幕中文在线中不卡视频| 久久品道一品道久久精品| 日韩欧美视频一区| 精品久久五月天| 精品国产一二三| 欧美精品一区视频| 日韩精品一区二区三区中文精品| 91精品国产一区二区三区| 欧美日本不卡视频| 69堂精品视频| 69av一区二区三区| 精品欧美一区二区三区精品久久| 678五月天丁香亚洲综合网| 欧美精品自拍偷拍动漫精品| 欧美日韩国产另类一区| 欧美日本在线播放| 欧美色视频一区| 欧美精品99久久久**| 日韩午夜av一区| 久久这里只有精品视频网| 久久九九久久九九| 中文字幕免费不卡在线| 中文字幕欧美一| 一区二区三区四区在线| 图片区小说区区亚洲影院| 亚洲国产aⅴ天堂久久| 日韩经典中文字幕一区| 奇米精品一区二区三区在线观看一| 美女视频黄免费的久久 | 久久国产精品区| 国产成人综合在线| 色综合网站在线| 欧美日韩成人在线一区| 久久综合色8888| 亚洲综合在线五月| 蜜桃视频一区二区| 国产精品一区二区三区乱码| av中文字幕不卡| 欧美丰满一区二区免费视频| 久久久久久久综合色一本| 亚洲欧美日韩精品久久久久| 图片区日韩欧美亚洲| 国产精品99久久久久久久女警| 97se亚洲国产综合自在线不卡| 欧美人与性动xxxx| 欧美激情综合在线| 亚洲成人一二三| 国产精品1024久久| 欧美精品日韩一区| 国产精品免费视频一区| 日韩**一区毛片| 91亚洲精品久久久蜜桃网站| 日韩精品资源二区在线| 亚洲日本va午夜在线影院| 另类的小说在线视频另类成人小视频在线 | 国产精品网站在线| 日韩不卡一区二区三区| 色综合久久久久综合99| 久久综合999|