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

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

?? inplacelist.cpp

?? 在學習數字信號處理算法程序中用VC編寫的幾個通用算法程序。 卷積計算/DFT與FFT實現/
?? 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一区二区三区免费野_久草精品视频
www.视频一区| 亚洲福利视频一区二区| 日韩亚洲国产中文字幕欧美| 欧美私人免费视频| 色国产精品一区在线观看| 99视频精品免费视频| 色综合天天天天做夜夜夜夜做| 不卡视频一二三四| 不卡的看片网站| 色8久久精品久久久久久蜜| 在线欧美小视频| 欧美精品一二三| 日韩欧美高清一区| 国产日产欧美一区二区三区| 国产日韩精品一区二区三区| 亚洲视频每日更新| 五月天久久比比资源色| 久久激情五月激情| 不卡一卡二卡三乱码免费网站| 91影院在线免费观看| 欧美日韩视频在线一区二区| 欧美电视剧免费全集观看| 国产欧美一区二区三区在线老狼| 亚洲欧洲精品成人久久奇米网| 亚洲男女一区二区三区| 日韩精品1区2区3区| 国产精品99久久久久久有的能看| 成人黄色免费短视频| 欧美在线短视频| 26uuu色噜噜精品一区| 国产精品久久久一区麻豆最新章节| 亚洲影视在线观看| 国产伦精品一区二区三区视频青涩| 不卡在线视频中文字幕| 在线播放国产精品二区一二区四区| 亚洲免费资源在线播放| 天堂久久一区二区三区| 国产成人av一区二区三区在线| 91国偷自产一区二区开放时间| 日韩欧美视频一区| 亚洲理论在线观看| 国产一区不卡精品| 欧美日韩国产高清一区二区三区| 国产午夜精品福利| 午夜视频在线观看一区二区| 粉嫩久久99精品久久久久久夜| 欧美人动与zoxxxx乱| 欧美国产成人精品| 韩日欧美一区二区三区| 欧美日韩一区在线| 亚洲欧美激情插| 国产sm精品调教视频网站| 欧美日韩成人一区二区| 亚洲欧美韩国综合色| 国产传媒久久文化传媒| 欧美一级国产精品| 日韩黄色免费网站| 欧美色综合天天久久综合精品| 国产精品私人影院| 国产毛片精品一区| 精品欧美一区二区三区精品久久| 亚洲一区二区三区在线看| 99视频一区二区三区| 欧美国产日韩一二三区| 国模一区二区三区白浆| 日韩三级视频在线观看| 视频一区视频二区在线观看| 欧美在线小视频| 亚洲精品日日夜夜| 色悠悠久久综合| 亚洲精品水蜜桃| 色悠久久久久综合欧美99| 亚洲天天做日日做天天谢日日欢| 成人免费毛片片v| 欧美激情一二三区| 国产成人精品午夜视频免费| 久久精品视频在线看| 国产aⅴ综合色| 国产精品污网站| eeuss鲁一区二区三区| 亚洲日本韩国一区| 在线精品视频一区二区三四| 亚洲一区在线视频观看| 欧美唯美清纯偷拍| 亚洲国产成人91porn| 欧美二区三区91| 精品在线一区二区| 中文字幕欧美区| 成人免费电影视频| 一区二区三区在线影院| 欧美日韩视频第一区| 蜜臀av一区二区| 久久久久久99久久久精品网站| 国产91色综合久久免费分享| 亚洲欧美在线另类| 欧美色爱综合网| 九色|91porny| 综合分类小说区另类春色亚洲小说欧美| 不卡av在线免费观看| 亚洲一区二区三区四区五区中文| 8x8x8国产精品| 高清视频一区二区| 一区二区高清视频在线观看| 日韩欧美美女一区二区三区| 91行情网站电视在线观看高清版| 亚洲a一区二区| wwwwxxxxx欧美| 色爱区综合激月婷婷| 麻豆成人综合网| 亚洲日本在线观看| 欧美xxx久久| 91电影在线观看| 精品亚洲国产成人av制服丝袜 | 亚洲国产日产av| 精品国产亚洲在线| 91激情在线视频| 国产精品一卡二| 五月婷婷综合激情| 中文字幕亚洲一区二区va在线| 91精品久久久久久久91蜜桃| 99精品欧美一区| 久久99精品久久久久久| 亚洲免费av网站| 国产午夜三级一区二区三| 欧美日韩国产欧美日美国产精品| 国产69精品久久99不卡| 蜜臀a∨国产成人精品| 一区二区三区不卡在线观看| 久久久久久久电影| 欧美一级一区二区| 欧美图片一区二区三区| thepron国产精品| 国产在线视视频有精品| 日本成人在线看| 亚洲一本大道在线| 综合激情网...| 中文字幕高清不卡| 久久午夜老司机| 日韩一区二区三区电影| 欧美日韩精品二区第二页| 91在线视频网址| av网站一区二区三区| 成人毛片视频在线观看| 国产在线播放一区三区四| 美女性感视频久久| 日日摸夜夜添夜夜添精品视频| 一区二区三区高清| 亚洲综合视频在线观看| 《视频一区视频二区| 人人精品人人爱| 亚洲国产精品一区二区久久恐怖片| 亚洲欧洲日产国产综合网| 中文字幕精品一区二区精品绿巨人| 国产婷婷精品av在线| 国产欧美一区视频| 中文字幕一区二区视频| 国产精品久久久久久亚洲毛片| 中文字幕精品—区二区四季| 国产精品麻豆视频| 中文字幕在线观看不卡| 亚洲男人的天堂在线观看| 亚洲免费观看高清| 亚洲一区二区三区四区不卡| 一区二区欧美国产| 天天色天天操综合| 蜜桃精品在线观看| 国产精品一品视频| av电影在线观看一区| 色婷婷精品大在线视频| 欧美日韩一二三区| 欧美电视剧免费全集观看| 久久精品一区二区三区不卡牛牛| 久久精品视频在线看| 亚洲人成精品久久久久久 | 欧美自拍偷拍一区| 欧美性猛交xxxx黑人交 | 国产成人高清在线| 91浏览器在线视频| 欧美一区三区四区| 国产欧美一区二区精品秋霞影院| 国产精品高潮呻吟| 天天操天天干天天综合网| 国产在线观看免费一区| 97久久精品人人做人人爽| 欧美高清视频不卡网| 国产日产欧美一区二区视频| 一区二区在线看| 久草这里只有精品视频| 91久久人澡人人添人人爽欧美| 日韩午夜电影av| 亚洲欧美国产三级| 麻豆精品一区二区三区| 91麻豆免费观看| 久久人人超碰精品| 亚洲小说春色综合另类电影| 91日韩精品一区| 精品国产凹凸成av人导航| 亚洲乱码国产乱码精品精的特点 | 亚洲国产va精品久久久不卡综合| 国产精品综合一区二区|