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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? titletip.cpp

?? 功能非常齊全的GridControl,能對(duì)窗體中顯示數(shù)據(jù)庫(kù)數(shù)據(jù)的表格進(jìn)行多種操作.
?? CPP
字號(hào):
////////////////////////////////////////////////////////////////////////////
// TitleTip.cpp : implementation file
//
// Based on code by Zafir Anjum
//
// Adapted by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2000. All Rights Reserved.
//
// 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 Apr 1999  Now accepts a LOGFONT pointer and 
//                      a tracking rect in Show(...)  (Chris Maunder)
//         18 Apr 1999  Resource leak in Show fixed by Daniel Gehriger
//          8 Mar 2000  Added double-click fix found on codeguru
//                      web site but forgot / can't find who contributed it
//         28 Mar 2000  Aqiruse (marked with //FNA)
//                      Titletips now use cell color
//
/////////////////////////////////////////////////////////////////////////////
 
#include "stdafx.h"
#include "gridctrl.h"

#ifndef GRIDCONTROL_NO_TITLETIPS

#include "TitleTip.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTitleTip

CTitleTip::CTitleTip()
{
	// Register the window class if it has not already been registered.
	WNDCLASS wndcls;
	HINSTANCE hInst = AfxGetInstanceHandle();
	if(!(::GetClassInfo(hInst, TITLETIP_CLASSNAME, &wndcls)))
	{
		// otherwise we need to register a new class
		wndcls.style			= CS_SAVEBITS;
		wndcls.lpfnWndProc		= ::DefWindowProc;
		wndcls.cbClsExtra		= wndcls.cbWndExtra = 0;
		wndcls.hInstance		= hInst;
		wndcls.hIcon			= NULL;
		wndcls.hCursor			= LoadCursor( hInst, IDC_ARROW );
		wndcls.hbrBackground	= (HBRUSH)(COLOR_INFOBK +1);
		wndcls.lpszMenuName		= NULL;
		wndcls.lpszClassName	= TITLETIP_CLASSNAME;

		if (!AfxRegisterClass(&wndcls))
			AfxThrowResourceException();
	}

    m_dwLastLButtonDown = ULONG_MAX;
    m_dwDblClickMsecs = GetDoubleClickTime();
}

CTitleTip::~CTitleTip()
{
}


BEGIN_MESSAGE_MAP(CTitleTip, CWnd)
	//{{AFX_MSG_MAP(CTitleTip)
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CTitleTip message handlers

BOOL CTitleTip::Create(CWnd * pParentWnd)
{
	ASSERT_VALID(pParentWnd);

	DWORD dwStyle = WS_BORDER | WS_POPUP; 
	DWORD dwExStyle = WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
	m_pParentWnd = pParentWnd;

	return CreateEx(dwExStyle, TITLETIP_CLASSNAME, NULL, dwStyle, 
                    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
		            NULL, NULL, NULL );
}


