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

📄 shortcutpanesysteminfo.cpp

📁 类似Linux操作系统0.11版文件系统的文件系统设计和Windows下的操作程序
💻 CPP
字号:
// ShortcutPaneFolders.cpp: implementation of the CShortcutPaneFolders class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ULExplorer.h"
#include "ShortcutPaneSystemInfo.h"
#include "SystemInfoView.h"
#include ".\shortcutpanesysteminfo.h"

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


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CShortcutPaneSystemInfo::CShortcutPaneSystemInfo()
{
	m_pSystemInfoView = NULL;
	m_pSystemInfoForm = NULL;
}

CShortcutPaneSystemInfo::~CShortcutPaneSystemInfo()
{

}

BOOL CShortcutPaneSystemInfo::Create(LPCTSTR lpszCaption, CXTPShortcutBar* pParent)
{
	if (!CXTPShortcutBarPane::Create(lpszCaption, pParent))
		return FALSE;

	m_pSystemInfoForm = (CSystemInfoForm*)CreateView(RUNTIME_CLASS(CSystemInfoForm), 1234);

	AddItem(_T("系统信息"), m_pSystemInfoForm, 0);

	return TRUE;
}
void CShortcutPaneSystemInfo::SetSystemInfoView(CSystemInfoView* pView)
{
	m_pSystemInfoView = pView;
}
void CShortcutPaneSystemInfo::ShowSystemInfo()
{
	m_pSystemInfoView->ShowSystemInfo();
	m_pSystemInfoForm->ShowSuperInfo();
}

CView* CShortcutPaneSystemInfo::CreateView(CRuntimeClass *pViewClass, int nCtrlID)
{
	// Create new view
	CCreateContext contextT;
	contextT.m_pLastView	   = NULL;
	contextT.m_pCurrentDoc	   = NULL;
	contextT.m_pNewViewClass   = pViewClass;
	contextT.m_pNewDocTemplate = NULL;
	contextT.m_pCurrentFrame   = NULL;

	CWnd* pWnd;
	TRY
	{
		pWnd = (CWnd*)pViewClass->CreateObject();
		if (pWnd == NULL) AfxThrowMemoryException();
	}
	CATCH_ALL(e)
	{
		TRACE0( "Out of memory creating a view.\n" );
		// Note: DELETE_EXCEPTION(e) not required
		return NULL;
	}
	END_CATCH_ALL

	ASSERT_KINDOF(CWnd, pWnd);
	ASSERT(pWnd->m_hWnd == NULL); // not yet created.

	if (!pWnd->Create(NULL, NULL, WS_CHILD | WS_VISIBLE,
		CRect(0,0,0,0), this, nCtrlID, &contextT))
	{
		TRACE0( "Warning: couldn't create new view.\n" );

		return NULL;
	}

	CView* pNewView = (CView *) pWnd;
	ASSERT_KINDOF (CView, pNewView);
	pNewView->OnInitialUpdate();

	return pNewView;
}
void CShortcutPaneSystemInfo::ClearAll(void)
{
	m_pSystemInfoForm->ClearAll();
}

⌨️ 快捷键说明

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