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

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

?? tabbedframe.h

?? 一款最完整的工業組態軟源代碼
?? H
?? 第 1 頁 / 共 3 頁
字號:
/////////////////////////////////////////////////////////////////////////////
// TabbedFrame.h - Base template class for supporting a frame
//   window with multiple views that you switch between using
//   a "CustomTabCtrl" (such as CDotNetTabCtrl)
//
// Written by Daniel Bowen (dbowen@es.com)
// Copyright (c) 2002-2004 Daniel Bowen.
//
// Depends on CustomTabCtrl.h originally by Bjarke Viksoe (bjarke@viksoe.dk)
//  with the modifications by Daniel Bowen
//
// CCustomTabOwnerImpl -
//   MI class that helps implement the parent of the actual custom tab control window.
//   The class doesn't have a message map itself, and is meant
//   to be inherited from along-side a CWindowImpl derived class.
//   This class handles creation of the tab window as well as
//   adding, removing, switching and renaming tabs based on an HWND.
// CTabbedFrameImpl -
//   Base template to derive your specialized frame window class from to get
//   a frame window with multiple "view" child windows that you
//   switch between using a custom tab control (such as CDotNetTabCtrl).
// CTabbedPopupFrame -
//   Simple class deriving from CTabbedFrameImpl that is suitable
//   for implementing a tabbed "popup frame" tool window, with one or more views.
// CTabbedChildWindow -
//   Simple class deriving from CTabbedFrameImpl that is suitable
//   for implementing a tabbed child window, with one or more views.
//
//   
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed 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 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.
//
// If you find bugs, have suggestions for improvements, etc.,
// please contact the author.
//
// History (Date/Author/Description):
// ----------------------------------
//
// 2004/06/28: Daniel Bowen
// - CCustomTabOwnerImpl - 
//   * HighlightTab
// - Clean up warnings on level 4
//
// 2004/06/21: Peter Carlson
// - CCustomTabOwnerImpl - 
//   * UpdateTabCanClose
//
// 2004/05/14: Daniel Bowen
// - CTabbedFrameImpl - 
//   * Update OnClick handling so it only sets focus to the tab view
//     if the selected tab is being clicked. Without this update,
//     other code that tries to minimize flickering when switching
//     the active view doesn't get called.
//
// 2004/04/29: Daniel Bowen
// - Use LongToHandle with GetClassLong when getting HICON
// - CTabbedFrameImpl -
//   * Only forward focus to the active view if
//     the tab isn't currently capturing the mouse.
//   * Respond to NM_CLICK, CTCN_ACCEPTITEMDRAG and CTCN_CANCELITEMDRAG
//     from the tab control, and set focus to the tab item's view
//  
// 2004/02/03: Daniel Bowen
// - CTabbedFrameImpl -
//   * Add new Set/GetForwardNotifications in case you want the parent of the tab
//     window to forward notifications on to its parent.  A good example where
//     you might want to use this would be with CTabbedChildWindow.
//
// 2004/01/19: Daniel Bowen
// - CTabbedFrameImpl -
//   * Have new "CHAIN_ACTIVETABVIEW_CHILD_COMMANDS" and "CHAIN_ACTIVETABVIEW_CHILD_COMMANDS2"
//     macro that is used to forward WM_COMMAND messages to the active view of a tab window
//     from outside the implementation of that tab window (such as in the Main Frame).
//     
// 2003/06/27: Daniel Bowen
// - CCustomTabOwnerImpl -
//   * Remove WTL:: scope off of CImageList member.
// - CTabbedFrameImpl -
//   * Have new "CHAIN_ACTIVETABVIEW_COMMANDS" macro that is used to forward
//     WM_COMMAND messages to the active view.  This is done after
//     the CHAIN_MSG_MAP(baseClass), so be careful if the base
//     class also handles WM_COMMAND messages (the default
//     CFrameWindowImpl does not, and neither does CMDIChildWindowImpl
//     or CTabbedMDIChildWindowImpl).
//   * New "GetActiveView" that returns what CTabbedFrameImpl
//     thinks is the active view.
//   * Replace
//      DECLARE_FRAME_WND_CLASS(_T("TabbedFrame"), 0)
//     with
//      DECLARE_FRAME_WND_CLASS_EX(_T("TabbedFrame"), 0, 0, COLOR_APPWORKSPACE)
//     (gets rid of CS_DBLCLKS, CS_HREDRAW and CS_VREDRAW, sets background brush)
//   * Support "empty" tabbed frame (have window class brush, 
//     let default handling of WM_ERASEBKGND happen if no active view,
//     and NULL out m_hWndActive in OnRemoveLastTab).
// - CTabbedPopupFrame -
//   * Replace
//      DECLARE_FRAME_WND_CLASS(_T("TabbedPopupFrame"), 0)
//     with
//      DECLARE_FRAME_WND_CLASS_EX(_T("TabbedPopupFrame"), 0, 0, COLOR_APPWORKSPACE)
//     (gets rid of CS_DBLCLKS, CS_HREDRAW and CS_VREDRAW, sets background brush)
// - CTabbedChildWindow -
//   * Replace
//      DECLARE_WND_CLASS(_T("TabbedChildWindow"))
//     with
//      DECLARE_FRAME_WND_CLASS_EX(_T("TabbedChildWindow"), 0, 0, COLOR_APPWORKSPACE)
//     (gets rid of CS_DBLCLKS, CS_HREDRAW and CS_VREDRAW, sets background brush)
//
// 2003/02/27: Daniel Bowen
// - Use _U_STRINGorID instead of WTL::_U_STRINGorID.
//   For VC7, this means you must #define _WTL_NO_UNION_CLASSES
//   before including the WTL header files, or you will
//   get compile errors (the ATL7 union classes are defined
//   in atlwin.h).
//
// 2002/11/27: Daniel Bowen
// - CTabbedFrameImpl::GetTabStyles needs to return DWORD, not bool 
//
// 2002/09/25: Daniel Bowen
// - CTabbedFrameImpl -
//   * Expose "SetTabStyles" and "GetTabStyles" so that you can change
//     the tab related styles to something different than the default
// - CTabbedPopupFrame -
//   * Expose "SetCloseCommand" and "GetCloseCommand" so that
//     instead of destroying the window when the close button
//     on the popup frame is pushed, a command ID of your choice
//     is sent to the parent (such as a menu ID that corresponds
//     to toggling the visibility of the popup frame)
//
// 2002/06/26: Daniel Bowen
// - New "CTabbedChildWindow" that derives from CTabbedFrameImpl.
//   You can use this class when you want a child window to
//   use a tab control to switch between multiple views
// - Provide "PreTranslateMessage" function in CTabbedPopupFrame
//   (and the new CTabbedChildWindow)
// - CCustomTabOwnerImpl -
//   * Rename "GetTabs" method to "GetTabCtrl"
//   * Rename member "m_tabs" to "m_TabCtrl"
//   * Rename template argument "TTab" to "TTabCtrl"
//   * Rename "ShowTabs" and "HideTabs" overrideables to "OnAddFirstTab" and "OnRemoveLastTab",
//     and change the place that calls these to live up to those new names
//   * Remove GetCurSel (just call GetTabCtrl().GetCurSel() instead)
//   * DisplayTab - 
//     + Add new parameter that says whether to use the window's icon.
//       If TRUE, the icon is requested first by sending the window WM_GETICON
//       looking for the "small" icon, then asking the window class for a small icon.
//       If no small icon is found, the same procedure is used to look for the
//       "big" icon.
//     + Call "SetCurSel" even if the tab to display has the same index
//       as the current selection
//     + Call "OnAddFirstTab" (which was "ShowTabs") only when the count
//       of tabs goes from 0 to 1.
//  
// 2002/06/12: Daniel Bowen
// - Publish codeproject article.  For history prior
//   to the release of the article, please see the article
//   and the section "Note to previous users"

#ifndef __WTL_TABBED_FRAME_H__
#define __WTL_TABBED_FRAME_H__

#pragma once

#ifndef __cplusplus
	#error TabbedFrame.h requires C++ compilation
#endif

#ifndef __ATLAPP_H__
	#error TabbedFrame.h requires atlapp.h to be included first
#endif

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

#ifndef __ATLFRAME_H__
	#error TabbedFrame.h requires atlframe.h to be included first
#endif

#ifndef __CUSTOMTABCTRL_H__
#include "CustomTabCtrl.h"
#endif


/////////////////////////////////////////////////////////////////////////////
//
// CCustomTabOwnerImpl
//  an MI template to help implement the owner window that uses CustomTabCtrl
//  to switch between windows / views
//
/////////////////////////////////////////////////////////////////////////////

template <class T, class TTabCtrl>
class CCustomTabOwnerImpl
{
// Member variables
protected:
	TTabCtrl m_TabCtrl;
	CImageList m_ImageList;
	int m_cxImage, m_cyImage;
	int m_nTabAreaHeight;

// Constructors
public:
	CCustomTabOwnerImpl() :
		m_cxImage(16),
		m_cyImage(16),
		m_nTabAreaHeight(24)
	{
	}

// Overrideables
public:

	void OnAddFirstTab()
	{
	}