// Show 		 - Show the titletip if needed
// rectTitle	 - The rectangle within which the original 
//				    title is constrained - in client coordinates
// lpszTitleText - The text to be displayed
// xoffset		 - Number of pixel that the text is offset from
//				   left border of the cell
void CTitleTip::Show(CRect rectTitle, LPCTSTR lpszTitleText, int xoffset /*=0*/,
                     LPRECT lpHoverRect /*=NULL*/,
                     const LOGFONT* lpLogFont /*=NULL*/,
                     COLORREF crTextClr /* CLR_DEFAULT */,
                     COLORREF crBackClr /* CLR_DEFAULT */)
{
	ASSERT( ::IsWindow( GetSafeHwnd() ) );

    if (rectTitle.IsRectEmpty())
        return;

	// If titletip is already displayed, don't do anything.
	if( IsWindowVisible() ) 
		return;

    m_rectHover = (lpHoverRect != NULL)? lpHoverRect : rectTitle;
    m_rectHover.right++; m_rectHover.bottom++;

	m_pParentWnd->ClientToScreen( m_rectHover );
    ScreenToClient( m_rectHover );

	// Do not display the titletip is app does not have focus
	if( GetFocus() == NULL )
		return;

	// Define the rectangle outside which the titletip will be hidden.
	// We add a buffer of one pixel around the rectangle
	m_rectTitle.top    = -1;
	m_rectTitle.left   = -xoffset-1;
	m_rectTitle.right  = rectTitle.Width()-xoffset;
	m_rectTitle.bottom = rectTitle.Height()+1;

	// Determine the width of the text
	m_pParentWnd->ClientToScreen( rectTitle );

	CClientDC dc(this);
	CString strTitle = _T("");
    strTitle += _T(" ");
    strTitle += lpszTitleText; 
    strTitle += _T(" ");

	CFont font, *pOldFont = NULL;
    if (lpLogFont)
    {
        font.CreateFontIndirect(lpLogFont);
	    pOldFont = dc.SelectObject( &font );
    }
    else
    {
        // use same font as ctrl
	    pOldFont = dc.SelectObject( m_pParentWnd->GetFont() );
    }

	CSize size = dc.GetTextExtent( strTitle );

    TEXTMETRIC tm;
    dc.GetTextMetrics(&tm);
    size.cx += tm.tmOverhang;

	CRect rectDisplay = rectTitle;
	rectDisplay.left += xoffset;
	rectDisplay.right = rectDisplay.left + size.cx + xoffset;
    
    // Do not display if the text fits within available space
    if ( rectDisplay.right > rectTitle.right-xoffset )
    {
        // Show the titletip
        SetWindowPos( &wndTop, rectDisplay.left, rectDisplay.top, 
            rectDisplay.Width(), rectDisplay.Height(), 
            SWP_SHOWWINDOW|SWP_NOACTIVATE );
        
        // FNA - handle colors correctly
        if (crBackClr != CLR_DEFAULT)
        {
		    CBrush backBrush(crBackClr);
		    CBrush* pOldBrush = dc.SelectObject(&backBrush);
		    CRect rect;
		    dc.GetClipBox(&rect);     // Erase the area needed 

		    dc.PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),  PATCOPY);
		    dc.SelectObject(pOldBrush);
	    }
        // Set color
        if (crTextClr != CLR_DEFAULT)//FNA
            dc.SetTextColor(crTextClr);//FA

        dc.SetBkMode( TRANSPARENT );
        dc.TextOut( 0, 0, strTitle );
        SetCapture();
    }
    
    dc.SelectObject( pOldFont );
}

void CTitleTip::Hide()
{
  	if (!::IsWindow(GetSafeHwnd()))
        return;

    if (GetCapture()->GetSafeHwnd() == GetSafeHwnd())
        ReleaseCapture();

	ShowWindow( SW_HIDE );
}

void CTitleTip::OnMouseMove(UINT nFlags, CPoint point) 
{
    if (!m_rectHover.PtInRect(point)) 
    {
        Hide();
        
        // Forward the message
        ClientToScreen( &point );
        CWnd *pWnd = WindowFromPoint( point );
        if ( pWnd == this ) 
            pWnd = m_pParentWnd;
        
        int hittest = (int)pWnd->SendMessage(WM_NCHITTEST,0,MAKELONG(point.x,point.y));
        
        if (hittest == HTCLIENT) {
            pWnd->ScreenToClient( &point );
            pWnd->PostMessage( WM_MOUSEMOVE, nFlags, MAKELONG(point.x,point.y) );
        } else {
            pWnd->PostMessage( WM_NCMOUSEMOVE, hittest, MAKELONG(point.x,point.y) );
        }
    }
}

