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

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

?? docktabpane.h

?? These listed libraries are written in WTL. But it s really hard to mix both MFC & WTL together. Obvi
?? H
?? 第 1 頁 / 共 2 頁
字號:
#ifndef __DOCKTAB_PANE_H__
#define __DOCKTAB_PANE_H__

#ifndef __ATLWIN_H__
	#error DockTabSplitPane.h requires atlwin.h to be included first
#endif

#ifndef __ATLSPLIT_H__
	#error DockTabSplitPane.h requires atlsplit.h to be included first
#endif

#ifndef __ATLCOLL_H__
	#error DockTabSplitPane.h requires atlcoll.h to be included first
#endif

#ifndef __CUSTOMTABCTRL_H__
	#error DockTabSplitPane.h requires CustomTabCtrl.h to be included first
#endif

#ifndef __DOTNET_TABCTRL_H__
	#error DockTabSplitPane.h requires DotNetTabCtrl.h to be included first
#endif

/*********************************************************************
DockSplitTab::TabControl and 
DockSplitTab::TabPane classes implementation

Written by Igor Katrayev.
Copyright (c) 2003 Igor Katrayev.

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. 

This code is also based of work done by Bjarke Viksoe (bjarke@viksoe.dk)
and Daniel Bowen (dbowen@es.com).

This file is provided "as is" with no expressed or implied warranty.
The author accepts no liability if it causes any damage to you or your
computer whatsoever. It's free, so don't hassle me about it.

Beware of bugs.
**********************************************************************/

namespace DockSplitTab {
	
	class CallBackListener {
	public:
		
		// client notification
		virtual void clientActivate(  HWND childWnd, HWND clientViewWnd) = 0;
		virtual void clientDblClick(  HWND childWnd, HWND clientViewWnd) = 0;
		virtual void clientCloseClick(     HWND childWnd, HWND clientViewWnd) = 0;
		
		// drag and drop notifications
		virtual void dragStart(  HWND childWnd, HWND clientViewWnd, long x, long y, DWORD keysPressed) = 0;
		virtual void dragOver(   HWND childWnd, HWND clientViewWnd, long x, long y, DWORD keysPressed) = 0;
		virtual void dragDrop(   HWND childWnd, HWND clientViewWnd, long x, long y, DWORD keysPressed) = 0;
		virtual void dragCancel( HWND childWnd, HWND clientViewWnd) = 0;
		
		// 
		void trackDragAndDrop( HWND hWnd, POINT startPoint, bool lockWindowUpdate = false) {
			
			ATLASSERT( NULL != this);
			ATLASSERT( ::IsWindow( hWnd));
			
			if ( !::DragDetect( hWnd, startPoint))
				return;
				
			// tracker drawing conflicts with dock pane drawing
			// disable drawing in the window during drag and drop operations.
			if ( lockWindowUpdate)
				::LockWindowUpdate( hWnd);
			
			MSG msg;
			bool dragging = false;
			::SetCapture( hWnd);
			while( ( ::GetCapture()==hWnd) && ( ::GetMessage( &msg, NULL, 0, 0))) {
				
				CPoint hitPoint = CPoint( GET_X_LPARAM( msg.lParam), GET_Y_LPARAM( msg.lParam));
				::ClientToScreen( hWnd, &hitPoint);
				switch( msg.message) {
				case WM_MOUSEMOVE:
					
					if ( !dragging) {
						
						dragging = true;
						this->dragStart( hWnd, NULL, hitPoint.x, hitPoint.y, static_cast<DWORD>(msg.wParam));
					}
					this->dragOver( hWnd, NULL, hitPoint.x, hitPoint.y, static_cast<DWORD>(msg.wParam));
					break;
					
				case WM_LBUTTONUP:
					
					if ( dragging) {
						dragging = false;
						this->dragDrop( hWnd, NULL, hitPoint.x, hitPoint.y, static_cast<DWORD>(msg.wParam));
					}
					::ReleaseCapture();
					break;
					
				case WM_KEYDOWN:
				case WM_SYSKEYDOWN:
					
					switch ( msg.wParam) {
					case VK_CONTROL:
					case VK_SHIFT:
						break;
					default:
						if ( dragging) {
							dragging = false;
							this->dragCancel( hWnd, NULL);
						}
						::ReleaseCapture();
					}
				default:
					::TranslateMessage(&msg);
					::DispatchMessage( &msg);
				}
			}
			
			// tidy up
			if ( dragging)
				this->dragCancel( hWnd, NULL);
			
			if ( lockWindowUpdate)
				::LockWindowUpdate( NULL);
			return;
		}
		
	}; // interface CallBackListenerr
	
	class TabControlItem: public CCustomTabItem {
	public:
		
		TabControlItem()
			: CCustomTabItem()
			, clientViewWnd( NULL)
		{}
		
		HWND clientViewWnd;
	};
	
	class TabControl: public CDotNetTabCtrlImpl< TabControl, TabControlItem> {
	
	// protected class members
	protected:
		
		typedef CDotNetTabCtrlImpl< TabControl, TabControlItem> baseClass;
		CallBackListener* cbListener;
		int height;
		
	public:
		
		TabControl( CallBackListener* listener)
			: CDotNetTabCtrlImpl<TabControl, TabControlItem>()
			, cbListener( listener)
			, height( 0)
		{}
		
		// Methods
		void create( HWND parentWnd, bool tabOnTop = false) {
			
			
			DWORD style = TCS_FOCUSNEVER | WS_VISIBLE | WS_CHILD;//| TCS_FLATBUTTONS | TCS_BUTTONS
			
			style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CTCS_SCROLL | CTCS_CLOSEBUTTON | CTCS_FLATEDGE | CTCS_BOLDSELECTEDTAB | CTCS_TOOLTIPS;

			if ( !tabOnTop)
				style |= CTCS_BOTTOM;
			
			DWORD exStyle = TCS_EX_REGISTERDROP; //| TCS_EX_FLATSEPARATORS
			this->Create( parentWnd, rcDefault, NULL, style, exStyle);
			this->SetDlgCtrlID(0);
			
			// calculate tab height
			const int nNominalHeight = 24;
			const int nNominalFontLogicalUnits = 11;	// 8 point Tahoma with 96 DPI
			
			// Initialize nFontLogicalUnits to the typical case
			// appropriate for CDotNetTabCtrl
			LOGFONT lfIcon = { 0 };
			::SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfIcon), &lfIcon, 0);
			int nFontLogicalUnits = -lfIcon.lfHeight;
			
			// Use the actual font of the tab control
			if( this->IsWindow()) {
				
				HFONT hFont = this->GetFont();
				if ( hFont != NULL) {
					
					CDC dc = this->GetDC();
					CFontHandle hFontOld = dc.SelectFont(hFont);
					TEXTMETRIC tm = {0};
					dc.GetTextMetrics(&tm);
					nFontLogicalUnits = tm.tmAscent;
					dc.SelectFont(hFontOld);
				}
			}
			