	void OnRemoveLastTab()
	{
	}

	void SetTabAreaHeight(int nNewTabAreaHeight)
	{
		if(m_nTabAreaHeight != nNewTabAreaHeight)
		{
			m_nTabAreaHeight = nForceTabAreaHeight;

			/*
			T* pT = static_cast<T*>(this);
			pT->UpdateLayout();
			Invalidate();
			*/
		}
	}

	// A derived class might not need to override this although they can.
	// (but they will probably need to specialize SetTabAreaHeight)
	void CalcTabAreaHeight(void)
	{
		// Dynamically figure out a reasonable tab area height
		// based on the tab's font metrics

		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
		TTabCtrl& TabCtrl = this->GetTabCtrl();
		if(TabCtrl.IsWindow())
		{
			HFONT hFont = TabCtrl.GetFont();
			if(hFont != NULL)
			{
				CDC dc = TabCtrl.GetDC();
				CFontHandle hFontOld = dc.SelectFont(hFont);
				TEXTMETRIC tm = {0};
				dc.GetTextMetrics(&tm);
				nFontLogicalUnits = tm.tmAscent;
				dc.SelectFont(hFontOld);
			}
		}

		int nNewTabAreaHeight = nNominalHeight + ( ::MulDiv(nNominalHeight, nFontLogicalUnits, nNominalFontLogicalUnits) - nNominalHeight ) / 2;

		T* pT = static_cast<T*>(this);
		pT->SetTabAreaHeight(nNewTabAreaHeight);
	}

// Methods
public:
	TTabCtrl& GetTabCtrl(void)
	{
		return m_TabCtrl;
	}

	int GetTabAreaHeight(void) const
	{
		return m_nTabAreaHeight;
	}

	void CreateTabWindow(HWND hWndTabParent, RECT rcTab, DWORD dwOtherStyles = CTCS_TOOLTIPS)
	{
		if(m_TabCtrl.IsWindow())
		{
			m_TabCtrl.DestroyWindow();
		}

		BOOL bCreate = FALSE;
		bCreate = m_ImageList.Create(m_cxImage, m_cyImage, ILC_COLOR32 | ILC_MASK, 4, 4);
		if(bCreate)
		{
			m_TabCtrl.SetImageList(m_ImageList);
		}

		DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | dwOtherStyles;

		m_TabCtrl.Create(hWndTabParent, rcTab, NULL, dwStyle);

		T* pT = static_cast<T*>(this);
		pT->CalcTabAreaHeight();
	}

	BOOL DestroyTabWindow()
	{
		return m_ImageList.Destroy();
	}

	// AddBitmap (with a couple of overloaded versions)
	int AddBitmap(HBITMAP hBitmap, HBITMAP hBitmapMask = NULL)
	{
		return m_ImageList.Add(hBitmap, hBitmapMask);
	}

	int AddBitmap(HBITMAP hBitmap, COLORREF crMask)
	{
		return m_ImageList.Add(hBitmap, crMask);
	}

	int AddBitmap(_U_STRINGorID bitmap, COLORREF crMask, HMODULE hModule = _Module.GetResourceInstance())
	{
		HBITMAP hBitmap = (HBITMAP)::LoadImage(
			hModule,
			bitmap.m_lpstr,
			IMAGE_BITMAP, 0, 0, LR_SHARED);
		return hBitmap ? m_ImageList.Add(hBitmap, crMask) : -1;
	}

	int AddBitmap(_U_STRINGorID bitmap, HBITMAP hBitmapMask = NULL, HMODULE hModule = _Module.GetResourceInstance())
	{
		HBITMAP hBitmap = (HBITMAP)::LoadImage(
			hModule,
			bitmap.m_lpstr,
			IMAGE_BITMAP, 0, 0, LR_SHARED);
		return hBitmap ? m_ImageList.Add(hBitmap, hBitmapMask) : -1;
	}