BOOL CTitleTip::PreTranslateMessage(MSG* pMsg) 
{
    // Used to qualify WM_LBUTTONDOWN messages as double-clicks
    DWORD dwTick=0;
    BOOL bDoubleClick=FALSE;

    CWnd *pWnd;
	int hittest;
	switch (pMsg->message)
	{
	case WM_LBUTTONDOWN:
       // Get tick count since last LButtonDown
        dwTick = GetTickCount();
        bDoubleClick = ((dwTick - m_dwLastLButtonDown) <= m_dwDblClickMsecs);
        m_dwLastLButtonDown = dwTick;
        // NOTE: DO NOT ADD break; STATEMENT HERE! Let code fall through

	case WM_RBUTTONDOWN:
	case WM_MBUTTONDOWN:
		POINTS pts = MAKEPOINTS( pMsg->lParam );
		POINT  point;
		point.x = pts.x;
		point.y = pts.y;
		ClientToScreen( &point );
		pWnd = WindowFromPoint( point );
		if( pWnd == this ) 
			pWnd = m_pParentWnd;

		hittest = (int)pWnd->SendMessage(WM_NCHITTEST,0,MAKELONG(point.x,point.y));

		if (hittest == HTCLIENT) {
			pWnd->ScreenToClient( &point );
			pMsg->lParam = MAKELONG(point.x,point.y);
		} else {
			switch (pMsg->message) {
			case WM_LBUTTONDOWN: 
				pMsg->message = WM_NCLBUTTONDOWN;
				break;
			case WM_RBUTTONDOWN: 
				pMsg->message = WM_NCRBUTTONDOWN;
				break;
			case WM_MBUTTONDOWN: 
				pMsg->message = WM_NCMBUTTONDOWN;
				break;
			}
			pMsg->wParam = hittest;
			pMsg->lParam = MAKELONG(point.x,point.y);
		}

        Hide();

        // If this is the 2nd WM_LBUTTONDOWN in x milliseconds,
        // post a WM_LBUTTONDBLCLK message instead of a single click.
        pWnd->PostMessage(  bDoubleClick ? WM_LBUTTONDBLCLK : pMsg->message,
                            pMsg->wParam,
                            pMsg->lParam);
		return TRUE;	
		
	case WM_KEYDOWN:
	case WM_SYSKEYDOWN:
        Hide();
		m_pParentWnd->PostMessage( pMsg->message, pMsg->wParam, pMsg->lParam );
		return TRUE;
	}

	if( GetFocus() == NULL )
	{
        Hide();
		return TRUE;
	}

	return CWnd::PreTranslateMessage(pMsg);
}

#endif // GRIDCONTROL_NO_TITLETIPS

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美日韩| 午夜激情一区二区三区| 欧美日韩精品二区第二页| 国产一区二区三区国产| 亚洲视频每日更新| 久久精品综合网| 3d动漫精品啪啪1区2区免费| 91视频精品在这里| 国产精品亚洲人在线观看| 舔着乳尖日韩一区| 一区二区三区成人| 国产精品久久久久一区二区三区 | 高清不卡一区二区| 欧美大片顶级少妇| 成人自拍视频在线| 久久国产尿小便嘘嘘| 亚洲国产成人av| 亚洲欧美色综合| 国产精品人妖ts系列视频| 久久综合久久久久88| 日韩一本二本av| 欧美群妇大交群中文字幕| 91论坛在线播放| www.在线成人| 成人av影视在线观看| 国产河南妇女毛片精品久久久| 日韩国产在线观看一区| 亚洲一区二区四区蜜桃| 亚洲三级在线播放| 亚洲色图欧美激情| 亚洲摸摸操操av| 中文字幕在线观看不卡视频| 国产免费成人在线视频| 久久久久综合网| 国产欧美日韩一区二区三区在线观看| 日韩女同互慰一区二区| 日韩三级视频中文字幕| 91精品国产综合久久精品| 欧美精品日韩一本| 在线播放91灌醉迷j高跟美女| 欧美日韩精品免费| 51精品视频一区二区三区| 欧美丰满一区二区免费视频| 欧美日韩精品欧美日韩精品一| 欧美日韩一区三区四区| 欧美一区二区视频观看视频| 欧美一区永久视频免费观看| 日韩欧美成人一区| 久久久久久毛片| 欧美国产日韩精品免费观看| 国产精品久久福利| 亚洲综合无码一区二区| 亚洲第一精品在线| 老司机精品视频一区二区三区| 久久国产精品第一页| 国产精品91一区二区| 国产成人免费xxxxxxxx| av色综合久久天堂av综合| 91色婷婷久久久久合中文| 欧美专区在线观看一区| 欧美精品三级日韩久久| 欧美精品一区二区在线观看| 国产精品久线观看视频| 亚洲综合在线视频| 免费成人在线网站| 成人丝袜视频网| 欧美性色aⅴ视频一区日韩精品| 欧美一级黄色录像| 国产亚洲美州欧州综合国| 亚洲免费观看高清完整版在线 | 福利电影一区二区| 91免费视频网址| 日韩午夜在线影院| 国产精品久久久久一区| 日韩av中文字幕一区二区| 国产精一品亚洲二区在线视频| 91丨porny丨蝌蚪视频| 欧美高清视频一二三区| 欧美激情综合在线| 亚洲一区二区欧美日韩| 久久国内精品视频| 91啪九色porn原创视频在线观看| 制服.丝袜.亚洲.另类.中文| 欧美激情中文字幕一区二区| 午夜精品久久久久| 成人午夜视频福利| 欧美一区二区网站| 日韩一区中文字幕| 黑人巨大精品欧美黑白配亚洲| 93久久精品日日躁夜夜躁欧美| 日韩欧美国产午夜精品| 亚洲精品乱码久久久久| 国产麻豆午夜三级精品| 欧美理论在线播放| 日韩理论片在线| 国模一区二区三区白浆 | 久久综合色天天久久综合图片| 亚洲精品成人在线| 国产69精品久久久久毛片 | 成人欧美一区二区三区白人| 久久成人麻豆午夜电影| 欧美色手机在线观看| 国产精品色一区二区三区| 九色综合国产一区二区三区| 日本韩国欧美一区二区三区| 日本一区二区电影| 韩国精品主播一区二区在线观看| 欧美日韩国产a| 国产精品理论片在线观看| 激情五月播播久久久精品| 欧美中文字幕一区| 亚洲欧美色一区| 国产成人亚洲精品青草天美| 日韩欧美亚洲国产精品字幕久久久| 亚洲免费在线播放| 99热在这里有精品免费| 久久婷婷久久一区二区三区| 另类专区欧美蜜桃臀第一页| 欧美精品日日鲁夜夜添| 亚洲成人激情av| 91成人在线免费观看| 亚洲色图欧洲色图婷婷| 99精品1区2区| 日韩美女视频19| 成人app下载| 国产精品女主播av| 成人精品国产一区二区4080| 国产欧美一区二区精品秋霞影院| 国产最新精品精品你懂的| 精品国产露脸精彩对白| 久久爱www久久做| 欧美刺激脚交jootjob| 蜜桃视频免费观看一区| 91精品在线免费观看| 日韩成人一区二区三区在线观看| 欧美日韩一区二区三区不卡| 亚洲午夜精品网| 欧美精品在线视频| 日本欧美加勒比视频| 欧美一区二区精美| 经典三级在线一区| 久久精品亚洲麻豆av一区二区| 国产成人综合精品三级| 国产精品久久久久婷婷| 色综合天天做天天爱| 亚洲精品国产高清久久伦理二区| 欧美性极品少妇| 日本不卡在线视频| 欧美成人性福生活免费看| 国产精品一区不卡| 国产精品网站在线| 91丨国产丨九色丨pron| 亚洲成人av在线电影| 日韩视频免费直播| 国产精品小仙女| 亚洲日本在线看| 欧美亚洲一区二区在线| 日韩在线播放一区二区| 精品国产123| 色综合一区二区| 性感美女久久精品| 精品国产123| 91无套直看片红桃| 日韩福利电影在线| 久久色.com| 色噜噜偷拍精品综合在线| 日韩精品一级中文字幕精品视频免费观看 | 欧美一区二区三区四区在线观看| 国产真实乱对白精彩久久| 国产精品视频九色porn| 欧美视频精品在线| 激情综合色综合久久综合| 亚洲色欲色欲www在线观看| 欧美一区二区视频在线观看2022 | 亚洲视频一区在线观看| 欧美一区二区福利在线| 成人中文字幕电影| 午夜精品久久久久久久99樱桃| 久久久精品国产免费观看同学| 色婷婷综合久久久中文一区二区| 秋霞成人午夜伦在线观看| 中文字幕一区二区三区精华液| 欧美美女激情18p| www.欧美精品一二区| 蜜臀av性久久久久蜜臀aⅴ四虎| 中文字幕永久在线不卡| 91精品在线观看入口| eeuss国产一区二区三区| 免费精品视频最新在线| 亚洲男同性视频| 久久久久久麻豆| 91麻豆精品国产无毒不卡在线观看| 成人影视亚洲图片在线| 免费的成人av| 亚洲一区二区三区美女| 国产视频在线观看一区二区三区| 欧美美女黄视频| 色吊一区二区三区| 大胆亚洲人体视频| 精品一区二区三区在线观看国产 |