亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
99久久精品国产一区二区三区| 国产成人午夜精品5599| 亚洲精品成人少妇| 日本不卡视频在线| 91免费视频观看| 久久先锋影音av| 奇米色777欧美一区二区| 99久久综合精品| 国产欧美一区二区精品秋霞影院| 日韩一级免费观看| 亚洲愉拍自拍另类高清精品| 国产乱码一区二区三区| 日韩一区二区在线播放| 亚洲综合色噜噜狠狠| 国产精品主播直播| 欧美不卡123| 午夜欧美2019年伦理| 91成人在线观看喷潮| 中文字幕不卡在线播放| 国产精品一区二区果冻传媒| 日韩一区二区不卡| 日韩精品一二三区| 欧美日韩国产首页在线观看| 亚洲欧美另类久久久精品| 粉嫩久久99精品久久久久久夜| 国产成人av影院| 亚洲精品在线三区| 一区二区三区在线视频免费| 成人免费观看男女羞羞视频| 久久久91精品国产一区二区三区| 欧美v日韩v国产v| 天天综合日日夜夜精品| 欧美日韩高清影院| 首页综合国产亚洲丝袜| 欧美性高清videossexo| 亚洲福利一区二区三区| 欧美精品久久一区二区三区| 日韩av电影免费观看高清完整版| 国产精品538一区二区在线| 精品国产制服丝袜高跟| 久久99精品久久久久婷婷| 精品人在线二区三区| 韩国毛片一区二区三区| 国产清纯在线一区二区www| 高清不卡在线观看| 亚洲三级在线观看| 欧美午夜不卡在线观看免费| 日本欧美在线观看| 精品国产乱码久久| 国产精品主播直播| 国产精品美女久久久久久久久| 亚洲成a人片综合在线| 在线播放亚洲一区| 久久99这里只有精品| 国产精品伦理在线| 欧美最猛性xxxxx直播| 一区二区三区在线视频观看58| 九九九精品视频| 国产精品久久毛片av大全日韩| 无码av免费一区二区三区试看| 国产精品18久久久久久久网站| 欧美日韩一区视频| 精品一区二区在线播放| 国产精品久久久久久亚洲毛片| 奇米精品一区二区三区在线观看一| 成人99免费视频| 日韩久久一区二区| 欧美一区二区免费| 99久久er热在这里只有精品15 | 欧美日韩第一区日日骚| 免费人成黄页网站在线一区二区| www.一区二区| 日韩在线卡一卡二| 国产精品久久久久一区二区三区 | 国产精品水嫩水嫩| 欧美日韩国产高清一区二区| 国产乱理伦片在线观看夜一区| 在线综合视频播放| av网站免费线看精品| 午夜视频在线观看一区二区三区| 欧洲亚洲精品在线| 国产成人久久精品77777最新版本| 在线91免费看| 972aa.com艺术欧美| 免费观看30秒视频久久| 一区二区视频在线| 精品粉嫩超白一线天av| 欧美视频自拍偷拍| 成人午夜在线免费| 久草这里只有精品视频| 亚洲国产精品麻豆| 亚洲人成7777| 国产精品入口麻豆原神| 精品少妇一区二区三区免费观看 | 国产激情视频一区二区三区欧美| 欧美变态tickle挠乳网站| www.亚洲人| 国产91精品精华液一区二区三区| 国产女人aaa级久久久级 | 成人a免费在线看| 久久电影网电视剧免费观看| 亚洲国产日韩精品| 亚洲日本在线看| 中文字幕在线观看一区二区| 国产女人18毛片水真多成人如厕| 成人免费视频网站在线观看| 免费成人av在线播放| 日韩国产精品大片| 人人狠狠综合久久亚洲| 日韩有码一区二区三区| 午夜一区二区三区视频| 亚洲成a人片综合在线| 五月天久久比比资源色| 亚洲一区二区三区四区中文字幕| 欧美一级国产精品| 欧美日韩亚洲另类| 欧美日韩一区二区欧美激情| 欧美女孩性生活视频| 欧美日韩美少妇| 欧美浪妇xxxx高跟鞋交| 在线不卡欧美精品一区二区三区| 国产成人精品三级麻豆| 国产一区二区在线观看免费 | 精品久久久久久久久久久久久久久久久 | 777a∨成人精品桃花网| 欧日韩精品视频| 欧美三级日韩三级| 这里只有精品99re| 久久美女艺术照精彩视频福利播放| 色吧成人激情小说| 欧美日韩国产美| 日韩视频在线永久播放| 久久免费国产精品| 亚洲女同一区二区| 一区二区三区av电影| 日韩黄色免费网站| 国产中文字幕精品| 粉嫩一区二区三区在线看| 99国内精品久久| 欧美日韩国产a| 久久免费视频色| 亚洲美女在线国产| 毛片av中文字幕一区二区| 国产成人欧美日韩在线电影| 色综合久久精品| 7777精品伊人久久久大香线蕉的 | 91蜜桃网址入口| 欧美高清激情brazzers| 精品对白一区国产伦| 国产欧美一区二区精品性色 | 精品久久免费看| 国产精品美女久久久久久久| 亚洲成人中文在线| 精品一区二区三区免费毛片爱| 亚洲另类春色国产| 精品一区二区三区久久久| 波多野结衣91| 欧美大度的电影原声| 日本一区二区三区免费乱视频| 精品福利视频一区二区三区| 亚洲欧美区自拍先锋| 免费三级欧美电影| 99国产精品国产精品久久| 欧美不卡一区二区三区| 一区二区三区成人| 丁香亚洲综合激情啪啪综合| 欧美伦理电影网| 亚洲欧美日韩国产中文在线| 韩国午夜理伦三级不卡影院| 欧美日本一道本| 综合色中文字幕| 国产精品1024| 亚洲精品一区在线观看| 亚洲成年人影院| 欧洲一区二区三区免费视频| 国产精品久久久久久久久搜平片| 国产精品久久久爽爽爽麻豆色哟哟 | 在线看国产日韩| 中文字幕乱码日本亚洲一区二区| 久久久亚洲精品石原莉奈| 午夜欧美大尺度福利影院在线看| 天堂av在线一区| 欧美在线不卡一区| 国产精品久久久久久久蜜臀| 蜜臀av性久久久久蜜臀aⅴ流畅| 久久福利视频一区二区| 欧美精品aⅴ在线视频| 亚洲一区二区高清| 97精品久久久久中文字幕| 中文字幕久久午夜不卡| 加勒比av一区二区| 欧美日韩黄色一区二区| 国产成人av网站| 欧美精品一区二区三区高清aⅴ| 国产亚洲成av人在线观看导航| 日本一区二区成人| 国产乱码一区二区三区| 久久久九九九九| 国产一区二区免费视频| 日韩欧美第一区|