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

📄 manageview.cpp

📁 有计算机图形学、图像处理、dbms、sniffer、中游俄罗斯外挂、othello、遗传算法、舌苔分析等程序。
💻 CPP
字号:
// ManageView.cpp : implementation file
//

#include "stdafx.h"
#include "Database.h"
#include "ManageView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CManageView

IMPLEMENT_DYNCREATE(CManageView, CTreeView)

CManageView::CManageView()
{
}

CManageView::~CManageView()
{
}


BEGIN_MESSAGE_MAP(CManageView, CTreeView)
	//{{AFX_MSG_MAP(CManageView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CManageView drawing

void CManageView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CManageView diagnostics

#ifdef _DEBUG
void CManageView::AssertValid() const
{
	CTreeView::AssertValid();
}

void CManageView::Dump(CDumpContext& dc) const
{
	CTreeView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CManageView message handlers

void CManageView::OnInitialUpdate() 
{
	CTreeView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	CDatabaseDoc *pDoc=(CDatabaseDoc *)GetDocument();
    
	CTreeCtrl &mtree=this->GetTreeCtrl();
	HTREEITEM manager=mtree.InsertItem("Super");

	BTNODE *CurNode=pDoc->tree_no.m_sqt;
	UINT CurNo=0;
    bool enddb=false;
	Relationship *R=NULL;
	CSchemaFile cscmf("D:\\DB\\0.scmf",CFile::modeReadWrite,0);
	while(CurNode)
	{
		if(CurNo >= CurNode->keynum)
		{
			//9.7发现的bug
			CurNode->rtag=0x1;//旧的解锁
			CurNode=CMemory::ReadIDXBlock(CurNode->pointer.address1.right
				,pDoc->tree_no.M,pDoc->tree_no.KeyType,pDoc->tree_no.KeyLength,CurNode);
			CurNo=0;
			if(!CurNode)
			{
				return;
			}
			else
				CurNode->rtag=0x2;//新的加锁
		}
		
		PDB recptr=CurNode->pointer.address1.recptr[CurNo];
		
        if(recptr!=DB_NULL)
		{
			R=cscmf.ReadSchema(recptr);
			mtree.InsertItem(LPCTSTR(R->name),manager,TVI_LAST);
		}
		CurNo++;
	}
}

⌨️ 快捷键说明

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