[!if RIBBON_TOOLBAR] // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface // (the "Fluent UI") and is provided only as referential material to supplement the // Microsoft Foundation Classes Reference and related electronic documentation // included with the MFC C++ library software. // License terms to copy, use or distribute the Fluent UI are available separately. // To learn more about our Fluent UI licensing program, please visit // https://go.microsoft.com/fwlink/?LinkId=238214. // // Copyright (C) Microsoft Corporation // All rights reserved. [!endif] // $treeviewimpl$ : implementation of the $treeviewclass$ class // #include "pch.h" #include "framework.h" #include "$appheader$" #include "$docheader$" #include "$treeviewheader$" #ifdef _DEBUG #define new DEBUG_NEW #endif // $treeviewclass$ IMPLEMENT_DYNCREATE($treeviewclass$, $treeviewbaseclass$) BEGIN_MESSAGE_MAP($treeviewclass$, $treeviewbaseclass$) [!if PRINTING] // Standard printing commands ON_COMMAND(ID_FILE_PRINT, &$treeviewbaseclass$::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, &$treeviewbaseclass$::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, &$treeviewbaseclass$::OnFilePrintPreview) [!endif] END_MESSAGE_MAP() // $treeviewclass$ construction/destruction $treeviewclass$::$treeviewclass$() { [!if ACCESSIBILITY] EnableActiveAccessibility(); [!endif] // TODO: add construction code here } $treeviewclass$::~$treeviewclass$() { } BOOL $treeviewclass$::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs return $treeviewbaseclass$::PreCreateWindow(cs); } [!if PRINTING] // $treeviewclass$ printing BOOL $treeviewclass$::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void $treeviewclass$::OnDraw(CDC* /*pDC*/) { $docclass$* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here } void $treeviewclass$::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void $treeviewclass$::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } [!endif] void $treeviewclass$::OnInitialUpdate() { $treeviewbaseclass$::OnInitialUpdate(); // TODO: You may populate your TreeView with items by directly accessing // its tree control through a call to GetTreeCtrl(). } // $treeviewclass$ diagnostics #ifdef _DEBUG void $treeviewclass$::AssertValid() const { $treeviewbaseclass$::AssertValid(); } void $treeviewclass$::Dump(CDumpContext& dc) const { $treeviewbaseclass$::Dump(dc); } $docclass$* $treeviewclass$::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS($docclass$))); return ($docclass$*)m_pDocument; } #endif //_DEBUG // $treeviewclass$ message handlers