Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
 
Add your own
alternative version

3D Graph ActiveX Control

, 2 Aug 2003
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
Prize winner in Competition "MFC/C++ May 2003"
ntgraph3d_bin.zip
ntgraph3d_demo.zip
NTGraph3D_demo
Demo3D
Demo.aps
Demo.clw
Demo.dsp
Demo.dsw
Demo.ncb
Demo.opt
Demo.plg
res
Demo.ico
Demo3D.hta
Torus
res
Torus.ico
Torus.aps
Torus.clw
Torus.dsp
Torus.dsw
Torus.ncb
Torus.opt
Torus.plg
ntgraph3d_src.zip
NTGraph3D_src
graphctl.bmp
GraphCtl.rgs
NTGraph3D.aps
NTGraph3D.def
NTGraph3D.dsp
NTGraph3D.dsw
NTGraph3D.ncb
NTGraph3D.opt
NTGraph3D.plg
NTGraph3D.tlb
NTGraph3Dps.def
NTGraph3Dps.mk
ReleaseMinSize
Test.dsm
ntgraph_bin.zip
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.


#include "stdafx.h"
#include "graph3d.h"

// Dispatch interfaces referenced by this interface
#include "font.h"

/////////////////////////////////////////////////////////////////////////////
// CGraph3D

IMPLEMENT_DYNCREATE(CGraph3D, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CGraph3D properties

/////////////////////////////////////////////////////////////////////////////
// CGraph3D operations

void CGraph3D::SetBackColor(unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(DISPID_BACKCOLOR, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

unsigned long CGraph3D::GetBackColor()
{
	unsigned long result;
	InvokeHelper(DISPID_BACKCOLOR, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetBorderStyle(long nNewValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(DISPID_BORDERSTYLE, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

long CGraph3D::GetBorderStyle()
{
	long result;
	InvokeHelper(DISPID_BORDERSTYLE, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetRefFont(LPDISPATCH newValue)
{
	static BYTE parms[] =
		VTS_DISPATCH;
	InvokeHelper(DISPID_FONT, DISPATCH_PROPERTYPUTREF, VT_EMPTY, NULL, parms,
		 newValue);
}

void CGraph3D::SetFont(LPDISPATCH newValue)
{
	static BYTE parms[] =
		VTS_DISPATCH;
	InvokeHelper(DISPID_FONT, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

COleFont CGraph3D::GetFont()
{
	LPDISPATCH pDispatch;
	InvokeHelper(DISPID_FONT, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
	return COleFont(pDispatch);
}

void CGraph3D::SetCaption(LPCTSTR lpszNewValue)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(DISPID_CAPTION, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 lpszNewValue);
}

CString CGraph3D::GetCaption()
{
	CString result;
	InvokeHelper(DISPID_CAPTION, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetBorderVisible(BOOL bNewValue)
{
	static BYTE parms[] =
		VTS_BOOL;
	InvokeHelper(0xfffffdf9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 bNewValue);
}

BOOL CGraph3D::GetBorderVisible()
{
	BOOL result;
	InvokeHelper(0xfffffdf9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetAppearance(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(DISPID_APPEARANCE, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

short CGraph3D::GetAppearance()
{
	short result;
	InvokeHelper(DISPID_APPEARANCE, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

unsigned long CGraph3D::GetCaptionColor()
{
	unsigned long result;
	InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetCaptionColor(unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

void CGraph3D::SetRange(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
{
	static BYTE parms[] =
		VTS_R8 VTS_R8 VTS_R8 VTS_R8 VTS_R8 VTS_R8;
	InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 xmin, xmax, ymin, ymax, zmin, zmax);
}

void CGraph3D::AutoRange()
{
	InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CGraph3D::ShowPropertyPages()
{
	InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

short CGraph3D::GetTrackMode()
{
	short result;
	InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetTrackMode(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

short CGraph3D::GetProjection()
{
	short result;
	InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetProjection(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

CString CGraph3D::GetXLabel()
{
	CString result;
	InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetXLabel(LPCTSTR lpszNewValue)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 lpszNewValue);
}

CString CGraph3D::GetYLabel()
{
	CString result;
	InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetYLabel(LPCTSTR lpszNewValue)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 lpszNewValue);
}

CString CGraph3D::GetZLabel()
{
	CString result;
	InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetZLabel(LPCTSTR lpszNewValue)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 lpszNewValue);
}

short CGraph3D::GetXGridNumber()
{
	short result;
	InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetXGridNumber(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

short CGraph3D::GetYGridNumber()
{
	short result;
	InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetYGridNumber(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

short CGraph3D::GetZGridNumber()
{
	short result;
	InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetZGridNumber(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

unsigned long CGraph3D::GetXGridColor()
{
	unsigned long result;
	InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetXGridColor(unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

unsigned long CGraph3D::GetYGridColor()
{
	unsigned long result;
	InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetYGridColor(unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0xe, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

unsigned long CGraph3D::GetZGridColor()
{
	unsigned long result;
	InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

void CGraph3D::SetZGridColor(unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0xf, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

void CGraph3D::AddElement()
{
	InvokeHelper(0x10, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CGraph3D::DeleteElement(long ElementID)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x11, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 ElementID);
}

void CGraph3D::ClearGraph()
{
	InvokeHelper(0x12, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

unsigned long CGraph3D::GetElementLineColor(long ElementID)
{
	unsigned long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLineColor(long ElementID, unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, newValue);
}

unsigned long CGraph3D::GetElementPointColor(long ElementID)
{
	unsigned long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementPointColor(long ElementID, unsigned long newValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, newValue);
}

float CGraph3D::GetElementLineWidth(long ElementID)
{
	float result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLineWidth(long ElementID, float newValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_R4;
	InvokeHelper(0x15, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, newValue);
}

float CGraph3D::GetElementPointSize(long ElementID)
{
	float result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementPointSize(long ElementID, float newValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_R4;
	InvokeHelper(0x16, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, newValue);
}

short CGraph3D::GetElementType(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementType(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

void CGraph3D::PlotXYZ(double x, double y, double z, long ElementID)
{
	static BYTE parms[] =
		VTS_R8 VTS_R8 VTS_R8 VTS_I4;
	InvokeHelper(0x18, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 x, y, z, ElementID);
}

long CGraph3D::GetElementShow(long ElementID)
{
	long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementShow(long ElementID, long nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x19, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

long CGraph3D::GetElementSurfaceFill(long ElementID)
{
	long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementSurfaceFill(long ElementID, long nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x1a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

long CGraph3D::GetElementSurfaceFlat(long ElementID)
{
	long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementSurfaceFlat(long ElementID, long nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x1b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

long CGraph3D::GetElementLight(long ElementID)
{
	long result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLight(long ElementID, long nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4;
	InvokeHelper(0x1c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementLightingAmbient(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1d, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLightingAmbient(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x1d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementLightingDiffuse(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1e, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLightingDiffuse(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x1e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementLightingSpecular(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x1f, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementLightingSpecular(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x1f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementMaterialAmbient(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x20, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementMaterialAmbient(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x20, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementMaterialDiffuse(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x21, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementMaterialDiffuse(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x21, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementMaterialSpecular(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x22, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementMaterialSpecular(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x22, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementMaterialShinines(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x23, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementMaterialShinines(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x23, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

short CGraph3D::GetElementMaterialEmission(long ElementID)
{
	short result;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x24, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, parms,
		ElementID);
	return result;
}

void CGraph3D::SetElementMaterialEmission(long ElementID, short nNewValue)
{
	static BYTE parms[] =
		VTS_I4 VTS_I2;
	InvokeHelper(0x24, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 ElementID, nNewValue);
}

void CGraph3D::SetLightCoordinates(long ElementID, float x, float y, float z)
{
	static BYTE parms[] =
		VTS_I4 VTS_R4 VTS_R4 VTS_R4;
	InvokeHelper(0x25, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 ElementID, x, y, z);
}

void CGraph3D::CopyToClipboard()
{
	InvokeHelper(0x26, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

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

About the Author

Nikolai Teofilov
Researcher
Germany Germany
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 3 Aug 2003
Article Copyright 2003 by Nikolai Teofilov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid