Click here to Skip to main content
15,892,005 members
Articles / Desktop Programming / ATL

3D Graph ActiveX Control

Rate me:
Please Sign up or sign in to vote.
4.90/5 (100 votes)
2 Aug 2003MIT3 min read 784.4K   50.1K   284  
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
#if !defined(AFX_GRAPH3D_H__C71EA50F_1A75_424C_894C_501915D39C60__INCLUDED_)
#define AFX_GRAPH3D_H__C71EA50F_1A75_424C_894C_501915D39C60__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// 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.


// Dispatch interfaces referenced by this interface
class COleFont;

/////////////////////////////////////////////////////////////////////////////
// CGraph3D wrapper class

class CGraph3D : public CWnd
{
protected:
	DECLARE_DYNCREATE(CGraph3D)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0xdf3eb502, 0x551c, 0x4a90, { 0xb5, 0x64, 0x66, 0x81, 0xa6, 0x96, 0x2f, 0x58 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName,
		LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect,
		CWnd* pParentWnd, UINT nID,
		CCreateContext* pContext = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect, CWnd* pParentWnd, UINT nID,
		CFile* pPersist = NULL, BOOL bStorage = FALSE,
		BSTR bstrLicKey = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); }

// Attributes
public:

// Operations
public:
	void SetBackColor(unsigned long newValue);
	unsigned long GetBackColor();
	void SetBorderStyle(long nNewValue);
	long GetBorderStyle();
	void SetRefFont(LPDISPATCH newValue);
	void SetFont(LPDISPATCH newValue);
	COleFont GetFont();
	void SetCaption(LPCTSTR lpszNewValue);
	CString GetCaption();
	void SetBorderVisible(BOOL bNewValue);
	BOOL GetBorderVisible();
	void SetAppearance(short nNewValue);
	short GetAppearance();
	unsigned long GetCaptionColor();
	void SetCaptionColor(unsigned long newValue);
	void SetRange(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
	void AutoRange();
	void ShowPropertyPages();
	short GetTrackMode();
	void SetTrackMode(short nNewValue);
	short GetProjection();
	void SetProjection(short nNewValue);
	CString GetXLabel();
	void SetXLabel(LPCTSTR lpszNewValue);
	CString GetYLabel();
	void SetYLabel(LPCTSTR lpszNewValue);
	CString GetZLabel();
	void SetZLabel(LPCTSTR lpszNewValue);
	short GetXGridNumber();
	void SetXGridNumber(short nNewValue);
	short GetYGridNumber();
	void SetYGridNumber(short nNewValue);
	short GetZGridNumber();
	void SetZGridNumber(short nNewValue);
	unsigned long GetXGridColor();
	void SetXGridColor(unsigned long newValue);
	unsigned long GetYGridColor();
	void SetYGridColor(unsigned long newValue);
	unsigned long GetZGridColor();
	void SetZGridColor(unsigned long newValue);
	void AddElement();
	void DeleteElement(long ElementID);
	void ClearGraph();
	unsigned long GetElementLineColor(long ElementID);
	void SetElementLineColor(long ElementID, unsigned long newValue);
	unsigned long GetElementPointColor(long ElementID);
	void SetElementPointColor(long ElementID, unsigned long newValue);
	float GetElementLineWidth(long ElementID);
	void SetElementLineWidth(long ElementID, float newValue);
	float GetElementPointSize(long ElementID);
	void SetElementPointSize(long ElementID, float newValue);
	short GetElementType(long ElementID);
	void SetElementType(long ElementID, short nNewValue);
	void PlotXYZ(double x, double y, double z, long ElementID);
	long GetElementShow(long ElementID);
	void SetElementShow(long ElementID, long nNewValue);
	long GetElementSurfaceFill(long ElementID);
	void SetElementSurfaceFill(long ElementID, long nNewValue);
	long GetElementSurfaceFlat(long ElementID);
	void SetElementSurfaceFlat(long ElementID, long nNewValue);
	long GetElementLight(long ElementID);
	void SetElementLight(long ElementID, long nNewValue);
	short GetElementLightingAmbient(long ElementID);
	void SetElementLightingAmbient(long ElementID, short nNewValue);
	short GetElementLightingDiffuse(long ElementID);
	void SetElementLightingDiffuse(long ElementID, short nNewValue);
	short GetElementLightingSpecular(long ElementID);
	void SetElementLightingSpecular(long ElementID, short nNewValue);
	short GetElementMaterialAmbient(long ElementID);
	void SetElementMaterialAmbient(long ElementID, short nNewValue);
	short GetElementMaterialDiffuse(long ElementID);
	void SetElementMaterialDiffuse(long ElementID, short nNewValue);
	short GetElementMaterialSpecular(long ElementID);
	void SetElementMaterialSpecular(long ElementID, short nNewValue);
	short GetElementMaterialShinines(long ElementID);
	void SetElementMaterialShinines(long ElementID, short nNewValue);
	short GetElementMaterialEmission(long ElementID);
	void SetElementMaterialEmission(long ElementID, short nNewValue);
	void SetLightCoordinates(long ElementID, float x, float y, float z);
	void CopyToClipboard();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GRAPH3D_H__C71EA50F_1A75_424C_894C_501915D39C60__INCLUDED_)

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, along with any associated source code and files, is licensed under The MIT License


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions