📄 workspaceview.cpp
字号:
// WorkspaceView.cpp : implementation file
//
#include "stdafx.h"
#include "C02IDE.h"
#include "WorkspaceView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWorkspaceView
IMPLEMENT_DYNCREATE(CWorkspaceView, CCJTabView)
BEGIN_MESSAGE_MAP(CWorkspaceView, CCJTabView)
//{{AFX_MSG_MAP(CWorkspaceView)
ON_WM_CREATE()
ON_WM_RBUTTONDOWN()
//}}AFX_MSG_MAP
// ON_MESSAGE_VOID(CJWM_INITIAL_UPDATE, OnTabViewUpdate)
ON_WM_DESTROY()
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWorkspaceView construction/destruction
CWorkspaceView::CWorkspaceView()
{
// TODO: add construction code here
m_iHitTest = -1;
}
CWorkspaceView::~CWorkspaceView()
{
}
BOOL CWorkspaceView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CCJTabView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CWorkspaceView diagnostics
#ifdef _DEBUG
void CWorkspaceView::AssertValid() const
{
CCJTabView::AssertValid();
}
void CWorkspaceView::Dump(CDumpContext& dc) const
{
CCJTabView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CWorkspaceView message handlers
int CWorkspaceView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CCJTabView::OnCreate(lpCreateStruct) == -1)
return -1;
// create the tree control.
// add the tree control to the tab docking bar.
// Create the image list used with the tab control bar.
// Associate the image list with the tab control bar.
// Set tabs to bottom
// hook
return 1;
}
void CWorkspaceView::OnSelChanging()
{
// CCJTabView::OnSelChanging();
// TODO: Add your code to handle tab selection.
}
void CWorkspaceView::OnSelChange()
{
// CCJTabView::OnSelChange();
// TODO: Add your code to handle tab selection.
}
void CWorkspaceView::OnRButtonDown(UINT nFlags, CPoint point)
{
/* CPoint pt = point;
ClientToScreen(&pt);
CMenu menu;
VERIFY(menu.LoadMenu(IDR_POPUP_WORKSPACE));
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
CWnd* pWndPopupOwner = GetTopLevelFrame();
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y,
pWndPopupOwner);
*/
}
void CWorkspaceView::OnTabViewUpdate()
{
// resize all child views.
/* POSITION pos;
for ( pos = m_tcbItems.GetHeadPosition( ); pos; m_tcbItems.GetNeCJ( pos ) )
{
ResizeTabView( m_tcbItems.GetAt( pos)->pWnd );
}
SetActiveView( theApp.m_pMainFrame->m_nTabIndex );
GetDocument()->SetTitle( _T( "Workspace" ) );
*/
}
void CWorkspaceView::OnDestroy()
{
/* theApp.m_pChildFrame = FALSE;
int iTabIndex = GetTabCtrl().GetCurSel();
if ( iTabIndex != -1 )
{
theApp.m_pMainFrame->m_nTabIndex = iTabIndex;
}
*/
CCJTabView::OnDestroy();
}
/////////////////////////////////////////////////////////////////////////////////////////////
/*
BOOL CChildFrameHook::Install(CWnd* pParentWnd, CWnd* pWndToHook, CWorkspaceView* pTabView)
{
ASSERT_VALID( pParentWnd );
m_pParentWnd = pParentWnd;
ASSERT_VALID( pTabView );
m_pTabView = pTabView;
ASSERT_VALID( pWndToHook );
return HookWindow( pWndToHook );
}
LRESULT CChildFrameHook::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch ( message )
{
case WM_CLOSE:
{
// Clean up the tab view array here so the base class destructor
// does not call DestroyWindow for each tab.
if (::IsWindow(CWorkspaceBarClassTree::Get().m_hWnd))
{
CWorkspaceBarClassTree::Get().SetParent(m_pParentWnd);
m_pTabView->DeleteView(&CWorkspaceBarClassTree::Get(), FALSE);
}
if (::IsWindow(CWorkspaceBarResTree::Get().m_hWnd))
{
CWorkspaceBarResTree::Get().SetParent(m_pParentWnd);
m_pTabView->DeleteView(&CWorkspaceBarResTree::Get(), FALSE);
}
if (::IsWindow(CWorkspaceBarFileTree::Get().m_hWnd))
{
CWorkspaceBarFileTree::Get().SetParent(m_pParentWnd);
m_pTabView->DeleteView(&CWorkspaceBarFileTree::Get(), FALSE);
}
}
break;
}
return CCJWndHook::WindowProc(message, wParam, lParam);
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -