Click here to Skip to main content
15,885,365 members
Articles / Desktop Programming / MFC

Drawing Spline Types, Tension and Control Point using OpenGL and MFC

Rate me:
Please Sign up or sign in to vote.
3.47/5 (17 votes)
1 Oct 2000 124.6K   4.4K   45  
This sample teaches you how to create an OpenGL based Spline Drawing application
// MFCSplineDoc.cpp : implementation of the CMFCSplineDoc class
//

#include "stdafx.h"
#include "MFCSpline.h"

#include "MFCSplineDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMFCSplineDoc

IMPLEMENT_DYNCREATE(CMFCSplineDoc, CDocument)

BEGIN_MESSAGE_MAP(CMFCSplineDoc, CDocument)
	//{{AFX_MSG_MAP(CMFCSplineDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMFCSplineDoc construction/destruction

CMFCSplineDoc::CMFCSplineDoc()
{
	// TODO: add one-time construction code here

}

CMFCSplineDoc::~CMFCSplineDoc()
{
}

BOOL CMFCSplineDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMFCSplineDoc serialization

void CMFCSplineDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CMFCSplineDoc diagnostics

#ifdef _DEBUG
void CMFCSplineDoc::AssertValid() const
{
	CDocument::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CMFCSplineDoc commands

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Technical Lead Samimi Information Technology
United Arab Emirates United Arab Emirates
My company provides services in the fields of:

LAN/WAN Networking
Data Management and Security
Data Recovery
ERP/CRM Solutions
IT Infrastructure Solutions
Software/Hardware Sales/Service

Comments and Discussions