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

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

?? inplaceedit.cpp

?? 股票軟件
?? 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 "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);
    }

    // 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精品国产色综合久久久蜜香臀| 欧美日韩视频第一区| 欧美三级视频在线| 欧美日韩精品一区二区在线播放 | 日韩视频在线一区二区| 欧美日韩在线观看一区二区| 欧美三级视频在线观看| 在线成人av网站| 日韩三级免费观看| 久久精品亚洲精品国产欧美kt∨ | 亚洲欧美一区二区三区国产精品| 国产精品视频九色porn| 亚洲欧洲日韩av| 亚洲影视在线播放| 青青青伊人色综合久久| 国产在线一区二区| 91在线云播放| 制服丝袜亚洲色图| 国产日韩欧美麻豆| 亚洲黄色小视频| 青草国产精品久久久久久| 国产成人免费视频网站 | 麻豆中文一区二区| 高清不卡一区二区在线| 在线免费精品视频| xnxx国产精品| 亚洲中国最大av网站| 蜜桃久久久久久久| 播五月开心婷婷综合| 欧美在线观看一二区| 日韩女优毛片在线| 综合在线观看色| 久久99热这里只有精品| 99精品欧美一区| 精品区一区二区| 一卡二卡欧美日韩| 国产成人av电影在线播放| 欧美亚洲国产一区在线观看网站 | 一区二区三区日韩在线观看| 久久国产婷婷国产香蕉| 91在线国内视频| 亚洲精品一区二区三区蜜桃下载| 亚洲黄色免费电影| 高清日韩电视剧大全免费| 欧美一级艳片视频免费观看| 亚洲视频在线一区观看| 国产一区二区三区蝌蚪| 欧美三级欧美一级| 亚洲欧洲av另类| 国产91精品一区二区麻豆网站| 欧美三级电影精品| 亚洲人成精品久久久久久| 黄页视频在线91| 在线播放视频一区| 亚洲综合男人的天堂| av爱爱亚洲一区| 中文字幕av资源一区| 久久精品72免费观看| 91精品国产综合久久国产大片| ...xxx性欧美| 成人app在线观看| 国产欧美日韩在线视频| 极品少妇一区二区| 欧美不卡123| 日韩1区2区3区| 91精品国产色综合久久不卡电影 | 国产精品嫩草99a| 久99久精品视频免费观看| 欧美精品 国产精品| 一二三区精品福利视频| 色综合中文综合网| 国产 欧美在线| 国产欧美日韩精品在线| 国产一区二区三区四区五区美女| 精品美女一区二区| 天堂影院一区二区| 欧美一区二区三区色| 麻豆精品视频在线观看免费| 精品三级在线看| 黑人精品欧美一区二区蜜桃| 久久一区二区三区四区| 国产麻豆9l精品三级站| 久久精品一级爱片| 国产激情视频一区二区在线观看 | 成人激情小说网站| 中文字幕精品三区| 一本久久精品一区二区| 亚洲一区免费在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 欧美一级片在线观看| 麻豆精品一区二区av白丝在线| 欧美videos大乳护士334| 韩日欧美一区二区三区| 国产精品国产精品国产专区不片| 色综合久久综合网欧美综合网| 一个色妞综合视频在线观看| 日韩一级欧美一级| 成人一区二区视频| 午夜精品久久久久久久蜜桃app| 日韩视频免费直播| 成人av网址在线| 亚洲成人在线观看视频| 欧美大片一区二区| 99精品视频在线观看| 婷婷夜色潮精品综合在线| 久久精品亚洲国产奇米99| 色8久久精品久久久久久蜜| 奇米色一区二区| 中文字幕一区二区三区四区不卡| 欧洲人成人精品| 国产毛片一区二区| 午夜视频在线观看一区二区| 久久精品一区二区三区不卡| 精品视频一区 二区 三区| 国产一区二区美女诱惑| 亚洲图片一区二区| 国产精品午夜春色av| 91精品国产入口| 色美美综合视频| 成人一区二区三区视频在线观看 | 日韩一区欧美一区| 欧美成人性战久久| 欧美天堂一区二区三区| 成人看片黄a免费看在线| 免费在线观看一区二区三区| 亚洲精品国产a久久久久久 | 欧美视频在线一区二区三区 | 成人免费不卡视频| 久久精品国产一区二区三区免费看| 亚洲欧美偷拍另类a∨色屁股| 2021久久国产精品不只是精品| 欧美日韩亚洲综合| 91影视在线播放| 粉嫩av亚洲一区二区图片| 久久福利视频一区二区| 图片区小说区区亚洲影院| 一区二区三区国产精华| 国产精品国产三级国产普通话99| 久久久欧美精品sm网站 | 国产精品资源网| 日韩国产精品大片| 亚洲成人一区二区在线观看| 亚洲另类春色校园小说| 亚洲欧美日韩在线| 亚洲人妖av一区二区| 亚洲欧洲色图综合| 中文字幕在线观看不卡视频| 欧美国产1区2区| 国产免费久久精品| 欧美激情一区二区三区蜜桃视频 | 成人av网站免费观看| 粉嫩一区二区三区性色av| 国产在线视频不卡二| 麻豆精品久久久| 韩国一区二区三区| 大胆欧美人体老妇| 91麻豆高清视频| 91福利资源站| 91精品在线观看入口| 欧美成人在线直播| 国产欧美精品一区二区三区四区 | 91看片淫黄大片一级在线观看| jlzzjlzz欧美大全| 91蜜桃视频在线| 在线播放91灌醉迷j高跟美女 | 欧美日韩免费观看一区二区三区| 欧美日韩高清一区二区三区| 欧美肥妇bbw| 欧美成人激情免费网| 久久精品一级爱片| 亚洲婷婷综合久久一本伊一区| 一区二区三区小说| 奇米综合一区二区三区精品视频| 韩国三级在线一区| 色噜噜偷拍精品综合在线| 欧美一区二区三区在线看| 久久久精品国产99久久精品芒果 | 国产成人自拍网| 日本伦理一区二区| 日韩美女视频一区二区在线观看| 久久精品亚洲精品国产欧美 | aa级大片欧美| 日韩一区二区不卡| 亚洲欧洲精品一区二区精品久久久 | 1000部国产精品成人观看| 午夜精品久久一牛影视| 国产成人av网站| 欧美亚洲免费在线一区| 久久久青草青青国产亚洲免观| 亚洲激情自拍偷拍| 国产一区二区三区久久久| 99久久精品免费看国产免费软件| 欧美日韩视频在线一区二区| 国产午夜一区二区三区| 日本亚洲免费观看| 色综合久久88色综合天天免费| 日韩女优电影在线观看|