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

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

?? inplacelist.cpp

?? 操作系統演示程序
?? CPP
字號:
// InPlaceList.cpp : implementation file
//
// Written by Chris Maunder (chrismaunder@codeguru.com)
// Copyright (c) 1998.
//
// 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.szText  = 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一区二区三区免费野_久草精品视频
eeuss鲁片一区二区三区 | 亚洲小说欧美激情另类| 国产欧美一区二区精品忘忧草| 欧美一级搡bbbb搡bbbb| 欧美福利电影网| 在线综合视频播放| 精品国产伦理网| 久久这里只精品最新地址| 日韩一区二区三区免费观看| 日韩欧美中文字幕制服| 日韩欧美一区在线| 久久久国际精品| 自拍偷自拍亚洲精品播放| 尤物在线观看一区| 麻豆精品国产传媒mv男同| 久久97超碰色| av男人天堂一区| 欧美色视频在线观看| 欧美精品丝袜中出| 欧美一区二区视频免费观看| 精品国产乱码久久久久久牛牛| 久久久亚洲精华液精华液精华液| 中文字幕高清不卡| 午夜国产精品一区| 国产综合一区二区| 91免费版在线| 欧美r级在线观看| 亚洲欧洲成人精品av97| 亚洲激情六月丁香| 狠狠色综合日日| 色一情一伦一子一伦一区| 日韩区在线观看| 亚洲精品第1页| 狠狠色狠狠色综合系列| 91免费版pro下载短视频| 欧美va在线播放| 亚洲男人的天堂网| 精品一区精品二区高清| 91蝌蚪porny| 日韩欧美久久一区| 国产亚洲成av人在线观看导航| 中文文精品字幕一区二区| 亚洲成a人v欧美综合天堂| 国产盗摄女厕一区二区三区| 欧美日本一区二区| 欧美精品一区二区三区在线| 午夜久久久影院| 99热99精品| 国产午夜精品一区二区三区嫩草 | 成人自拍视频在线| 欧美三级资源在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 久久色在线视频| 三级精品在线观看| 色av一区二区| 中文字幕不卡的av| 国产一区日韩二区欧美三区| 欧美麻豆精品久久久久久| 亚洲四区在线观看| 成人丝袜18视频在线观看| 欧美成人官网二区| 蜜臀av性久久久久av蜜臀妖精| 91精品福利在线| 亚洲欧洲精品成人久久奇米网| 国产一区二区影院| 精品国产一区二区三区久久影院| 亚洲h精品动漫在线观看| 色综合中文字幕国产 | 韩国欧美国产一区| 日韩精品一区二区三区在线播放| 香蕉影视欧美成人| 国产精品亚洲成人| 久久精品亚洲乱码伦伦中文| 五月婷婷久久丁香| 在线播放一区二区三区| 五月婷婷综合网| 日韩欧美一区二区免费| 蜜桃视频第一区免费观看| 日韩一级精品视频在线观看| 国产精品视频第一区| jlzzjlzz欧美大全| 亚洲婷婷在线视频| 欧美三级电影网| 免费高清在线一区| www国产成人| 国产美女在线观看一区| 国产日韩欧美不卡| 北岛玲一区二区三区四区 | 欧美日韩亚洲综合| 蜜桃视频一区二区三区在线观看| 精品国产成人系列| caoporn国产精品| 一区二区三区高清| 日韩三级电影网址| 成人看片黄a免费看在线| 综合电影一区二区三区 | 成人激情综合网站| 亚洲免费在线观看视频| 精品视频一区三区九区| 亚洲成人av资源| 精品福利一区二区三区 | 自拍偷拍国产精品| 91视频免费观看| 亚洲成人精品在线观看| 日韩欧美国产一区二区三区| 豆国产96在线|亚洲| 一区二区三区在线观看视频| 欧美变态凌虐bdsm| 91麻豆免费视频| 国内精品伊人久久久久影院对白| 中文字幕中文乱码欧美一区二区| 欧美午夜一区二区三区| 国产一区二区中文字幕| 亚洲一区二区视频| 中文字幕成人av| 欧美日韩精品福利| 成人在线综合网站| 精品一区二区三区在线播放视频| 亚洲男帅同性gay1069| 久久久久国产一区二区三区四区| 国产成人精品综合在线观看| 亚洲成人动漫精品| 亚洲视频在线一区观看| 日韩美女视频在线| 欧美日韩在线亚洲一区蜜芽| 成人国产精品视频| 国产在线视视频有精品| 天使萌一区二区三区免费观看| 国产精品久久久一本精品 | 国产精品1024| 肉丝袜脚交视频一区二区| 亚洲欧美激情小说另类| 国产婷婷色一区二区三区四区 | 欧美日韩一本到| 91女厕偷拍女厕偷拍高清| 成人小视频免费在线观看| 美女视频第一区二区三区免费观看网站| 中文字幕在线不卡| 国产欧美精品在线观看| 日韩视频一区二区在线观看| 欧美日韩国产一级片| 日本高清成人免费播放| 99精品一区二区| 91视频国产资源| 91丝袜国产在线播放| eeuss鲁一区二区三区| 国产高清无密码一区二区三区| 久久99国产精品免费| 国内成人免费视频| 黄色成人免费在线| 国产福利一区在线观看| 国产精品一级在线| 成人免费毛片a| 成人av电影在线| 91色在线porny| 日本国产一区二区| 欧美人体做爰大胆视频| 91精品国产免费久久综合| 91 com成人网| 精品av久久707| 久久午夜色播影院免费高清| 国产日韩欧美麻豆| 亚洲欧美一区二区不卡| 国产欧美日本一区视频| 国产精品国产三级国产aⅴ入口| 亚洲欧美区自拍先锋| 亚洲中国最大av网站| 视频在线观看91| 国产资源精品在线观看| 国内外成人在线视频| av福利精品导航| 欧美日韩久久不卡| 日韩午夜在线影院| 欧美韩国日本一区| 亚洲综合一区二区| 蜜臀av一区二区在线观看| 国产大陆a不卡| 91麻豆免费在线观看| 欧美一卡2卡3卡4卡| 国产精品久久久久久久久久免费看| 亚洲精选免费视频| 国产一区二区主播在线| 91在线观看视频| 日韩一区二区视频在线观看| 久久精品欧美日韩精品 | 国产在线精品不卡| 一本到三区不卡视频| 日韩欧美成人一区| 亚洲精选视频免费看| 国产精品性做久久久久久| 91传媒视频在线播放| 2023国产精华国产精品| 亚洲一区二区三区四区在线| 激情综合色综合久久| 欧美性大战久久久久久久蜜臀| 精品国产免费视频| 石原莉奈一区二区三区在线观看| www.亚洲国产| 精品国产a毛片| 天天影视网天天综合色在线播放|