			this->height = nNominalHeight + ( ::MulDiv(nNominalHeight, nFontLogicalUnits, nNominalFontLogicalUnits) - nNominalHeight ) / 2;
		}
		
		int getHeight() {
			return this->height;
		}
		
		HWND getWND( int index) const {
			
			ATLASSERT( 0 <= index && index < this->GetItemCount());
			
			return this->GetItem( index)->clientViewWnd;
		}
		
		int getIndex( HWND win) const {
			
			for ( int i=0; i<this->GetItemCount(); i++)
				if ( this->GetItem( i)->clientViewWnd == win)
					return i;
			
			return -1;
		}
		
		bool removeTab( HWND clientViewWnd) {
			
			int index = this->getIndex( clientViewWnd);
			if ( index == -1)
				return false;
			
			return this->DeleteItem( index) == TRUE;
		}
		
		bool removeTab( int index) {
			
			ATLASSERT( 0 <= index && index < this->GetItemCount());
			
			return this->DeleteItem( index) == TRUE;
		}
		
		int getCurrentTab() const {
			
			return this->GetCurSel();
		}
		
		int setCurrentTab( int index) {
			
			ATLASSERT( 0 <= index && index < this->GetItemCount());
			
			int result = this->SetCurSel( index);
			if ( result > -1 && index != result)
				::ShowWindow( this->getWND( result), FALSE);
			return result;
		}
		
		// Message map handlers
		DECLARE_WND_CLASS(_T("DockTab::TabControl"))  
		
		BEGIN_MSG_MAP( TabControl)
			
			MESSAGE_HANDLER( WM_CREATE,        OnCreate)
			MESSAGE_HANDLER( WM_CONTEXTMENU,   OnContextMenu)
			MESSAGE_HANDLER( WM_LBUTTONDOWN,   OnLButtonDown)
//			MESSAGE_HANDLER( WM_LBUTTONDBLCLK, OnLDoubleClick)
			MESSAGE_HANDLER( WM_MOUSEACTIVATE, OnMouseActivate)
//			MESSAGE_HANDLER( WM_MOUSEMOVE,     OnMouseMove)
			
			CHAIN_MSG_MAP( baseClass)
		END_MSG_MAP()
		
		LRESULT OnMouseActivate( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
			
			LRESULT result;
			baseClass::ProcessWindowMessage( this->m_hWnd, uMsg, wParam, lParam, result);
			if ( MA_ACTIVATE == result || MA_ACTIVATEANDEAT == result)
				this->SetFocus();
			return result;
		}
		
		LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
			
			CPoint hitPoint( GET_X_LPARAM( lParam), GET_Y_LPARAM( lParam));
			this->ScreenToClient( &hitPoint);
			CTCHITTESTINFO hci;
			hci.pt.x = hitPoint.x;
			hci.pt.y = hitPoint.y;
			hci.flags = TCHT_ONITEM;
			int tabItemTarget = this->HitTest( &hci);
			if ( tabItemTarget > -1) {
				
				this->SetCurSel( tabItemTarget);
				::SendMessage( this->getWND( tabItemTarget)
							, WM_CONTEXTMENU
							, wParam
							, lParam
							);
			}
			return 0;
		}
		
		LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
			
			// process with the default handler. select a 駂osen item
			LRESULT result;
			baseClass::ProcessWindowMessage( this->m_hWnd, uMsg, wParam, lParam, result);
			
			//CRect clientRect;
			//this->GetClientRect( clientRect);
			//CRect closeButtonRect = clientRect;
			//CRect scrollButtonRect = clientRect;
			//CRect nonClientRect = clientRect;
			//this->CalcSize_CloseButton( closeButtonRect);
			//this->CalcSize_ScrollButtons( scrollButtonRect);
			//this->CalcSize_NonClient( nonClientRect);
			
			CRect itemRect;
			int tabItem = this->GetCurSel();
			CPoint startHitPoint( GET_X_LPARAM( lParam), GET_Y_LPARAM( lParam));
			
			if (    tabItem < 0
				 //|| closeButtonRect.PtInRect( startHitPoint)  /***** ti does not work unfortunately*****/
				 //|| scrollButtonRect.PtInRect( startHitPoint)
				 //|| nonClientRect.PtInRect( startHitPoint)
			     || !this->GetItemRect( tabItem, itemRect)
				 || !itemRect.PtInRect( startHitPoint)
			     || !::DragDetect( this->m_hWnd, startHitPoint)
			   )
				return result;
			
			HCURSOR cursorSizeWE = LoadCursor( NULL, IDC_SIZEWE);
			HCURSOR oldCursor = ::GetCursor();
			
			// do drag and drop
			
			::SetCapture( this->m_hWnd);
			HWND clientViewWnd = this->getWND( tabItem);
			
			bool globalDrag = false;
			MSG msg;
			while( ( ::GetCapture()==this->m_hWnd) && ( ::GetMessage( &msg, NULL, 0, 0))) {
				
				CTCHITTESTINFO hci;
				int tabItemTarget;
				
				switch(msg.message) {
				case WM_MOUSEMOVE:
				{
					CPoint hitPoint( GET_X_LPARAM( msg.lParam), GET_Y_LPARAM( msg.lParam));
					hci.pt.x = hitPoint.x;
					hci.pt.y = hitPoint.y;
					hci.flags = TCHT_ONITEM;
					tabItemTarget = this->HitTest( &hci);
					
					::SetCursor( ( tabItemTarget == tabItem && startHitPoint != hitPoint)? cursorSizeWE: oldCursor);
					
					if ( tabItemTarget > -1 && tabItemTarget != tabItem) {
						
						// tab shifting
						if ( globalDrag) {
							globalDrag = false;
							this->cbListener->dragCancel( this->m_hWnd, clientViewWnd);
						}
						
						if ( tabItemTarget < tabItem) {
							
							// shift the tab left
							for ( int i=tabItem; i > tabItemTarget; i--)
								this->SwapItemPositions( i-1, i);
							
						} else if ( tabItem < tabItemTarget) {
							// shift the tab right
							for ( int i=tabItem; i < tabItemTarget; i++)
								this->SwapItemPositions( i, i+1);
						}
						this->SetCurSel( tabItemTarget);
						tabItem = tabItemTarget;
					} else if ( tabItemTarget == -1) {
						
						// handle drag moving
						CPoint point( GET_X_LPARAM( msg.lParam), GET_Y_LPARAM( msg.lParam));
						this->ClientToScreen( &point);
						if ( !globalDrag) {
							
							globalDrag = true;
							if ( NULL != this->cbListener)
								this->cbListener->dragStart( this->m_hWnd, clientViewWnd, point.x, point.y, static_cast<DWORD>(msg.wParam));
						}
						if ( NULL != this->cbListener)
							this->cbListener->dragOver( this->m_hWnd, clientViewWnd, point.x, point.y, static_cast<DWORD>(msg.wParam));
					}
					startHitPoint = hitPoint;
					break;
				}
				case WM_RBUTTONUP:
				case WM_LBUTTONUP:
				{
					::ReleaseCapture();
					if ( NULL != this->cbListener && globalDrag) {
						
						CPoint point( GET_X_LPARAM( msg.lParam), GET_Y_LPARAM( msg.lParam));
						this->ClientToScreen( &point);
						this->cbListener->dragDrop( this->m_hWnd, clientViewWnd, point.x, point.y, static_cast<DWORD>(msg.wParam));
						globalDrag = false;
					}
					break;
				}	
				case WM_KEYDOWN:
					if( msg.wParam != VK_ESCAPE)
						break;
				case WM_SYSKEYDOWN:
					::ReleaseCapture();
					if ( NULL != this->cbListener && globalDrag) {
						
						this->cbListener->dragCancel( this->m_hWnd, clientViewWnd);
						globalDrag = false;
					}
				case WM_CAPTURECHANGED:
					result = 0;
					break;
				default:
					::TranslateMessage(&msg);
					::DispatchMessage( &msg);
				}
			}
			::SetCursor( oldCursor);
			::DestroyCursor( cursorSizeWE);
			return result;
		}
		
		LRESULT OnPaint( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
			
			return this->DefWindowProc( uMsg, wParam, lParam);
		}
		
		LRESULT OnEraseBackground( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
			return 1;
		}
		
	};
	
	class ClientProperties {
	public:
		
		CString caption;
		CString toolTip;
		int     imageIndex;
	};
	
	// class Pane
	class Pane
		: public CWindowImpl<Pane, CWindow>
		, public CallBackListener
	{
	
	//----------------- protected members
	protected:
		
		TabControl tabs;
		CallBackListener* cbListener;
		bool isTabsOnTop;
		
	//----------------- protected interface
	protected:
		
		int insertTab( int index, const TCHAR* caption, HWND clientViewWnd, const TCHAR* toolTip = NULL, int imageIndex = -1) {
			
			ATLASSERT( ::IsWindow( clientViewWnd));
			
			::SetParent( clientViewWnd, this->m_hWnd);
			TabControlItem* item = this->tabs.CreateNewItem();
			item->clientViewWnd = clientViewWnd;
			item->SetText( caption);
			item->SetToolTip( toolTip);
			item->SetImageIndex( imageIndex);
			return this->tabs.InsertItem( index, item, true);
		}
		
		int getCurrentTab() const {
			
			return this->tabs.getCurrentTab();
		}
		
		int setCurrentTab( int index) {
			
			return this->tabs.setCurrentTab( index);
		}
		

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区三区免费 | av在线不卡网| 经典三级一区二区| 免费在线观看不卡| 久久国产精品99久久人人澡| 免费观看成人鲁鲁鲁鲁鲁视频| 天堂在线一区二区| 免费在线观看视频一区| 乱一区二区av| 国产精品一区一区| 成人深夜在线观看| 99re8在线精品视频免费播放| 99re8在线精品视频免费播放| 一本色道综合亚洲| 欧美伦理影视网| 日韩美一区二区三区| 国产亚洲欧洲997久久综合| 欧美激情一区二区三区蜜桃视频| 国产日韩精品一区| 亚洲视频在线一区二区| 亚洲综合999| 狠狠狠色丁香婷婷综合久久五月| 国产精品一区二区在线观看网站| 国产电影一区二区三区| 色偷偷久久一区二区三区| 欧美性高清videossexo| 日韩视频免费直播| 国产精品成人一区二区艾草| 亚洲一区在线观看免费| 久久综合综合久久综合| 99久久久精品| 91精品国产品国语在线不卡| 欧美高清在线视频| 视频在线在亚洲| 大胆亚洲人体视频| 欧美日韩国产小视频在线观看| 2022国产精品视频| 亚洲一区二区三区四区五区黄| 精品一区二区在线播放| 91成人国产精品| 国产午夜一区二区三区| 丝袜诱惑制服诱惑色一区在线观看| 国产一二精品视频| 在线成人av网站| 中文字幕一区二区三区不卡| 久久精品国产**网站演员| av在线不卡免费看| 精品少妇一区二区| 亚洲综合精品自拍| 成人高清伦理免费影院在线观看| 欧美一区二区三区视频免费播放| 亚洲免费av网站| 国产suv精品一区二区883| 91精品国产一区二区人妖| 亚洲婷婷在线视频| 国产mv日韩mv欧美| 精品国产乱码久久久久久蜜臀| 一区二区三区日韩欧美精品| 成人免费三级在线| 久久午夜电影网| 久久国产生活片100| 欧美探花视频资源| 一区二区三区中文字幕| 成人毛片视频在线观看| 久久久91精品国产一区二区三区| 日韩二区三区四区| 欧美剧情片在线观看| 一区二区三区在线观看欧美| av激情成人网| |精品福利一区二区三区| 成人精品免费看| 国产欧美日产一区| 亚洲特黄一级片| 日日夜夜精品视频天天综合网| 亚洲男同性恋视频| 精品在线免费观看| 欧美丰满美乳xxx高潮www| 亚洲一区av在线| 欧美日韩午夜在线| 亚洲成人资源在线| 欧美精品第一页| 视频一区二区三区中文字幕| 4438x亚洲最大成人网| 视频在线观看国产精品| 欧美一区二区在线免费播放| 日韩二区在线观看| 亚洲精品一区二区三区福利| 国产丶欧美丶日本不卡视频| 欧美国产一区二区在线观看| 91麻豆.com| 午夜久久久影院| 日韩欧美二区三区| 国产a精品视频| 亚洲欧美综合色| 欧美日韩国产综合一区二区三区| 日韩一区精品字幕| 久久久美女毛片| 99国产精品久久久久久久久久| 亚洲激情图片小说视频| 欧美精品一卡两卡| 国产成人午夜精品5599| 国产精品久久久久婷婷二区次| 91成人国产精品| 蜜臀av国产精品久久久久| 久久久亚洲国产美女国产盗摄 | 波多野结衣一区二区三区| 国产日韩欧美亚洲| 在线观看免费成人| 蜜臀av性久久久久蜜臀av麻豆| 国产日韩精品一区| 欧美日韩一区二区三区高清| 国产精品77777| 亚洲第一二三四区| 精品日韩成人av| 色婷婷久久久久swag精品| 日本aⅴ免费视频一区二区三区| 国产亚洲欧美日韩俺去了| 一本一道波多野结衣一区二区| 天天综合色天天综合色h| 国产欧美一区二区精品忘忧草| 欧美丝袜自拍制服另类| 国产福利一区二区三区视频| 国产精品福利一区二区三区| 欧美日韩久久久久久| 国产精品久久久久久一区二区三区| 欧美中文字幕亚洲一区二区va在线| 色先锋aa成人| 麻豆成人久久精品二区三区红| 综合色中文字幕| 久久久综合网站| 欧美一区二区三区在线电影 | 国产精品久久久久久久久晋中| 欧美日韩一级片网站| zzijzzij亚洲日本少妇熟睡| 麻豆91小视频| 日韩成人av影视| 亚洲国产综合人成综合网站| 国产精品嫩草影院com| 久久午夜羞羞影院免费观看| 欧美一区二区三区免费在线看 | 丝袜诱惑亚洲看片| 夜夜精品浪潮av一区二区三区| 久久精品一区二区| 精品国产伦一区二区三区免费| 欧美理论片在线| 7777精品伊人久久久大香线蕉经典版下载 | 久久福利资源站| 视频一区二区不卡| 五月激情综合婷婷| 五月婷婷色综合| 亚洲一区二区三区自拍| 一个色综合网站| 亚洲一区在线观看免费观看电影高清| 国产精品第一页第二页第三页| 国产午夜精品福利| 国产女主播视频一区二区| 国产日韩精品一区二区浪潮av | 精品视频免费看| 欧美性一二三区| 欧美日韩性生活| 日韩午夜av一区| 精品成人佐山爱一区二区| 久久久综合网站| 一区在线观看视频| 一区二区三区日韩| 午夜精品久久久久影视| 偷拍亚洲欧洲综合| 免费在线成人网| 国产成人av在线影院| bt7086福利一区国产| 色婷婷综合五月| 91精品国产综合久久国产大片| 日韩欧美激情一区| 中文字幕高清一区| 一区二区三区不卡视频在线观看| 亚洲成人www| 久久er精品视频| va亚洲va日韩不卡在线观看| 91久久精品一区二区三| 欧美日高清视频| 久久美女艺术照精彩视频福利播放 | 欧美日韩一区二区在线观看| 日韩欧美自拍偷拍| 中国av一区二区三区| 亚洲午夜在线视频| 国产自产2019最新不卡| 91网站最新地址| 日韩精品一区二区三区老鸭窝 | 欧美亚洲动漫制服丝袜| 精品少妇一区二区三区在线播放 | 色婷婷国产精品综合在线观看| 在线成人av网站| 成人免费在线观看入口| 美女脱光内衣内裤视频久久影院| 国产成人免费视频精品含羞草妖精| 欧美在线综合视频| 久久久久国产精品厨房| 亚洲电影第三页| 粉嫩高潮美女一区二区三区 | 国产一区二区成人久久免费影院|