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

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

?? inplacelist.cpp

?? 一個簡單的access數據庫實例
?? CPP
字號:
// InPlaceList.cpp : implementation file
//
// Written by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2000. All Rights Reserved.
//
// The code contained in this file is based on the original
// CInPlaceList from http://www.codeguru.com/listview
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is 
// not sold for profit without the authors written consent, and 
// providing that this notice and the authors name is included. If 
// the source code in  this file is used in any commercial application 
// then acknowledgement must be made to the author of this file 
// (in whatever form you wish).
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// Expect bugs!
// 
// Please use and enjoy. Please let me know of any bugs/mods/improvements 
// that you have found/implemented and I will fix/incorporate them into this
// file. 
//
// 6 Aug 1998 - Added CComboEdit to subclass the edit control - code provided by 
//              Roelf Werkman <rdw@inn.nl>. Added nID to the constructor param list.
// 29 Nov 1998 - bug fix in onkeydown (Markus Irtenkauf)
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "InPlaceList.h"

#include "GridCtrl.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


/////////////////////////////////////////////////////////////////////////////
// CComboEdit

CComboEdit::CComboEdit()
{
}

CComboEdit::~CComboEdit()
{
}

// Stoopid win95 accelerator key problem workaround - Matt Weagle.
BOOL CComboEdit::PreTranslateMessage(MSG* pMsg) 
{
	// Make sure that the keystrokes continue to the appropriate handlers
	if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_KEYUP)
	{
		::TranslateMessage(pMsg);
		::DispatchMessage(pMsg);
		return TRUE;
	}	

	// Catch the Alt key so we don't choke if focus is going to an owner drawn button
	if (pMsg->message == WM_SYSCHAR)
		return TRUE;

	return CEdit::PreTranslateMessage(pMsg);
}

BEGIN_MESSAGE_MAP(CComboEdit, CEdit)
	//{{AFX_MSG_MAP(CComboEdit)
	ON_WM_KILLFOCUS()
	ON_WM_KEYDOWN()
	ON_WM_KEYUP()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CComboEdit message handlers

void CComboEdit::OnKillFocus(CWnd* pNewWnd) 
{
	CEdit::OnKillFocus(pNewWnd);
	
    CInPlaceList* pOwner = (CInPlaceList*) GetOwner();  // This MUST be a CInPlaceList
    if (pOwner)
        pOwner->EndEdit();	
}

void CComboEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if ((nChar == VK_PRIOR || nChar == VK_NEXT ||
		 nChar == VK_DOWN  || nChar == VK_UP   ||
		 nChar == VK_RIGHT || nChar == VK_LEFT) &&
		(GetKeyState(VK_CONTROL) < 0 && GetDlgCtrlID() == IDC_COMBOEDIT))
    {
        CWnd* pOwner = GetOwner();
        if (pOwner)
            pOwner->SendMessage(WM_KEYDOWN, nChar, nRepCnt+ (((DWORD)nFlags)<<16));
        return;
    }

	CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}

void CComboEdit::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if (nChar == VK_ESCAPE) 
	{
        CWnd* pOwner = GetOwner();
        if (pOwner)
            pOwner->SendMessage(WM_KEYUP, nChar, nRepCnt + (((DWORD)nFlags)<<16));
        return;
    }

	if (nChar == VK_TAB || nChar == VK_RETURN || nChar == VK_ESCAPE)
    {
        CWnd* pOwner = GetOwner();
        if (pOwner)
            pOwner->SendMessage(WM_KEYUP, nChar, nRepCnt + (((DWORD)nFlags)<<16));
        return;
    }

	CEdit::OnKeyUp(nChar, nRepCnt, nFlags);
}


/////////////////////////////////////////////////////////////////////////////
// CInPlaceList

