safe_audit.cpp

来自「匿名通信代码」· C++ 代码 · 共 76 行

CPP
76
字号
// safe_audit.cpp : implementation file
//

#include "stdafx.h"
#include "file_handle.h"
#include "safe_audit.h"

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

/////////////////////////////////////////////////////////////////////////////
// safe_audit dialog


safe_audit::safe_audit(CWnd* pParent /*=NULL*/)
	: CDialog(safe_audit::IDD, pParent)
{
	//{{AFX_DATA_INIT(safe_audit)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void safe_audit::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(safe_audit)
	DDX_Control(pDX, IDC_TREE1, m_list_tree);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(safe_audit, CDialog)
	//{{AFX_MSG_MAP(safe_audit)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// safe_audit message handlers

BOOL safe_audit::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here

	TV_INSERTSTRUCT TreeCtrlItem;
	HTREEITEM hTreeItem;

	TreeCtrlItem.hInsertAfter = TVI_LAST;
	TreeCtrlItem.item.mask = TVIF_TEXT|TVIF_PARAM;

	TreeCtrlItem.hParent = TVI_ROOT;
	CString disk = "C:";
	TreeCtrlItem.item.pszText = disk.GetBuffer(30);
	TreeCtrlItem.item.lParam = 1;
	hTreeItem = m_list_tree.InsertItem(&TreeCtrlItem);

	TreeCtrlItem.hParent = hTreeItem;
	TreeCtrlItem.item.lParam = 10;
	strcpy(TreeCtrlItem.item.pszText,"windows");
	m_list_tree.InsertItem(&TreeCtrlItem);
    strcpy(TreeCtrlItem.item.pszText,"dos");
	m_list_tree.InsertItem(&TreeCtrlItem);

    TreeCtrlItem.hParent = TVI_ROOT;
	TreeCtrlItem.item.pszText = "D:";
	TreeCtrlItem.item.lParam = 1;
    m_list_tree.InsertItem(&TreeCtrlItem);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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