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

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

?? inplaceedit.cpp

?? 操作系統演示程序
?? CPP
字號:
// InPlaceEdit.cpp : implementation file
//
// Written by Chris Maunder (chrismaunder@codeguru.com)
// Copyright (c) 1998.
//
// The code contained in this file is based on the original
// CInPlaceEdit from http://www.codeguru.com/listview/edit_subitems.shtml
//
// 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. 
//
// Modifed 10 May 1998  Uses GVN_ notifications instead of LVN_,
//                      Sends notification messages to the parent, 
//                      instead of the parent's parent.
//
//         15 May 1998  There was a problem when editing with the in-place editor, 
//                      there arises a general protection fault in user.exe, with a 
//                      few qualifications:
//                         (1) This only happens with owner-drawn buttons;
//                         (2) This only happens in Win95
//                         (3) This only happens if the handler for the button does not 
//                             create a new window (even an AfxMessageBox will avoid the 
//                             crash)
//                         (4) This will not happen if Spy++ is running.
//                      PreTranslateMessage was added to route messages correctly.
//                      (Matt Weagle found and fixed this problem)
//         26 Jul 1998  Removed the ES_MULTILINE style - that fixed a few probs!
//          6 Aug 1998  Added nID to the constructor param list
//          6 Sep 1998  Space no longer clears selection when starting edit (Franco Bez)
//         10 Apr 1999  Enter, Tab and Esc key prob fixed (Koay Kah Hoe)
//                      Workaround for bizzare "shrinking window" problem in CE
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "TCHAR.h"
#include "InPlaceEdit.h"

#include "GridCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit

CInPlaceEdit::CInPlaceEdit(CWnd* pParent, CRect& rect, DWORD dwStyle, UINT nID,
                           int nRow, int nColumn, CString sInitText, 
                           UINT nFirstChar)
{
    m_sInitText     = sInitText;
    m_nRow          = nRow;
    m_nColumn       = nColumn;
    m_nLastChar     = 0; 
    m_bExitOnArrows = (nFirstChar != VK_LBUTTON);    // If mouse click brought us here,
                                                     // then no exit on arrows

    m_Rect = rect;  // For bizarre CE bug.
    
    DWORD dwEditStyle = WS_BORDER|WS_CHILD|WS_VISIBLE| ES_AUTOHSCROLL //|ES_MULTILINE
        | dwStyle;
    if (!Create(dwEditStyle, rect, pParent, nID)) return;
    
    SetFont(pParent->GetFont());
    
    SetWindowText(sInitText);
    SetFocus();
    
    switch (nFirstChar){
        case VK_LBUTTON: 
        case VK_RETURN:   SetSel((int)_tcslen(m_sInitText), -1); return;
        case VK_BACK:     SetSel((int)_tcslen(m_sInitText), -1); break;
        case VK_TAB:
        case VK_DOWN: 
        case VK_UP:   
        case VK_RIGHT:
        case VK_LEFT:  
        case VK_NEXT:  
        case VK_PRIOR: 
        case VK_HOME:
        case VK_SPACE:
        case VK_END:      SetSel(0,-1); return;
        default:          SetSel(0,-1);
    }
    
    SendMessage(WM_CHAR, nFirstChar);
}

CInPlaceEdit::~CInPlaceEdit()
{
}

BEGIN_MESSAGE_MAP(CInPlaceEdit, CEdit)
    //{{AFX_MSG_MAP(CInPlaceEdit)
    ON_WM_KILLFOCUS()
    ON_WM_CHAR()
    ON_WM_KEYDOWN()
    ON_WM_GETDLGCODE()
    ON_WM_CREATE()
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit message handlers

// If an arrow key (or associated) is pressed, then exit if
//  a) The Ctrl key was down, or
//  b) m_bExitOnArrows == TRUE
void CInPlaceEdit::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;
    }
    
    CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}

// As soon as this edit loses focus, kill it.
void CInPlaceEdit::OnKillFocus(CWnd* pNewWnd)
{
    CEdit::OnKillFocus(pNewWnd);
    EndEdit();
}

void CInPlaceEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
    if (nChar == VK_TAB || nChar == VK_RETURN)
    {
        m_nLastChar = nChar;
        GetParent()->SetFocus();    // This will destroy this window
        return;
    }
    if (nChar == VK_ESCAPE) 
    {
        SetWindowText(m_sInitText);    // restore previous text
        m_nLastChar = nChar;
        GetParent()->SetFocus();
        return;
    }
    
    CEdit::OnChar(nChar, nRepCnt, nFlags);
    
    // Resize edit control if needed
    
    // Get text extent
    CString str;
    GetWindowText( str );

    // add some extra buffer
    str += _T("  ");
    
    CWindowDC dc(this);
    CFont *pFontDC = dc.SelectObject(GetFont());
    CSize size = dc.GetTextExtent( str );
    dc.SelectObject( pFontDC );
       
    // Get client rect
    CRect ParentRect;
    GetParent()->GetClientRect( &ParentRect );
    
    // Check whether control needs to be resized
    // and whether there is space to grow
    if (size.cx > m_Rect.Width())
    {
        if( size.cx + m_Rect.left < ParentRect.right )
            m_Rect.right = m_Rect.left + size.cx;
        else
            m_Rect.right = ParentRect.right;
        MoveWindow( &m_Rect );
    }
}

UINT CInPlaceEdit::OnGetDlgCode() 
{
    return DLGC_WANTALLKEYS;
}

////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit overrides

// Stoopid win95 accelerator key problem workaround - Matt Weagle.
BOOL CInPlaceEdit::PreTranslateMessage(MSG* pMsg) 
{
    // 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 CWnd::PreTranslateMessage(pMsg);
}

// Auto delete
void CInPlaceEdit::PostNcDestroy() 
{
    CEdit::PostNcDestroy();
    
    delete this;	
}

////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit implementation

void CInPlaceEdit::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_nColumn;
    dispinfo.item.szText  = str;
    dispinfo.item.lParam  = (LPARAM) m_nLastChar; 
    
    CWnd* pOwner = GetOwner();
    if (pOwner)
        pOwner->SendMessage(WM_NOTIFY, GetDlgCtrlID(), (LPARAM)&dispinfo );
    
    // Close this window (PostNcDestroy will delete this)
    PostMessage(WM_CLOSE, 0, 0);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区在线观看| 色噜噜狠狠成人中文综合| 欧美三级蜜桃2在线观看| 26uuuu精品一区二区| 亚洲成av人在线观看| 成人性生交大片免费看视频在线| 欧美疯狂做受xxxx富婆| 亚洲青青青在线视频| 国产成人亚洲综合a∨婷婷图片| 欧美日韩和欧美的一区二区| 亚洲欧美激情在线| 国产精品1024| 精品理论电影在线| 午夜精品久久久久久不卡8050| 成年人国产精品| 欧美精品一区二区三区四区| 日韩在线播放一区二区| 色噜噜狠狠色综合欧洲selulu| 中文字幕高清一区| 国产一区二区三区视频在线播放| 欧美精品三级日韩久久| 一区二区三区精品久久久| 丁香一区二区三区| 久久久91精品国产一区二区三区| 五月激情综合色| 欧美视频一区二区| 亚洲综合成人在线视频| 99re这里都是精品| 综合久久一区二区三区| 99久久伊人久久99| 欧美激情一区二区三区| 激情成人综合网| 日韩精品一区二区三区中文精品| 日韩福利电影在线| 7777精品伊人久久久大香线蕉经典版下载| 一区二区三区在线看| 91福利国产精品| 亚洲精品伦理在线| 欧美在线观看你懂的| 亚洲一区二区四区蜜桃| 日本电影欧美片| 亚洲桃色在线一区| 精品国产凹凸成av人网站| 欧美调教femdomvk| 欧美成人a在线| 蜜桃av一区二区在线观看| 7799精品视频| 免费观看久久久4p| 欧美精品一区二区在线观看| 国产一区二区三区在线观看免费视频 | 亚洲成人综合网站| 欧美三电影在线| 午夜精品福利一区二区蜜股av| 欧美日本在线观看| 免费在线看成人av| 日韩欧美黄色影院| 国产黄色精品视频| 国产精品久久久久婷婷二区次| 成人高清av在线| 又紧又大又爽精品一区二区| 在线观看日产精品| 丝袜亚洲另类欧美综合| 日韩免费福利电影在线观看| 国产精品77777| 成人网在线播放| 国产精品国产三级国产普通话三级| av在线这里只有精品| 亚洲你懂的在线视频| 日韩精品专区在线| 亚洲精品日韩一| 欧美日韩一区在线| 麻豆久久一区二区| 国产欧美一区二区三区在线看蜜臀| caoporn国产一区二区| 亚洲国产乱码最新视频| 精品乱码亚洲一区二区不卡| 成人自拍视频在线| 亚洲线精品一区二区三区| 日韩精品一区二区三区在线观看 | 日韩成人精品视频| 精品电影一区二区| 91一区二区在线| 日本欧美一区二区三区乱码| 久久精品综合网| 91久久精品网| 久久国产精品色| 亚洲天堂免费在线观看视频| 91精品国产手机| 北岛玲一区二区三区四区| 亚洲国产精品一区二区久久恐怖片| 日韩精品一区二区在线| 99国产精品久久久久| 免费一级片91| **性色生活片久久毛片| 日韩写真欧美这视频| 99国产精品久久久久久久久久 | 在线视频一区二区三区| 亚洲成人中文在线| 久久精品视频免费观看| 欧美午夜精品电影| 国产jizzjizz一区二区| 图片区日韩欧美亚洲| 中文字幕av不卡| 欧美一区二区视频在线观看2020 | 国产真实乱子伦精品视频| 亚洲精品高清在线| 久久久久一区二区三区四区| 91国偷自产一区二区开放时间 | 日韩欧美第一区| 色婷婷久久久亚洲一区二区三区| 久久99国产精品尤物| 夜夜嗨av一区二区三区| 久久精品一区四区| 欧美一区二区精品久久911| 99v久久综合狠狠综合久久| 精品一二三四区| 午夜精品久久久久久| 中文字幕日韩av资源站| 日韩欧美亚洲国产另类| 精品久久一区二区| 欧美制服丝袜第一页| 粉嫩aⅴ一区二区三区四区五区| 日韩精品电影一区亚洲| 日韩一区有码在线| 国产日韩欧美精品综合| 欧美一区二区视频在线观看2020| 91精品福利在线| 成人深夜在线观看| 国产剧情在线观看一区二区| 91精品国产麻豆国产自产在线 | 色综合天天综合狠狠| 国产精品99久久久久久宅男| 美美哒免费高清在线观看视频一区二区 | 99精品久久99久久久久| 国产麻豆9l精品三级站| 麻豆精品在线播放| 亚洲午夜精品17c| 一区二区三区在线视频免费| 亚洲欧洲成人自拍| 中文字幕国产一区二区| 国产亚洲人成网站| 久久久久青草大香线综合精品| 日韩三级精品电影久久久| 69堂成人精品免费视频| 欧美日韩欧美一区二区| 欧美专区日韩专区| 色噜噜久久综合| 在线观看一区不卡| 91麻豆蜜桃一区二区三区| 日本女人一区二区三区| 日韩免费电影一区| 九九九精品视频| 欧美在线|欧美| 国产成人精品aa毛片| 91.xcao| 欧美色涩在线第一页| 在线观看亚洲专区| 在线观看一区不卡| 欧美日韩欧美一区二区| 欧美精品 国产精品| 欧美日韩国产a| 欧美二区三区91| 欧美成人性战久久| 精品理论电影在线观看| 久久久久久久性| 精品久久久久久最新网址| 欧美成人女星排名| 久久久美女艺术照精彩视频福利播放| 精品国产精品一区二区夜夜嗨| 日韩免费福利电影在线观看| 久久女同互慰一区二区三区| 国产午夜精品一区二区三区嫩草 | 欧美日韩国产另类不卡| 欧美人妖巨大在线| 日韩欧美一级二级三级久久久| 精品国产成人系列| 国产精品入口麻豆原神| 亚洲三级久久久| 亚洲最新在线观看| 日韩国产高清在线| 国内外成人在线视频| 国产毛片精品国产一区二区三区| 国产综合色精品一区二区三区| 亚洲1区2区3区视频| 免费高清成人在线| 国产不卡视频在线播放| 91麻豆免费在线观看| 欧美日本一区二区三区四区| 欧美va在线播放| 国产精品麻豆欧美日韩ww| 亚洲一卡二卡三卡四卡无卡久久| 日韩精彩视频在线观看| 国产一区二区精品久久99| 99精品黄色片免费大全| 欧美电影在线免费观看| 久久先锋资源网| 亚洲日本一区二区| 热久久久久久久| 成人午夜视频免费看| 欧美视频三区在线播放|