vegaoptions.cpp

来自「vega 于mfc结合的碰撞检测源代码」· C++ 代码 · 共 78 行

CPP
78
字号
// VegaOptions.cpp : implementation file
//

#include "stdafx.h"
#include "MFCVega.h"
#include "VegaOptions.h"

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

/////////////////////////////////////////////////////////////////////////////
// CVegaOptions

IMPLEMENT_DYNCREATE(CVegaOptions, CFormView)

CVegaOptions::CVegaOptions()
	: CFormView(CVegaOptions::IDD)
{
	//{{AFX_DATA_INIT(CVegaOptions)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

CVegaOptions::~CVegaOptions()
{
}

void CVegaOptions::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CVegaOptions)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CVegaOptions, CFormView)
	//{{AFX_MSG_MAP(CVegaOptions)
	ON_BN_CLICKED(IDC_WIREFRAME_CHECK, OnWireframeCheck)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CVegaOptions diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CVegaOptions message handlers

void CVegaOptions::OnWireframeCheck() 
{
	// Toggle to WireFrame mode
	long	i;
	vgGfx	*gfx;
	
	gfx = vgGetGfx( 0 );
	i = (long)vgGetProp(gfx, VGGFX_WIREFRAME);

	if(i) 
		vgProp( gfx, VGGFX_WIREFRAME, VG_OFF );
	else
		vgProp( gfx, VGGFX_WIREFRAME, VG_ON );
}

⌨️ 快捷键说明

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