⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tabdockwnd.cpp

📁 beereader source code
💻 CPP
字号:
// TabDockWnd.cpp : implementation file
//

#include "stdafx.h"
#include "BeeReader.h"
#include "TabDockWnd.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTabDockWnd

CTabDockWnd::CTabDockWnd()
{
   m_bCreate = FALSE;
}

CTabDockWnd::~CTabDockWnd()
{
}

BEGIN_MESSAGE_MAP(CTabDockWnd, CXTTabCtrlBar)
	//{{AFX_MSG_MAP(CTabDockWnd)
	ON_WM_CREATE()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTabDockWnd message handlers

int CTabDockWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CXTTabCtrlBar::OnCreate(lpCreateStruct) == -1)
		return -1;
	
    // create the tree control.
    if (!m_wndTreeCtrl.Create( WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS,
        CRect(0,0,0,0), this, 0xFF ))
    {
        TRACE0( "Unable to create tree control.\n" );
        return -1;
    }
	
	// add the tree control to the tab docking bar.
	AddControl( _T( "频道群" ), &m_wndTreeCtrl, 0 );
//	AddControl( _T( "收藏夹" ), &m_wndTreeCtrl, 1 );

	// Create the image list used with the tab control bar.
	if ( !m_imageList.Create( 16, 16, ILC_COLOR24 | ILC_MASK, 1, 1 ) )
	{
		TRACE0("Failed to create image list.\n");
		return -1;
	}
	m_bitmap.LoadBitmap( IDB_IMGLIST_TAB24 );
	m_imageList.Add( &m_bitmap, RGB( 0xff,0xff,0xff ) );

	// Associate the image list with the tab control bar.
	SetTabImageList(&m_imageList);

	m_bCreate = TRUE;

	return 0;
}

void CTabDockWnd::DrawCaption( CDC* pDC,const CRect& rect)
{
	CXTTabCtrlBar::DrawCaption(pDC,rect);
}

void CTabDockWnd::OnSize(UINT nType, int cx, int cy) 
{
	CXTTabCtrlBar::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	/*
	if( !m_bCreate ) return;

	CRect rect;
	GetWindowRect(&rect);

	CRect rcTree;
	m_wndTreeCtrl.GetWindowRect(&rcTree);
    m_wndTreeCtrl.MoveWindow(rcTree.left,rcTree.top,rcTree.Width(),rcTree.Height()-100);
	*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -