|
// ClassView.cpp: Implementierungsdatei
//
#include "stdafx.h"
#include "Demo.h"
#include "ClassView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClassView
IMPLEMENT_DYNCREATE(CClassView, CTreeView)
CClassView::CClassView()
{
}
CClassView::~CClassView()
{
}
BEGIN_MESSAGE_MAP(CClassView, CTreeView)
//{{AFX_MSG_MAP(CClassView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Zeichnung CClassView
void CClassView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// ZU ERLEDIGEN: Code zum Zeichnen hier einf�gen
}
/////////////////////////////////////////////////////////////////////////////
// Diagnose CClassView
#ifdef _DEBUG
void CClassView::AssertValid() const
{
CTreeView::AssertValid();
}
void CClassView::Dump(CDumpContext& dc) const
{
CTreeView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// Behandlungsroutinen f�r Nachrichten CClassView
int CClassView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CTreeView::OnCreate(lpCreateStruct) == -1)
return -1;
GetTreeCtrl().ModifyStyle(0,
TVS_HASBUTTONS|TVS_LINESATROOT|TVS_HASLINES|TVS_SHOWSELALWAYS);
HTREEITEM hRootItem = GetTreeCtrl().InsertItem("Classes",0,0);
for (int i=0; i<10; i++)
{
CString strItem;
strItem.Format("Class %d", i);
GetTreeCtrl().InsertItem(strItem,i,i,hRootItem);
}
GetTreeCtrl().SelectItem(hRootItem);
GetTreeCtrl().Expand(hRootItem, TVE_EXPAND);
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.