	// AddIcon (with a couple of overloaded versions)
	int AddIcon(HICON hIcon)
	{
		return m_ImageList.AddIcon(hIcon);
	}

	int AddIcon(_U_STRINGorID icon, HMODULE hModule = _Module.GetResourceInstance())
	{
		HICON hIcon = (HICON)::LoadImage(
			hModule,
			icon.m_lpstr,
			IMAGE_ICON, m_cxImage, m_cyImage, LR_SHARED);
		return hIcon ? m_ImageList.AddIcon(hIcon) : -1;
	}

	// AddTabWithBitmap (with a couple of overloaded versions)
	int AddTabWithBitmap(HWND hWnd, LPCTSTR sTabText, HBITMAP hBitmap, HBITMAP hBitmapMask = NULL)
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddBitmap(hBitmap, hBitmapMask);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	int AddTabWithBitmap(HWND hWnd, LPCTSTR sTabText, HBITMAP hBitmap, COLORREF crMask)
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddBitmap(hBitmap, crMask);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	int AddTabWithBitmap(HWND hWnd, LPCTSTR sTabText, _U_STRINGorID bitmap, HBITMAP hBitmapMask = NULL, HMODULE hModule = _Module.GetResourceInstance())
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddBitmap(bitmap, hBitmapMask, hModule);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	int AddTabWithBitmap(HWND hWnd, LPCTSTR sTabText, _U_STRINGorID bitmap, COLORREF crMask, HMODULE hModule = _Module.GetResourceInstance())
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddBitmap(bitmap, crMask, hModule);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	// AddTabWithIcon (with a couple of overloaded versions)
	int AddTabWithIcon(HWND hWnd, LPCTSTR sTabText, HICON hIcon)
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddIcon(hIcon);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	int AddTabWithIcon(HWND hWnd, LPCTSTR sTabText, _U_STRINGorID icon, HMODULE hModule = _Module.GetResourceInstance())
	{
		if(hWnd == NULL)
		{
			return -1;
		}

		int nImageIndex = this->AddIcon(icon, hModule);

		return this->AddTab(hWnd, sTabText, nImageIndex);
	}

