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

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

?? inplacelist.cpp

?? 功能非常齊全的GridControl,能對窗體中顯示數據庫數據的表格進行多種操作.
?? 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一区二区三区免费野_久草精品视频
国产成人精品亚洲日本在线桃色| 午夜视频在线观看一区二区三区| 日韩欧美电影在线| 欧美精品v日韩精品v韩国精品v| 欧美日韩久久久| 欧美日韩在线综合| 欧美一级xxx| 26uuu亚洲综合色| 中文字幕欧美国产| 成人欧美一区二区三区1314| 国产精品乱码人人做人人爱| 成人免费视频在线观看| 一区二区在线观看免费| 日日夜夜免费精品| 国产精品99久久久久久有的能看| 懂色av一区二区三区免费看| 99久久亚洲一区二区三区青草| 91黄色激情网站| 欧美精品在线一区二区| 久久久九九九九| 最新不卡av在线| 日韩电影免费在线看| 狠狠色狠狠色综合系列| 懂色av一区二区三区免费看| 日本韩国欧美三级| 日韩精品一区在线| 亚洲国产精品成人综合| 亚洲一二三四久久| 精品在线播放免费| 日本韩国欧美在线| 欧美sm极限捆绑bd| 亚洲激情图片小说视频| 久草这里只有精品视频| 91天堂素人约啪| 日韩午夜精品电影| 亚洲欧洲av在线| 日产国产欧美视频一区精品| 国产不卡视频一区| 777亚洲妇女| 国产精品国产精品国产专区不蜜 | 男人的j进女人的j一区| 国产一区二区三区四区五区美女| 色婷婷综合五月| 欧美成人aa大片| 亚洲婷婷国产精品电影人久久| 免费高清在线视频一区·| 不卡一区二区在线| 精品国产免费一区二区三区四区| 亚洲人被黑人高潮完整版| 免费一级片91| 欧洲亚洲精品在线| 国产精品女同互慰在线看| 奇米四色…亚洲| 欧美性受xxxx| 亚洲视频电影在线| 国产盗摄一区二区| 精品国产三级a在线观看| 亚洲一区在线观看免费| 99久久国产免费看| 国产偷国产偷亚洲高清人白洁| 蜜臀久久99精品久久久久久9 | 久久久久久日产精品| 水蜜桃久久夜色精品一区的特点| 高清av一区二区| 久久―日本道色综合久久 | 欧美v国产在线一区二区三区| 亚洲一卡二卡三卡四卡无卡久久| 99久久99久久综合| 欧美极品aⅴ影院| 国产一区二区三区久久久| 日韩视频一区二区在线观看| 一区二区理论电影在线观看| 91在线小视频| 综合久久一区二区三区| 99re热这里只有精品视频| 国产欧美视频一区二区三区| 国产精品影视网| 久久女同互慰一区二区三区| 激情综合网最新| 久久久一区二区| 国产乱人伦偷精品视频不卡| 欧美变态tickle挠乳网站| 精品一二线国产| 久久综合九色综合欧美亚洲| 国产精品一区二区无线| 国产日本亚洲高清| 北岛玲一区二区三区四区| 国产精品久线观看视频| 日本韩国一区二区三区| 亚洲午夜精品17c| 制服.丝袜.亚洲.中文.综合| 免费欧美高清视频| 久久久不卡影院| 99免费精品在线观看| 一区二区三区中文字幕精品精品| 欧美四级电影在线观看| 日韩高清一区在线| 亚洲精品一区二区三区99| 成人综合在线观看| 亚洲一区二区综合| 日韩欧美高清一区| 99re这里只有精品6| 午夜电影一区二区三区| 久久久综合视频| 欧美性受xxxx黑人xyx性爽| 日韩二区在线观看| 欧美激情一区二区三区不卡| 欧美影院一区二区| 国产在线精品免费| 亚洲乱码国产乱码精品精可以看| 69久久99精品久久久久婷婷| 国产91精品精华液一区二区三区| 亚洲精品视频在线观看网站| 欧美成人在线直播| 色伊人久久综合中文字幕| 日本不卡一二三| 亚洲天堂福利av| 久久综合九色综合97_久久久| 色域天天综合网| 国产精品一区二区视频| 日韩中文字幕不卡| 亚洲乱码一区二区三区在线观看| 精品日韩99亚洲| 欧美日韩激情在线| 99久久精品免费看| 国内不卡的二区三区中文字幕| 玉足女爽爽91| 国产精品网站在线播放| 日韩欧美在线网站| 欧美亚洲高清一区| jizz一区二区| 国产麻豆欧美日韩一区| 日韩高清在线不卡| 亚洲自拍偷拍麻豆| 国产精品久久久久久久久图文区 | 亚洲综合丁香婷婷六月香| 国产日韩欧美综合在线| 欧美日韩国产三级| 欧美在线看片a免费观看| 国产精品亚洲第一| 国内一区二区在线| 久久99精品国产.久久久久久| 亚洲成人动漫在线观看| 亚洲日本青草视频在线怡红院| 久久久久久99精品| 26uuu欧美日本| 久久午夜色播影院免费高清| 欧美日韩高清影院| 欧美日韩亚洲综合在线 | 欧美精品18+| 欧美无砖专区一中文字| 色悠久久久久综合欧美99| av成人免费在线观看| 成人18精品视频| aa级大片欧美| 91高清在线观看| 欧美色中文字幕| 欧美老女人在线| 日韩一二三区不卡| 精品国一区二区三区| 精品国产在天天线2019| 国产喂奶挤奶一区二区三区| 国产亚洲视频系列| 中文在线一区二区| 亚洲同性gay激情无套| 亚洲精品大片www| 日韩精品一级中文字幕精品视频免费观看 | 亚洲女人的天堂| 亚洲成人高清在线| 日韩高清电影一区| 国精产品一区一区三区mba桃花| 国产在线播放一区三区四| 国产在线视视频有精品| 成人在线一区二区三区| 91国偷自产一区二区开放时间 | 欧美国产一区二区在线观看| 中文字幕亚洲一区二区av在线| 亚洲精品成人在线| 日韩精品欧美精品| 黄页网站大全一区二区| jizzjizzjizz欧美| 91精品视频网| 国产精品久久久久久户外露出| 一区二区欧美国产| 国产综合久久久久久久久久久久| 97久久精品人人澡人人爽| 欧美日韩国产另类不卡| 国产欧美一区二区精品婷婷| 亚洲黄网站在线观看| 狠狠网亚洲精品| 欧美专区亚洲专区| 欧美激情综合五月色丁香小说| 一区二区三区在线看| 国内精品国产成人国产三级粉色| 91色在线porny| 日韩丝袜情趣美女图片| 136国产福利精品导航| 蜜臀久久久久久久| 欧美在线一二三四区| 久久精品视频免费|