資源簡介
類VC工作臺(我論壇帖子上的一個附件),大家幫忙看下哈。
代碼片段和文件信息
////////////////////////////////////////////////////////////////
//?CoolTabCtrl.cpp?:?implementation?file??????????????????????//
// ??//
//?Copyright?2001?WangJun ??//
//?All?Rights?Reserved. ??//
// ??//
//?Email:?wangjun98@sohu.com ??//
//?URL:???www.vckbase.com ??//
// ??//
//?1.0?????2001/9/30???First?release?version. ??//
// ??//
////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“CoolTabCtrl.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCoolTabCtrl
IMPLEMENT_DYNCREATE(CCoolTabCtrl?CWnd)
#define ITEMBUTTON_HEIGHT 23
static?CPen?_penW(PS_SOLID1?RGB(255255255));
static?CPen?_penB(PS_SOLID1?RGB(000));
static?CPen?_pen3DFace(PS_SOLID1GetSysColor(COLOR_3DFACE));
static?CPen?_pen3DLight(PS_SOLID1GetSysColor(COLOR_3DLIGHT));
static?CPen?_pen3DShadow(PS_SOLID1GetSysColor(COLOR_3DSHADOW));
static?CPen?_pen3DDKShadow(PS_SOLID1GetSysColor(COLOR_3DDKSHADOW));
CCoolTabCtrl::CCoolTabCtrl()
{
m_nstyle?=?TCS_DOWN;
m_nActivePage?=?-1;
m_nBorder?=?1;
m_bEraseBkgnd?=?TRUE;
}
CCoolTabCtrl::~CCoolTabCtrl()
{
POSITION?pos;
CPageItem*?pItem;
for(pos=m_PageList.GetHeadPosition();pos!=NULL;)
{
pItem=(CPageItem*)m_PageList.GetNext(pos);
if(pItem)
{
if(pItem->m_nstyle?==?1?&&pItem->m_pWnd)?///Dialog
delete?pItem->m_pWnd;
delete?pItem;
pItem=NULL;
}
}
m_PageList.RemoveAll();
}
BEGIN_MESSAGE_MAP(CCoolTabCtrl?CWnd)
//{{AFX_MSG_MAP(CCoolTabCtrl)
ON_WM_PAINT()
ON_WM_ERASEBKGND()
ON_WM_LBUTTONDOWN()
ON_WM_SIZING()
ON_WM_SIZE()
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CCoolTabCtrl?message?handlers
BOOL?CCoolTabCtrl::Create(UINT?wstyle?const?CRect?&rect?CWnd?*pParentWnd?UINT?nID)
{
m_nstyle?=?wstyle?&?TCS_MASK;
if(m_nstyle?==?0)
m_nstyle?=?TCS_UP;
if?(CWnd::Create(AfxRegisterWndClass(CS_DBLCLKS?|?CS_HREDRAW?|?CS_VREDRAW?AfxGetApp()->LoadStandardCursor(IDC_ARROW)?(HBRUSH)GetStockobject(LTGRAY_BRUSH)?NULL)
NULL
wstyle&~TCS_MASK?|?WS_CLIPCHILDREN?|?WS_CLIPSIBLINGS
rect?
pParentWnd?
nID))
{
LOGFONT?logFont;
ZeroMemory((void*)&logFontsizeof(logFont));
strcpy(logFont.lfFaceName“宋體“);
logFont.lfHeight?=?-12;
logFont.lfWeight?=?400;
logFont.lfCharSet?=?GB2312_CHARSET;
logFont.lfOutPrecision?=?3;
logFont.lfClipPrecision?=?2;?
logFont.lfQuality?=?1;
logFont.lfPitchAndFamily?=?2;
m_font.CreateFontIndirect(&logFont);
SetFont(&m_font);
return?TRUE;
}
return?FALSE;
}
BOOL?CCoolTabCtrl::OnEraseBkgnd(CDC*?pDC)?
{
if(m_bEraseBkgnd)
{
CRect?rect;
GetWindowRect(&rect);
Screen
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????43688??2009-02-24?16:39??test.aps
?????文件???????3848??2009-02-24?16:40??test.clw
?????文件???????4268??2003-10-29?19:34??test.cpp
?????文件???????6114??2009-02-20?16:56??test.dsp
?????文件????????533??2003-10-29?09:42??test.dsw
?????文件???????1334??2003-10-29?09:42??test.h
?????文件?????287744??2009-02-24?16:40??test.ncb
?????文件??????98304??2009-02-24?16:40??test.opt
?????文件???????2983??2009-02-24?16:39??test.plg
?????文件??????14359??2009-02-20?17:09??test.rc
?????文件???????1814??2003-10-29?09:42??testDoc.cpp
?????文件???????1453??2003-10-29?09:42??testDoc.h
?????文件???????2679??2003-10-30?13:03??testView.cpp
?????文件???????1859??2003-10-29?09:42??testView.h
?????目錄??????????0??2009-02-27?09:50??Release
?????文件????????326??1998-07-06?15:39??res\CUR1040.CUR
?????文件????????326??2003-10-29?18:08??res\CUR1320.CUR
?????文件????????326??2003-10-29?18:08??res\CUR268.CUR
?????文件????????326??1998-07-06?16:44??res\DRAGGING.CUR
?????文件???????1078??1998-07-02?15:16??res\GLOBALDOC.ICO
?????文件???????1406??2003-10-29?13:38??res\icon1.ico
?????文件???????1406??2003-10-29?13:38??res\icon2.ico
?????文件???????1406??2003-10-29?13:38??res\icon3.ico
?????文件????????326??2003-10-29?18:08??res\ICR_HAND.CUR
?????文件???????3702??2003-10-29?20:15??res\IMAGELIST.BMP
?????文件????????326??1998-07-06?16:44??res\NODRAGGI.CUR
?????文件???????1078??2003-10-29?09:42??res\test.ico
?????文件????????396??2003-10-29?09:42??res\test.rc2
?????文件???????1078??2003-10-29?09:42??res\testDoc.ico
?????文件???????1318??2003-10-29?20:34??res\Toolbar.bmp
............此處省略29個文件信息
- 上一篇:霍納計算多項式(霍納算法應用)
- 下一篇:郁道銀 工程光學 習題答案
評論
共有 條評論