	// AddTab - either referencing an image in the image list, or no image used
	int AddTab(HWND hWnd, LPCTSTR sTabText, int nImageIndex = -1)
	{
		if(hWnd == NULL)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91蜜桃在线免费视频| 国产成人午夜视频| 国产一区欧美一区| 欧美三级视频在线观看| 久久伊99综合婷婷久久伊| 亚洲已满18点击进入久久| 日韩精品乱码av一区二区| 91热门视频在线观看| 久久综合狠狠综合| 日本不卡一二三| 色域天天综合网| 中文字幕精品在线不卡| 捆绑变态av一区二区三区| 欧美性色综合网| 国产精品成人免费| 九九视频精品免费| 91精品国产综合久久精品| 中文字幕视频一区| 国产精品伊人色| 精品欧美乱码久久久久久 | 日韩和欧美的一区| 日本精品一级二级| 国产精品福利一区二区| 国产一区二区福利| 日韩视频国产视频| 日韩和欧美的一区| 欧美日韩一区小说| 亚洲影视资源网| 91美女精品福利| 国产精品女同一区二区三区| 理论电影国产精品| 欧美一区二区精品在线| 五月天一区二区| 欧美一区二区三区人| 强制捆绑调教一区二区| 91精品国产乱码久久蜜臀| 日本欧美久久久久免费播放网| 欧美色窝79yyyycom| 亚洲成人免费电影| 91超碰这里只有精品国产| 奇米影视7777精品一区二区| 欧美一级黄色片| 国内精品久久久久影院色| 欧美精品一区二区三区久久久| 韩国av一区二区三区在线观看| 欧美不卡激情三级在线观看| 久久成人久久爱| 久久综合视频网| 久久av中文字幕片| 精品国产a毛片| 国产精品99久久久久久有的能看| 日韩免费观看2025年上映的电影| 国产精品中文欧美| 欧美激情中文不卡| 91蜜桃婷婷狠狠久久综合9色| 亚洲精品亚洲人成人网在线播放| 99久久精品国产毛片| 亚洲在线免费播放| 精品国产乱码久久久久久图片 | 亚洲韩国精品一区| 欧美日韩国产一级| 欧美aaaaaa午夜精品| 国产亚洲欧洲一区高清在线观看| 99精品久久只有精品| 午夜国产精品影院在线观看| 亚洲精品一线二线三线| 不卡的电影网站| 日韩成人dvd| 国产欧美一区二区精品婷婷| 色老综合老女人久久久| 麻豆精品蜜桃视频网站| 亚洲丝袜自拍清纯另类| 51精品秘密在线观看| 国产91精品在线观看| 亚洲一二三四在线观看| 欧美精品一区二区在线播放| 91看片淫黄大片一级在线观看| 人人精品人人爱| 日韩伦理av电影| wwwwxxxxx欧美| 欧美特级限制片免费在线观看| 国产精品自拍三区| 亚洲高清视频中文字幕| 欧美激情一区二区| 日本精品一区二区三区高清| 国产精品18久久久久久久网站| 亚洲精品久久久蜜桃| 欧美亚洲另类激情小说| 久久精品国产**网站演员| 久久综合国产精品| 51久久夜色精品国产麻豆| 国产一区二区三区在线观看免费| 99r国产精品| 成人在线综合网站| 日本一区二区动态图| 精品国产亚洲在线| 成人av电影在线网| 欧美日本一道本在线视频| 成人美女视频在线观看| 五月激情六月综合| 一区二区三区在线免费观看| 欧美一区二区大片| 国精产品一区一区三区mba视频| 秋霞电影一区二区| 中文字幕国产精品一区二区| 26uuu久久天堂性欧美| 91在线国内视频| 午夜精品久久一牛影视| 亚洲成人免费看| 最新国产成人在线观看| 中文字幕不卡的av| 91精品国产欧美一区二区18| 日本中文在线一区| 中国色在线观看另类| 欧美久久一区二区| 欧美二区乱c少妇| 99re免费视频精品全部| 成人avav影音| 紧缚奴在线一区二区三区| 亚洲一区二区精品久久av| 亚洲男人的天堂一区二区| 久久综合狠狠综合久久综合88| 欧美日韩视频一区二区| 99re成人在线| 国产夫妻精品视频| 成人动漫一区二区在线| 国内精品伊人久久久久影院对白| 麻豆精品在线播放| 亚洲国产精品人人做人人爽| 久久看人人爽人人| 91精品国产综合久久福利软件| 六月丁香综合在线视频| 亚洲一区二区三区精品在线| 国产视频在线观看一区二区三区 | 精品久久久久香蕉网| 欧美三电影在线| 91免费国产在线观看| 欧美猛男超大videosgay| 色吊一区二区三区| 欧美男男青年gay1069videost| 色狠狠桃花综合| 伦理电影国产精品| 免费成人结看片| 日本sm残虐另类| 国产成人免费视| 国产精品456| 91福利国产成人精品照片| 97久久精品人人澡人人爽| 欧美日韩亚洲综合| 欧美日本在线看| 9人人澡人人爽人人精品| 在线国产电影不卡| 91免费版pro下载短视频| 精品亚洲成a人| 麻豆91精品91久久久的内涵| 麻豆91小视频| 国产大陆亚洲精品国产| 欧美中文字幕一区二区三区| 色综合天天综合给合国产| 久久国产精品一区二区| 99久久久久久99| 91在线免费看| 欧美精品一区二区三区高清aⅴ| 精品嫩草影院久久| 亚洲精品乱码久久久久久久久| 一区二区三区小说| 国产性色一区二区| 一区二区激情小说| 亚洲国产一区二区a毛片| 久久蜜桃av一区二区天堂| 国产调教视频一区| 午夜一区二区三区视频| 久久99久久99精品免视看婷婷| 91美女视频网站| 欧美一区二区三区人| 亚洲综合一二三区| 美女视频一区在线观看| 日本久久精品电影| 91精品午夜视频| 欧洲一区在线电影| 亚洲三级在线看| 香蕉乱码成人久久天堂爱免费| 黄页网站大全一区二区| av一二三不卡影片| 欧美亚洲一区二区在线观看| 成人激情午夜影院| 91久久精品网| 亚洲精品一区二区三区四区高清| av一本久道久久综合久久鬼色| 欧美国产精品一区二区三区| 国产欧美日韩中文久久| 蜜桃免费网站一区二区三区| 成人污污视频在线观看| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲欧美视频在线观看视频| 蜜乳av一区二区三区| 北条麻妃国产九九精品视频| 日韩一区二区三区免费观看| 国产精品国产三级国产| 美女在线视频一区|