rightpanel.cpp

来自「连接MYSQL数据库」· C++ 代码 · 共 70 行

CPP
70
字号
//author : Jarry
//E-mail : lansingk@online.sh.cn
// RightPanel.cpp : implementation file
//

#include "stdafx.h"
#include "mysqlManager.h"
#include "RightPanel.h"
#include "SQLView.h"
#include "MysqlManagerView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CRightPanel

IMPLEMENT_DYNCREATE(CRightPanel, CFrameWnd)

CRightPanel::CRightPanel()
{
}

CRightPanel::~CRightPanel()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CRightPanel message handlers

BOOL CRightPanel::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	if (!m_wndSplitter.CreateStatic(this, 2, 1))
		return FALSE;

	if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSQLView), CSize(200, 200), pContext) ||
		!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CRecordsView), CSize(100, 100), pContext))
	{
		m_wndSplitter.DestroyWindow();
		return FALSE;
	}
	
	return TRUE;
}

CSQLView* CRightPanel::GetSQLView()
{
	CWnd* pWnd = m_wndSplitter.GetPane(0,0);
	CSQLView *pView = DYNAMIC_DOWNCAST(CSQLView, pWnd);
	return pView;
}

CRecordsView* CRightPanel::GetListView()
{
	CWnd* pWnd = m_wndSplitter.GetPane(1,0);
	CRecordsView *pView = DYNAMIC_DOWNCAST(CRecordsView, pWnd);
	return pView;
}

⌨️ 快捷键说明

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