CInPlaceList::CInPlaceList(CWnd* pParent, CRect& rect, DWORD dwStyle, UINT nID,
                           int nRow, int nColumn, 
						   CStringArray& Items, CString sInitText, 
						   UINT nFirstChar)
{
	m_nNumLines = 4;
	m_sInitText = sInitText;
 	m_nRow		= nRow;
 	m_nCol      = nColumn;
 	m_nLastChar = 0; 
	m_bExitOnArrows = FALSE; //(nFirstChar != VK_LBUTTON);	// If mouse click brought us here,

	// Create the combobox
 	DWORD dwComboStyle = WS_BORDER|WS_CHILD|WS_VISIBLE|WS_VSCROLL|
 					     CBS_AUTOHSCROLL | dwStyle;
	int nHeight = rect.Height();
	rect.bottom = rect.bottom + m_nNumLines*nHeight + ::GetSystemMetrics(SM_CYHSCROLL);
	if (!Create(dwComboStyle, rect, pParent, nID)) return;

	// Add the strings
	for (int i = 0; i < Items.GetSize(); i++) 
		AddString(Items[i]);

	// Get the maximum width of the text strings
	int nMaxLength = 0;
	CClientDC dc(GetParent());
	CFont* pOldFont = dc.SelectObject(pParent->GetFont());

	for (i = 0; i < Items.GetSize(); i++) 
		nMaxLength = max(nMaxLength, dc.GetTextExtent(Items[i]).cx);

	nMaxLength += (::GetSystemMetrics(SM_CXVSCROLL) + dc.GetTextExtent(_T(" ")).cx*2);
	dc.SelectObject(pOldFont);

    if (nMaxLength > rect.Width())
	    rect.right = rect.left + nMaxLength;

	// Resize the edit window and the drop down window
	MoveWindow(rect);

	SetFont(pParent->GetFont());
	SetItemHeight(-1, nHeight);

	SetDroppedWidth(nMaxLength);
	SetHorizontalExtent(0); // no horz scrolling

	// Set the initial text to m_sInitText
	if (SelectString(-1, m_sInitText) == CB_ERR) 
		SetWindowText(m_sInitText);		// No text selected, so restore what was there before

    // Subclass the combobox edit control if style includes CBS_DROPDOWN
    if ((dwStyle & CBS_DROPDOWNLIST) != CBS_DROPDOWNLIST)
    {
        m_edit.SubclassDlgItem(IDC_COMBOEDIT, this);
 	    SetFocus();
        switch (nFirstChar)
        {
            case VK_LBUTTON: 
            case VK_RETURN:   m_edit.SetSel((int)_tcslen(m_sInitText), -1); return;
            case VK_BACK:     m_edit.SetSel((int)_tcslen(m_sInitText), -1); break;
            case VK_DOWN: 
            case VK_UP:   
            case VK_RIGHT:
            case VK_LEFT:  
            case VK_NEXT:  
            case VK_PRIOR: 
            case VK_HOME:  
            case VK_END:      m_edit.SetSel(0,-1); return;
            default:          m_edit.SetSel(0,-1);
        }
        SendMessage(WM_CHAR, nFirstChar);
    }
    else
 	    SetFocus();
}

CInPlaceList::~CInPlaceList()
{
}

void CInPlaceList::EndEdit()
{
    CString str;
    GetWindowText(str);
 
    // Send Notification to parent
    GV_DISPINFO dispinfo;

    dispinfo.hdr.hwndFrom = GetSafeHwnd();
    dispinfo.hdr.idFrom   = GetDlgCtrlID();
    dispinfo.hdr.code     = GVN_ENDLABELEDIT;
 
    dispinfo.item.mask    = LVIF_TEXT|LVIF_PARAM;
    dispinfo.item.row     = m_nRow;
    dispinfo.item.col     = m_nCol;
    dispinfo.item.strText = str;
    dispinfo.item.lParam  = (LPARAM) m_nLastChar; 
 
    CWnd* pOwner = GetOwner();
    if (IsWindow(pOwner->GetSafeHwnd()))
        pOwner->SendMessage(WM_NOTIFY, GetDlgCtrlID(), (LPARAM)&dispinfo );
 
    // Close this window (PostNcDestroy will delete this)
    PostMessage(WM_CLOSE, 0, 0);
}

void CInPlaceList::PostNcDestroy() 
{
	CComboBox::PostNcDestroy();

	delete this;
}

BEGIN_MESSAGE_MAP(CInPlaceList, CComboBox)
	//{{AFX_MSG_MAP(CInPlaceList)
	ON_WM_KILLFOCUS()
	ON_WM_KEYDOWN()
	ON_WM_KEYUP()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CInPlaceList message handlers

void CInPlaceList::OnKillFocus(CWnd* pNewWnd) 
{
	CComboBox::OnKillFocus(pNewWnd);

	if (GetSafeHwnd() == pNewWnd->GetSafeHwnd())
        return;

    // Only end editing on change of focus if we're using the CBS_DROPDOWNLIST style
    if ((GetStyle() & CBS_DROPDOWNLIST) == CBS_DROPDOWNLIST)
        EndEdit();
}

// If an arrow key (or associated) is pressed, then exit if
//  a) The Ctrl key was down, or
//  b) m_bExitOnArrows == TRUE
void CInPlaceList::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if ((nChar == VK_PRIOR || nChar == VK_NEXT ||
		 nChar == VK_DOWN  || nChar == VK_UP   ||
		 nChar == VK_RIGHT || nChar == VK_LEFT) &&
		(m_bExitOnArrows || GetKeyState(VK_CONTROL) < 0))
	{
		m_nLastChar = nChar;
		GetParent()->SetFocus();
		return;
	}

	CComboBox::OnKeyDown(nChar, nRepCnt, nFlags);
}

// Need to keep a lookout for Tabs, Esc and Returns.
void CInPlaceList::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if (nChar == VK_ESCAPE) 
		SetWindowText(m_sInitText);	// restore previous text

	if (nChar == VK_TAB || nChar == VK_RETURN || nChar == VK_ESCAPE)
	{
		m_nLastChar = nChar;
		GetParent()->SetFocus();	// This will destroy this window
		return;
	}

	CComboBox::OnKeyUp(nChar, nRepCnt, nFlags);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品免费观看| 欧美日韩亚洲不卡| 老司机精品视频一区二区三区| 最好看的中文字幕久久| 中文字幕一区二区三区在线播放| 国产亚洲欧美激情| 欧美激情一区三区| 中文字幕av免费专区久久| 中文在线一区二区| 亚洲啪啪综合av一区二区三区| 亚洲欧美激情视频在线观看一区二区三区| 国产精品的网站| 亚洲久本草在线中文字幕| 亚洲国产精品麻豆| 蜜桃视频在线观看一区二区| 久久超碰97中文字幕| 国产成人自拍网| 成人av免费在线观看| 色综合久久久久综合99| 欧美日本一区二区三区四区| 精品国产乱码久久久久久闺蜜| 日本一区二区免费在线观看视频| 国产精品久久久久aaaa| 亚洲午夜国产一区99re久久| 久久国产麻豆精品| av电影一区二区| 欧美精品一级二级| 亚洲国产精品黑人久久久| 一区二区三区加勒比av| 久久er精品视频| 99综合电影在线视频| 4438x亚洲最大成人网| 国产欧美综合在线| 亚洲影院理伦片| 国产精品一区二区三区乱码| 欧美视频日韩视频在线观看| 亚洲精品在线免费观看视频| 亚洲精选一二三| 国产精品888| 欧美视频精品在线| 国产精品久久久久久久久免费樱桃| 午夜久久久久久| 成人精品视频一区二区三区尤物| 91精品国产综合久久婷婷香蕉| 中文乱码免费一区二区| 美腿丝袜一区二区三区| 色爱区综合激月婷婷| 国产精品视频在线看| 国产成人精品免费看| 欧美一级二级三级蜜桃| 亚洲情趣在线观看| 成人免费视频网站在线观看| 欧美mv日韩mv国产| 天天免费综合色| 色诱亚洲精品久久久久久| 久久九九影视网| 麻豆精品一区二区综合av| 欧美在线观看视频在线| 中文字幕在线不卡一区| 国产一区不卡在线| 精品免费视频一区二区| 亚洲国产乱码最新视频| 色婷婷综合在线| 亚洲欧美二区三区| 成人av网站在线观看| 国产精品免费免费| 国产成a人亚洲| 国产亚洲一区二区三区在线观看 | 欧美一区二区在线免费观看| 亚洲精品国产无天堂网2021| 91在线一区二区三区| 18成人在线观看| 成人激情免费电影网址| 中文字幕精品—区二区四季| 国产乱码精品一品二品| 精品国产伦一区二区三区免费| 全部av―极品视觉盛宴亚洲| 欧美伦理视频网站| 婷婷成人综合网| 欧美一区二区三区视频在线| 日本va欧美va精品| 欧美一区二区三区人| 首页亚洲欧美制服丝腿| 欧美日韩五月天| 免费成人你懂的| 精品国产区一区| 成人一区二区三区视频| 国产精品久久久久久久久免费桃花| 成人sese在线| 亚洲一区视频在线| 日韩午夜激情av| av一区二区不卡| 香蕉久久一区二区不卡无毒影院| 69p69国产精品| 国产精品综合二区| 亚洲欧洲韩国日本视频| 欧美日韩大陆一区二区| 久久国产精品色| 亚洲欧洲精品一区二区三区| 欧美久久久久久久久| 国产一区二区三区免费播放| 中文字幕亚洲欧美在线不卡| 欧美日韩国产中文| 国产精品中文字幕一区二区三区| 亚洲少妇30p| 欧美一二三四区在线| 成人看片黄a免费看在线| 亚洲va天堂va国产va久| 久久久777精品电影网影网 | 日韩精品一区二区三区老鸭窝| 懂色av一区二区三区蜜臀| 午夜婷婷国产麻豆精品| 国产日产精品一区| 7777精品伊人久久久大香线蕉超级流畅| 国产美女一区二区| 亚洲综合一二区| 久久久精品影视| 91精品久久久久久蜜臀| 91麻豆国产自产在线观看| 免费xxxx性欧美18vr| 亚洲色图19p| 久久精品一区二区三区av| 欧美在线观看禁18| 国产成人无遮挡在线视频| 日韩精品三区四区| 亚洲人成伊人成综合网小说| 精品免费国产一区二区三区四区| 欧洲精品在线观看| 成人av资源下载| 国产在线精品免费| 午夜伦欧美伦电影理论片| 一区二区三区欧美亚洲| 国产精品亲子伦对白| 久久午夜国产精品| 日韩欧美二区三区| 日韩一区二区免费在线观看| 精品视频一区 二区 三区| 91美女在线视频| 国产91露脸合集magnet | 日av在线不卡| 亚洲曰韩产成在线| 亚洲人吸女人奶水| 国产精品美女一区二区| 国产亚洲制服色| 久久久亚洲精品石原莉奈| 精品久久久久久无| 欧美一级黄色录像| 日韩欧美色综合网站| 日韩视频在线你懂得| 日韩一级成人av| 日韩午夜在线播放| 欧美成人国产一区二区| 日韩久久免费av| 久久婷婷国产综合国色天香| 久久综合色8888| 久久毛片高清国产| 久久久久久久久久久99999| 久久久久久久久久看片| 国产欧美精品一区二区三区四区| 国产网站一区二区三区| 欧美经典一区二区三区| 亚洲人成亚洲人成在线观看图片| 亚洲美女免费在线| 亚洲综合成人在线视频| 婷婷成人激情在线网| 麻豆成人免费电影| 欧美日韩国产小视频在线观看| 欧美日韩一区国产| 在线播放欧美女士性生活| 日韩写真欧美这视频| 欧美激情资源网| 亚洲精品欧美专区| 日韩电影一区二区三区四区| 捆绑变态av一区二区三区| 国产不卡高清在线观看视频| 91在线看国产| 91麻豆精品久久久久蜜臀| 久久影视一区二区| 亚洲免费观看高清完整版在线| 亚洲777理论| 国产精品资源网| 欧洲另类一二三四区| 欧美成人一区二区三区| 国产精品久久久久久久久免费相片| 亚洲综合男人的天堂| 蜜桃一区二区三区在线| 91原创在线视频| 日韩一级大片在线| 亚洲乱码国产乱码精品精可以看| 欧美aaaaa成人免费观看视频| 国产不卡免费视频| 91精品国产综合久久久久久漫画 | 国产精品美女久久久久av爽李琼| 一区二区三区免费在线观看| 极品少妇xxxx精品少妇偷拍| 99久久久久久99| 日韩欧美精品在线| 亚洲精品亚洲人成人网| 国产电影精品久久禁18| 欧美精品久久久久久久多人混战|