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

📄 toolspanel.cpp

📁 这是关于飞机生存力计算软件
💻 CPP
字号:
// ToolsPanel.cpp : implementation file
//

#include "stdafx.h"
#include "Simulate.h"
#include "ToolsPanel.h"
#include "LockSplitter.h"
#include "MainFrm.h"
#include "TabTools.h"
#include <GL/gl.h>
#include <GL/glu.h>

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

/////////////////////////////////////////////////////////////////////////////
// CToolsPanel

IMPLEMENT_DYNCREATE(CToolsPanel, CFormView)

CToolsPanel::CToolsPanel()
	: CFormView(CToolsPanel::IDD)
{
	//{{AFX_DATA_INIT(CToolsPanel)
	m_bLockBar = FALSE;
	//}}AFX_DATA_INIT

	m_pTabTools = NULL;
}

CToolsPanel::~CToolsPanel()
{
	if(m_pTabTools != NULL)
		delete m_pTabTools;

}

void CToolsPanel::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CToolsPanel)
	DDX_Check(pDX, IDC_LOCKBAR, m_bLockBar);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CToolsPanel, CFormView)
	//{{AFX_MSG_MAP(CToolsPanel)
	ON_BN_CLICKED(IDC_LOCKBAR, OnLockbar)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CToolsPanel diagnostics

#ifdef _DEBUG
void CToolsPanel::AssertValid() const
{
	CFormView::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CToolsPanel message handlers

void CToolsPanel::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	
	//init the form controls with splitter lock state
	CLockSplitter * pSplitter = (CLockSplitter *)GetParent();
	m_bLockBar = pSplitter->m_bLocked;

	UpdateData(FALSE);
}

void CToolsPanel::OnLockbar() 
{
	// TODO: Add your control notification handler code here
	UpdateData();

	//In this case, our parent is the splitter window(normally
	//it would be the child frame).
	CLockSplitter * pSplitter = (CLockSplitter *)GetParent();
	pSplitter->m_bLocked = m_bLockBar;

}

int CToolsPanel::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFormView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	m_pTabTools = new CTabTools;
	m_pTabTools->Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
						TCS_TABS | TCS_RIGHTJUSTIFY,
						CRect(0, 0, 258, 460),
						this, IDD_TABTOOLS);

	TC_ITEM tci;
	CString str = "图示设置";

	tci.mask = TCIF_TEXT;
	tci.pszText = (LPSTR)(LPCTSTR)str;
	tci.cchTextMax = str.GetLength();
	m_pTabTools->InsertItem(0, &tci);

	str = "模拟选择";

	tci.mask = TCIF_TEXT;
	tci.pszText = (LPSTR)(LPCTSTR)str;
	tci.cchTextMax = str.GetLength();
	m_pTabTools->InsertItem(1, &tci);

	return 0;
}

⌨️ 快捷键说明

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