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

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

?? inplaceedit.cpp

?? 是一個GridTree的控件
?? CPP
字號:
// InPlaceEdit.cpp : implementation file
//
// Adapted by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2002. All Rights Reserved.
//
// 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 and all copyright 
// notices remains intact. 
//
// An email letting me know how you are using it would be nice as well. 
//
// 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.
//
// For use with CGridCtrl v2.10+
//
// History:
//         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 "..\Include\InPlaceEdit.h"

#include "..\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);
    }

    // Added by KiteFly. When entering DBCS chars into cells the first char was being lost
    // SenMessage changed to PostMessage (John Lagerquist)
    if( nFirstChar < 0x80)
        PostMessage(WM_CHAR, nFirstChar);   
    else
        PostMessage(WM_IME_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;

    // EFW - BUG FIX - Clicking on a grid scroll bar in a derived class
    // that validates input can cause this to get called multiple times
    // causing assertions because the edit control goes away the first time.
    static BOOL bAlreadyEnding = FALSE;

    if(bAlreadyEnding)
        return;

    bAlreadyEnding = TRUE;
    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.strText  = 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)
    if (IsWindow(GetSafeHwnd()))
        SendMessage(WM_CLOSE, 0, 0);
    bAlreadyEnding = FALSE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩美女视频在线| 国产一区二区三区免费看| 91网站在线播放| 国产精品久久久久久久久图文区| 国产精品1区2区| 国产精品久久久久久久久久免费看| 国产成人免费在线视频| 亚洲视频免费在线观看| 欧美丝袜丝交足nylons图片| 五月天中文字幕一区二区| 欧美一区二区三区在线| 国产精一品亚洲二区在线视频| 久久精品亚洲一区二区三区浴池 | 国产一区二区三区免费看| 久久综合一区二区| 不卡一区中文字幕| 亚洲国产aⅴ天堂久久| 91精品国产免费| 国产夫妻精品视频| 一级中文字幕一区二区| 欧美一区二区二区| 国产xxx精品视频大全| 亚洲精品水蜜桃| 91精品国产综合久久婷婷香蕉| 国产一区不卡视频| 一区二区三区在线观看欧美| 欧美一区二区三区免费在线看| 国产高清成人在线| 亚洲高清视频在线| 欧美精品一区在线观看| 在线一区二区三区四区| 精品一区二区三区的国产在线播放| 亚洲国产高清在线| 欧美一区二区啪啪| 99精品视频在线观看| 理论电影国产精品| 一区二区三区在线免费观看| 国产午夜亚洲精品羞羞网站| 欧美精品一级二级三级| 成人ar影院免费观看视频| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产精品嫩草影院av蜜臀| 91麻豆精品国产91| 欧美在线高清视频| 99久久综合99久久综合网站| 精品在线你懂的| 亚州成人在线电影| 亚洲特级片在线| 久久精品男人的天堂| 日韩一区二区三区高清免费看看| 99久久久久久| 国产一区二区伦理| 国产91丝袜在线18| 精品亚洲aⅴ乱码一区二区三区| 亚洲精品免费在线观看| 国产欧美一区二区三区网站| 欧美一区二区免费| 欧美一区二区三区小说| 欧美日韩在线播放三区四区| 92精品国产成人观看免费| 国产·精品毛片| 国产综合久久久久久久久久久久| 秋霞影院一区二区| 亚洲国产日韩一区二区| 亚洲男人的天堂在线aⅴ视频| 国产精品午夜免费| 国产欧美日韩综合精品一区二区| 日韩免费在线观看| 日韩西西人体444www| 91精品国产色综合久久不卡蜜臀| 欧美亚洲国产一区二区三区va| 99久久国产综合精品女不卡| 成人av免费在线观看| 成人av网址在线观看| 成人av资源站| 国产东北露脸精品视频| 国产a精品视频| 国产精品一二三四五| 国产91精品在线观看| 成人国产视频在线观看| 成人性色生活片| 不卡av在线网| 91影院在线免费观看| 91麻豆免费观看| 色一情一伦一子一伦一区| 色综合久久66| 欧美日韩在线播放一区| 欧美一区二区在线播放| 欧美一区二区精美| 国产情人综合久久777777| 国产欧美日韩不卡| 亚洲欧美综合网| 亚洲国产综合在线| 美女视频黄 久久| 国产一区二区在线看| 成人高清在线视频| 91国在线观看| 日韩一区二区在线观看| 久久网站最新地址| 《视频一区视频二区| 亚洲国产日韩a在线播放性色| 丝袜诱惑制服诱惑色一区在线观看| 奇米综合一区二区三区精品视频| 伦理电影国产精品| 成人免费视频播放| 欧美丝袜自拍制服另类| 久久亚洲欧美国产精品乐播| 国产精品久线在线观看| 亚洲国产美国国产综合一区二区| 免费精品视频最新在线| 成人一区二区三区| 欧美军同video69gay| 久久中文娱乐网| 一区二区三区在线不卡| 美女国产一区二区| 91在线观看一区二区| 91麻豆精品国产综合久久久久久| 色婷婷综合久久久中文字幕| 一区二区三区四区国产精品| 91久久一区二区| 最新欧美精品一区二区三区| 视频在线观看一区二区三区| 国产福利一区在线| 精品国产区一区| 1024成人网色www| 蜜桃av噜噜一区二区三区小说| 久久疯狂做爰流白浆xx| 成人午夜又粗又硬又大| 欧美一区二区私人影院日本| 日韩伦理av电影| 久久99久久精品欧美| 日本高清无吗v一区| 久久久国产精品午夜一区ai换脸| 亚洲午夜久久久久久久久久久 | 亚洲成a天堂v人片| 国产成人综合网| 51午夜精品国产| **欧美大码日韩| 顶级嫩模精品视频在线看| 欧美一区二区在线观看| 亚洲一区视频在线| 成人av第一页| 欧美经典一区二区| 精品一区二区在线视频| 欧美男生操女生| 一区二区激情小说| 99热这里都是精品| 欧美激情资源网| 国产成人在线电影| 欧美成人精品3d动漫h| 亚洲国产综合91精品麻豆| 99久久99久久综合| 国产精品家庭影院| 成人网页在线观看| 久久精品视频免费观看| 国产一区二区电影| 久久人人爽爽爽人久久久| 免费看黄色91| 日韩欧美色综合| 美女高潮久久久| 日韩午夜激情免费电影| 日韩高清一区二区| 91精品国产91久久久久久最新毛片| 亚洲综合无码一区二区| 色婷婷久久久综合中文字幕| 亚洲欧洲日产国产综合网| 成人黄色国产精品网站大全在线免费观看| 久久免费美女视频| 国产成人日日夜夜| 国产精品素人视频| 丁香六月综合激情| 国产日产精品1区| 国产黄色成人av| 欧美高清在线一区二区| 风流少妇一区二区| 中文字幕免费在线观看视频一区| 国产精品一区二区久久精品爱涩| 久久亚洲春色中文字幕久久久| 黄色精品一二区| 国产欧美一区二区精品性色超碰| 国产iv一区二区三区| 国产精品国产自产拍在线| 91丨porny丨首页| 亚洲精品亚洲人成人网在线播放| 欧美日韩中字一区| 青青青爽久久午夜综合久久午夜| 精品久久国产字幕高潮| 国产福利不卡视频| 亚洲另类在线一区| 欧美久久久久久久久久| 精品亚洲国产成人av制服丝袜| 国产午夜精品美女毛片视频| 91免费观看视频| 日韩激情在线观看| 国产亚洲综合在线| 欧美综合亚洲图片综合区| 热久久一区二区| 中文字幕一区不卡| 日韩一区二区在线观看视频| 懂色av一区二区在线播放|