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

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

?? inplacelist.cpp

?? 此 InterVolve 應(yīng)用程序不僅介紹了使用 Microsoft 基礎(chǔ)類的基本知識(shí)
?? CPP
字號(hào):
// 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);
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美天堂一区二区三区| 欧美色爱综合网| 天天做天天摸天天爽国产一区| 欧美成人精品高清在线播放| caoporn国产精品| 久久99热狠狠色一区二区| 成人听书哪个软件好| 亚洲成人av中文| 亚洲欧洲另类国产综合| 精品成人一区二区| 欧美日本一区二区三区| 99re热这里只有精品视频| 国产剧情一区在线| 日本va欧美va精品| 亚洲一卡二卡三卡四卡无卡久久| 日本一区二区三区视频视频| 欧美一区二区三区四区高清| 日本精品一级二级| av在线不卡观看免费观看| 国产白丝网站精品污在线入口| 美女视频免费一区| 无码av免费一区二区三区试看| 亚洲欧美经典视频| 国产精品福利一区二区三区| 久久久久久麻豆| 欧美精品一区二区高清在线观看| 7777精品伊人久久久大香线蕉经典版下载| 99久久久精品| 不卡av在线网| 成人黄色在线视频| 成人激情免费视频| 成人美女视频在线看| 国产成人免费xxxxxxxx| 国产美女av一区二区三区| 老色鬼精品视频在线观看播放| 日韩黄色小视频| 青青草国产精品97视觉盛宴| 日本美女视频一区二区| 日韩国产欧美在线观看| 天堂一区二区在线免费观看| 水野朝阳av一区二区三区| 婷婷中文字幕综合| 日韩一区精品字幕| 免费av网站大全久久| 久久国产精品无码网站| 久久66热re国产| 国产在线播放一区三区四| 国产盗摄视频一区二区三区| 国产宾馆实践打屁股91| 国产91精品一区二区麻豆网站 | 蜜桃av一区二区在线观看 | 不卡欧美aaaaa| 97精品国产露脸对白| 91国偷自产一区二区三区观看 | 欧美一区二区三区思思人| 日韩一级黄色大片| 激情五月激情综合网| 国内成+人亚洲+欧美+综合在线| 国产一区二区三区高清播放| 成人av资源在线| 在线精品视频一区二区| 91麻豆精品国产自产在线| 欧美一区二区三区四区五区| 久久久久久久久伊人| 日韩码欧中文字| 首页国产欧美久久| 国产一区二区三区久久久 | 欧美最猛黑人xxxxx猛交| 亚洲国产精品欧美一二99| 成人黄色在线视频| 91首页免费视频| 欧美色男人天堂| 日韩你懂的在线观看| 国产精品视频免费| 亚洲国产精品视频| 韩国一区二区在线观看| 99精品1区2区| 日韩免费高清电影| 国产精品欧美一级免费| 亚洲福利视频一区二区| 国内精品伊人久久久久av影院| zzijzzij亚洲日本少妇熟睡| 欧美久久久一区| 日本一区二区不卡视频| 亚洲成人自拍一区| 国产精品亚洲а∨天堂免在线| 91国在线观看| 久久久久久久久蜜桃| 亚洲影视资源网| 国产二区国产一区在线观看| 欧美日韩亚洲综合一区二区三区| 久久久久国产成人精品亚洲午夜| 一区av在线播放| 国产乱妇无码大片在线观看| 欧美日韩国产综合一区二区| 中文一区二区在线观看| 人人超碰91尤物精品国产| av在线不卡免费看| 久久亚洲私人国产精品va媚药| 亚洲午夜久久久久久久久电影网 | 国产日本亚洲高清| 婷婷成人综合网| 91碰在线视频| 久久婷婷综合激情| 亚洲bt欧美bt精品| 色哟哟一区二区在线观看| 日本一区二区在线不卡| 美国毛片一区二区三区| 欧美三级乱人伦电影| 成人免费在线观看入口| 国产精品中文字幕日韩精品 | 在线观看日韩国产| 国产精品理论片在线观看| 蜜桃av一区二区在线观看| 欧美日韩中文字幕一区| 中文字幕亚洲在| 成人激情动漫在线观看| 国产视频911| 国产在线乱码一区二区三区| 日韩一区二区三区视频在线观看 | 国产成a人亚洲| 26uuu欧美日本| 蜜桃精品视频在线| 日韩一区二区三区电影在线观看| 亚洲综合久久久| 在线视频你懂得一区二区三区| 国产精品网站导航| 国产99精品国产| 国产欧美日韩三区| 国产精品影视网| 国产喂奶挤奶一区二区三区| 国产在线精品免费av| 久久久亚洲综合| 国产一区二区三区不卡在线观看| 精品国产乱码久久久久久影片| 捆绑调教一区二区三区| 欧美电视剧在线看免费| 狠狠色丁香久久婷婷综合丁香| 欧美电视剧免费观看| 精品一区二区三区在线观看| 亚洲精品一区二区在线观看| 韩国毛片一区二区三区| 久久九九久久九九| 风间由美一区二区av101 | 亚洲精品国产精华液| 色女孩综合影院| 亚洲电影在线播放| 91精品国产综合久久精品app| 偷拍一区二区三区| 欧美mv日韩mv亚洲| 高清不卡一二三区| 亚洲欧美日韩国产综合在线| 欧美三级电影在线看| 日韩影院精彩在线| 精品国产青草久久久久福利| 成人免费毛片app| 亚洲综合久久av| 欧美一个色资源| 国产99精品国产| 亚洲影院理伦片| 精品第一国产综合精品aⅴ| 懂色一区二区三区免费观看 | 亚洲国产一区视频| 精品少妇一区二区三区在线播放 | 欧美伊人精品成人久久综合97 | 日韩1区2区3区| 久久噜噜亚洲综合| 91免费观看视频在线| 日本成人中文字幕在线视频 | 亚洲欧美另类久久久精品| 欧美人妖巨大在线| 国产成人免费在线观看| 亚洲午夜免费视频| 久久精品一区八戒影视| 在线观看区一区二| 精品一区二区三区影院在线午夜 | 亚洲国产精品一区二区久久| 日韩久久久精品| 91免费在线视频观看| 麻豆中文一区二区| 亚洲男人电影天堂| 精品少妇一区二区三区视频免付费| av在线播放一区二区三区| 奇米色一区二区| 亚洲精品大片www| 精品国产免费久久| 欧美性欧美巨大黑白大战| 久久国产精品露脸对白| 亚洲欧美二区三区| 久久麻豆一区二区| 777午夜精品视频在线播放| 成人综合婷婷国产精品久久| 午夜精品一区在线观看| 国产精品理伦片| 精品少妇一区二区三区免费观看| 色94色欧美sute亚洲13| 国产精品综合视频| 热久久一区二区| 亚洲1区2区3区4区| 综合久久久久久久|