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

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

?? inplaceedit.cpp

?? 數據結構分析工具
?? CPP
字號:
// InPlaceEdit.cpp : implementation file
//
// Adapted by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2000. 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 "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;

    // 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)
    PostMessage(WM_CLOSE, 0, 0);
    bAlreadyEnding = FALSE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利在线导航| 欧美影院午夜播放| 一区二区成人在线| 久久综合国产精品| 欧美色手机在线观看| 国产高清一区日本| 日日夜夜一区二区| 亚洲人成在线观看一区二区| 精品国产乱码久久久久久图片| 色婷婷综合激情| 国产99久久精品| 欧美a级理论片| 亚洲成人av电影在线| 国产精品国产a| 久久精品夜色噜噜亚洲aⅴ| 欧美日韩精品一区二区| 91麻豆免费看| 不卡的av网站| 国产成人精品免费在线| 欧美性videosxxxxx| 成人免费视频一区| 精品一区二区三区视频 | 欧美人妖巨大在线| 91无套直看片红桃| 成人丝袜高跟foot| 国产成人在线视频网站| 精品午夜久久福利影院| 日本三级亚洲精品| 婷婷中文字幕一区三区| 亚洲一区二区成人在线观看| 一区在线播放视频| 国产精品午夜电影| 国产精品天干天干在观线| 国产色综合久久| 久久久久久久久久久久久久久99 | 在线免费精品视频| 色婷婷av一区二区| 欧洲精品一区二区| 欧美主播一区二区三区美女| 91传媒视频在线播放| 色婷婷国产精品综合在线观看| 91亚洲永久精品| av一本久道久久综合久久鬼色| 成人免费不卡视频| 91免费观看视频| 色综合久久久久久久久久久| 色婷婷一区二区三区四区| 91久久久免费一区二区| 在线观看三级视频欧美| 欧美视频一区二区| 69精品人人人人| 日韩精品一区二| 久久精品视频免费观看| 国产精品丝袜久久久久久app| 国产精品美女www爽爽爽| 成人欧美一区二区三区| 亚洲最大成人网4388xx| 日韩电影在线看| 狠狠色综合色综合网络| 成人免费视频播放| 日本道色综合久久| 日韩欧美黄色影院| 国产亚洲1区2区3区| 亚洲三级久久久| 亚洲高清不卡在线| 国产一区二区三区免费| 国产成人免费9x9x人网站视频| 91日韩一区二区三区| 88在线观看91蜜桃国自产| 2020日本不卡一区二区视频| 国产精品美女一区二区| 亚洲一区视频在线| 欧美片网站yy| 久久综合精品国产一区二区三区| 欧美激情一区二区三区四区| 玉足女爽爽91| 麻豆精品新av中文字幕| 成人黄色网址在线观看| 欧美视频日韩视频在线观看| 精品国产91久久久久久久妲己| 成人免费小视频| 麻豆精品新av中文字幕| 9久草视频在线视频精品| 欧美日本国产视频| 国产精品嫩草99a| 午夜精品福利视频网站| 成人综合日日夜夜| 欧美一区二区在线不卡| 国产精品不卡一区二区三区| 日韩国产在线一| 丰满少妇在线播放bd日韩电影| 欧美在线视频不卡| 国产农村妇女毛片精品久久麻豆| 亚洲国产精品久久久久秋霞影院| 国产米奇在线777精品观看| 色美美综合视频| 久久免费视频色| 日韩av一区二区在线影视| 懂色一区二区三区免费观看| 欧美一区二区三区四区久久| 亚洲欧洲日韩在线| 国产一区999| 3751色影院一区二区三区| 亚洲欧美日韩一区二区| 国产一区不卡视频| 7777精品久久久大香线蕉| 中文字幕一区二区三区四区| 国产一区二区三区在线看麻豆| 久久蜜桃一区二区| 日韩1区2区3区| 欧美亚洲一区三区| 最新国产成人在线观看| 久久精品国产久精国产| 欧美裸体bbwbbwbbw| 亚洲免费在线观看视频| thepron国产精品| 国产视频一区二区在线| 久久aⅴ国产欧美74aaa| 欧美夫妻性生活| 亚洲午夜私人影院| 色婷婷精品久久二区二区蜜臀av| 久久精品欧美一区二区三区麻豆| 蜜臂av日日欢夜夜爽一区| 欧美日韩高清一区二区| 伊人一区二区三区| 91农村精品一区二区在线| 国产精品国模大尺度视频| 国产成a人亚洲| 久久人人超碰精品| 国产一区福利在线| 欧美成人综合网站| 精品综合免费视频观看| 精品sm捆绑视频| 韩国欧美国产一区| 久久久国产一区二区三区四区小说| 久久精品久久久精品美女| 日韩精品一区二区三区四区| 美女网站在线免费欧美精品| 日韩一区国产二区欧美三区| 青椒成人免费视频| 精品国产一二三| 国产一区二区h| 国产精品免费网站在线观看| av电影在线观看完整版一区二区| 亚洲欧洲另类国产综合| 色综合久久中文综合久久97| 亚洲最色的网站| 91精品综合久久久久久| 日韩电影在线免费观看| 欧美xxxxxxxx| 欧美一区二区二区| 国内一区二区在线| 国产日韩欧美综合在线| 99精品桃花视频在线观看| 亚洲精品国产高清久久伦理二区| 欧美性做爰猛烈叫床潮| 日本在线观看不卡视频| 欧美精品一区二区三| 成人性生交大片免费看视频在线| 中文字幕亚洲视频| 欧美中文字幕一二三区视频| 肉色丝袜一区二区| 久久日一线二线三线suv| 粉嫩久久99精品久久久久久夜| 1024成人网| 666欧美在线视频| 国产福利一区在线| 亚洲精品国产视频| 日韩一区二区精品葵司在线| 国产成人午夜电影网| 日韩一区日韩二区| 555夜色666亚洲国产免| 国产精品 日产精品 欧美精品| 中文字幕一区二区三中文字幕| 欧美在线|欧美| 国产一区视频网站| 亚洲裸体xxx| 日韩免费电影一区| 99国产精品视频免费观看| 首页亚洲欧美制服丝腿| 国产视频911| 欧美日韩成人综合| 成人免费毛片app| 日韩avvvv在线播放| 国产精品久久久久久久久晋中 | 91精品欧美综合在线观看最新| 国产一区二区三区在线观看精品| 一区二区三区中文在线| 久久亚洲精品国产精品紫薇| 欧美综合久久久| 国产精品亚洲一区二区三区妖精| 亚洲一区二区三区爽爽爽爽爽| 久久综合九色综合欧美亚洲| 欧美性欧美巨大黑白大战| 91精品国产欧美一区二区| 不卡一区二区三区四区| 麻豆国产91在线播放| 一区二区三区在线观看国产| 久久久青草青青国产亚洲免观| 欧美日韩美女一区二区|