亚洲欧美第一页_禁久久精品乱码_粉嫩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;

	int i;
	// Add the strings
	for (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一区二区三区免费野_久草精品视频
9久草视频在线视频精品| 欧美日韩精品欧美日韩精品一| 菠萝蜜视频在线观看一区| 欧美色中文字幕| 中文字幕欧美区| 狠狠v欧美v日韩v亚洲ⅴ| 精品1区2区3区| 亚洲人成网站影音先锋播放| 国产麻豆欧美日韩一区| 欧美电影精品一区二区| 亚洲777理论| 欧美中文字幕一区二区三区| 自拍偷拍欧美激情| 不卡大黄网站免费看| 国产丝袜欧美中文另类| 老司机精品视频导航| 欧美理论在线播放| 亚洲图片欧美综合| 色婷婷国产精品| 亚洲男人电影天堂| 91麻豆自制传媒国产之光| 中文字幕av资源一区| 国产成人在线视频网站| 久久精品视频网| 国产精品一区二区果冻传媒| 精品国一区二区三区| 六月丁香综合在线视频| 欧美大片在线观看| 久久狠狠亚洲综合| 欧美成人午夜电影| 国产乱妇无码大片在线观看| 欧美韩日一区二区三区| 成人激情免费网站| 国产日韩欧美综合一区| 国产精品夜夜爽| 国产日韩精品一区二区三区| 粉嫩绯色av一区二区在线观看 | 天堂久久一区二区三区| 欧美日韩精品高清| 丝瓜av网站精品一区二区| 欧美日本一区二区| 久久精品国产精品青草| www亚洲一区| 成人夜色视频网站在线观看| 综合精品久久久| 欧美午夜电影一区| 免费在线欧美视频| 国产日韩在线不卡| 在线观看国产精品网站| 午夜精彩视频在线观看不卡| 日韩欧美高清在线| 粉嫩嫩av羞羞动漫久久久| 一区二区在线观看免费视频播放| 欧洲av一区二区嗯嗯嗯啊| 视频一区二区不卡| 久久综合狠狠综合久久综合88| 国产成人av自拍| 亚洲蜜桃精久久久久久久| 欧美性视频一区二区三区| 琪琪一区二区三区| 国产精品家庭影院| 欧美久久一区二区| 国产成人鲁色资源国产91色综 | 免费观看30秒视频久久| 久久老女人爱爱| 色www精品视频在线观看| 日韩专区中文字幕一区二区| 国产日产欧美一区二区三区| 欧美日韩视频在线第一区 | 中文在线免费一区三区高中清不卡| 91看片淫黄大片一级| 男男gaygay亚洲| 中文字幕在线播放不卡一区| 欧美一区二区私人影院日本| 99久久99久久精品免费观看| 日本欧美在线观看| 1024国产精品| 26uuu国产在线精品一区二区| 91免费视频观看| 黄一区二区三区| 亚洲亚洲精品在线观看| 国产欧美日韩麻豆91| 777xxx欧美| 色欧美乱欧美15图片| 国产福利一区在线| 男人的天堂久久精品| 亚洲一线二线三线久久久| 欧美激情一区二区三区蜜桃视频| 欧美一级一区二区| 欧美在线播放高清精品| 国产精品538一区二区在线| 日韩电影免费一区| 亚洲一区二区三区四区在线免费观看 | 精品成人a区在线观看| 欧美日韩久久不卡| 在线免费不卡电影| 成人免费视频视频在线观看免费| 青青草97国产精品免费观看无弹窗版| 樱花影视一区二区| 亚洲精品视频一区二区| 中文一区二区完整视频在线观看| 精品国内片67194| 日韩欧美第一区| 91精品欧美综合在线观看最新 | 亚洲资源中文字幕| 亚洲美女免费视频| 综合久久国产九一剧情麻豆| 国产精品色眯眯| 中文字幕乱码久久午夜不卡| 国产亚洲污的网站| 久久午夜国产精品| 欧美成人r级一区二区三区| 欧美一区二区三区婷婷月色| 日韩一区二区视频| 日韩视频一区二区在线观看| 日韩小视频在线观看专区| 欧美大胆一级视频| 久久综合资源网| 国产女人18水真多18精品一级做 | 亚洲激情网站免费观看| 亚洲欧美日韩国产手机在线| 中文字幕视频一区二区三区久| 国产精品久久久久国产精品日日| 最新日韩av在线| 亚洲自拍偷拍图区| 视频一区二区国产| 国产真实乱子伦精品视频| 国产成人啪午夜精品网站男同| hitomi一区二区三区精品| 91看片淫黄大片一级在线观看| 欧美性生交片4| 欧美成人午夜电影| 国产精品大尺度| 亚洲一区二区三区中文字幕在线| 日韩中文字幕91| 国产在线观看免费一区| 高清成人在线观看| 91精品办公室少妇高潮对白| 欧美一区二区三区日韩视频| 国产欧美一区二区精品性色超碰| 一区二区成人在线| 久久电影国产免费久久电影| 国产白丝精品91爽爽久久| 欧洲精品中文字幕| 欧美xingq一区二区| 亚洲国产激情av| 日韩高清欧美激情| 成人国产精品免费观看动漫| 欧美日韩一区二区三区高清| 亚洲精品一区二区在线观看| 亚洲天堂免费看| 精品一区二区三区在线播放| 91香蕉视频污| 日韩一级免费一区| 亚洲免费色视频| 国内精品视频666| 欧美性xxxxxx少妇| 久久精品人人做人人综合| 亚洲成人tv网| 国产98色在线|日韩| 欧美夫妻性生活| 综合激情网...| 国产成人午夜精品影院观看视频| 欧美中文字幕久久| 国产精品美女久久久久久 | 波多野结衣中文字幕一区| 欧美一区二视频| 日韩高清在线一区| 99亚偷拍自图区亚洲| 精品三级在线观看| 亚洲成人精品一区二区| 不卡一二三区首页| 久久亚洲精品小早川怜子| 视频一区中文字幕国产| 色婷婷av一区二区三区软件| 国产欧美日韩视频在线观看| 韩国女主播一区| 日韩三级视频在线观看| 一区二区三区丝袜| 97se狠狠狠综合亚洲狠狠| 国产欧美视频一区二区三区| 麻豆国产一区二区| 制服丝袜成人动漫| 亚洲一区免费观看| 日本精品一区二区三区四区的功能| 久久精品日产第一区二区三区高清版| 美女看a上一区| 欧美一级淫片007| 日本中文一区二区三区| 在线不卡免费欧美| 五月激情综合色| 欧美日韩成人高清| 丝袜美腿亚洲一区| 6080午夜不卡| 免费人成黄页网站在线一区二区 | 国产精品九色蝌蚪自拍| 成人av一区二区三区| 中国色在线观看另类| 高清不卡一二三区| 亚洲欧美怡红院|