Click here to Skip to main content
15,895,142 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 790.8K   50.1K   284  
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
#if !defined(AFX_GRAPH3D_H__CBA705C0_5682_48FA_88E5_CD697C92B001__INCLUDED_)
#define AFX_GRAPH3D_H__CBA705C0_5682_48FA_88E5_CD697C92B001__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(short ElementID);
	void ClearGraph();
	unsigned long GetElementLineColor(short ElementID);
	void SetElementLineColor(short ElementID, unsigned long newValue);
	unsigned long GetElementPointColor(short ElementID);
	void SetElementPointColor(short ElementID, unsigned long newValue);
	float GetElementLineWidth(short ElementID);
	void SetElementLineWidth(short ElementID, float newValue);
	float GetElementPointSize(short ElementID);
	void SetElementPointSize(short ElementID, float newValue);
	short GetElementType(short ElementID);
	void SetElementType(short ElementID, short nNewValue);
	void PlotXYZ(double x, double y, double z, short ElementID);
	long GetElementShow(short ElementID);
	void SetElementShow(short ElementID, long nNewValue);
	long GetElementSurfaceFill(short ElementID);
	void SetElementSurfaceFill(short ElementID, long nNewValue);
	long GetElementSurfaceFlat(short ElementID);
	void SetElementSurfaceFlat(short ElementID, long nNewValue);
	long GetElementLight(short ElementID);
	void SetElementLight(short ElementID, long nNewValue);
	short GetElementLightingAmbient(short ElementID);
	void SetElementLightingAmbient(short ElementID, short nNewValue);
	short GetElementLightingDiffuse(short ElementID);
	void SetElementLightingDiffuse(short ElementID, short nNewValue);
	short GetElementLightingSpecular(short ElementID);
	void SetElementLightingSpecular(short ElementID, short nNewValue);
	short GetElementMaterialAmbient(short ElementID);
	void SetElementMaterialAmbient(short ElementID, short nNewValue);
	short GetElementMaterialDiffuse(short ElementID);
	void SetElementMaterialDiffuse(short ElementID, short nNewValue);
	short GetElementMaterialSpecular(short ElementID);
	void SetElementMaterialSpecular(short ElementID, short nNewValue);
	short GetElementMaterialShinines(short ElementID);
	void SetElementMaterialShinines(short ElementID, short nNewValue);
	short GetElementMaterialEmission(short ElementID);
	void SetElementMaterialEmission(short ElementID, short nNewValue);
	void SetLightCoordinates(short ElementID, float x, float y, float z);
	void CopyToClipboard();
	long GetLighting(short ElementID);
	void SetLighting(short ElementID, long nNewValue);
};

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

#endif // !defined(AFX_GRAPH3D_H__CBA705C0_5682_48FA_88E5_CD697C92B001__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