📄 shortcutpaneblocksinfo.cpp
字号:
// ShortcutPaneFolders.cpp: implementation of the CShortcutPaneFolders class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ULExplorer.h"
#include "ShortcutPaneBlocksInfo.h"
#include "BlockInfoView.h"
#include ".\shortcutpaneblocksinfo.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CShortcutPaneBlocksInfo::CShortcutPaneBlocksInfo()
{
m_pBlockInfoView = NULL;
}
CShortcutPaneBlocksInfo::~CShortcutPaneBlocksInfo()
{
}
BOOL CShortcutPaneBlocksInfo::Create(LPCTSTR lpszCaption, CXTPShortcutBar* pParent)
{
if (!CXTPShortcutBarPane::Create(lpszCaption, pParent))
return FALSE;
m_pBlockInfoForm = (CBlockInfoForm*)CreateView(RUNTIME_CLASS(CBlockInfoForm), 1235);
AddItem(_T("虚拟磁盘块信息"), m_pBlockInfoForm, 0);
return TRUE;
}
void CShortcutPaneBlocksInfo::SetBlockInfoView(CBlockInfoView* pView)
{
m_pBlockInfoView = pView;
}
void CShortcutPaneBlocksInfo::ShowBlockInfo()
{
if (m_pBlockInfoView)
m_pBlockInfoView->ShowBlockBitmap();
}
CView* CShortcutPaneBlocksInfo::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 CShortcutPaneBlocksInfo::ClearAll(void)
{
if (m_pBlockInfoView)
m_pBlockInfoView->ClearAll();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -