Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

A 2D Graph Component With Zoom Capability

, 21 Dec 2004 CPOL
A 2D graph component with zoom capability.
smartgraphdemo_src.zip
res
cur1.cur
cur2.cur
SmartGraphDemo.ico
SmartGraphDemo.manifest
SmartGraphDemoDoc.ico
Toolbar.bmp
smartgraph_dll_exe.zip
msvcr71.dll
Graph.dll
SmartGraphDemo.exe
smartgraph_src.zip
SmartGraph.bmp
_Graph.tlb
bitmap1.bmp
Graph.rgs
Graphps.def
smart_graph_dll_exe.zip
msvcr71.dll
SmartGraphDemo.exe
SmartGraph.dll
import "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\prsht.idl";
import "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\mshtml.idl";
import "c:\program files\microsoft visual studio .net 2003\vc7\platformsdk\include\dimm.idl";
import "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\mshtmhst.idl";
import "c:\program files\microsoft visual studio .net 2003\vc7\platformsdk\include\docobj.idl";
import "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\exdisp.idl";
import "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\objsafe.idl";

[
	object,
	uuid(1EECA078-14D3-427D-AEA5-F9342ABBFC7C),
	dual,
	helpstring("ISmartGraph Interface"),
	pointer_default(unique)
] 
#line 26 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
interface ISmartGraph : IDispatch {
#line 29 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propput,bindable,requestedit,id((-501))] HRESULT  BackColor([in] OLE_COLOR clr);
#line 31 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propget,bindable,requestedit,id((-501))] HRESULT  BackColor([out,retval] OLE_COLOR *pclr);
#line 33 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propput,bindable,requestedit,id((-503))] HRESULT  BorderColor([in] OLE_COLOR clr);
#line 35 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propget,bindable,requestedit,id((-503))] HRESULT  BorderColor([out,retval] OLE_COLOR *pclr);
#line 37 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propput,bindable,requestedit,id((-513))] HRESULT  ForeColor([in] OLE_COLOR clr);
#line 39 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[propget,bindable,requestedit,id((-513))] HRESULT  ForeColor([out,retval] OLE_COLOR *pclr);
	[propget,id(1),helpstring("property Title")] HRESULT  Title([out,retval] BSTR *pVal );
	[propput,id(1),helpstring("property Title")] HRESULT  Title([in] BSTR newVal);
	[propget,id(2),helpstring("property xLable")] HRESULT  xLable([out,retval] BSTR *pVal );
	[propput,id(2),helpstring("property xLable")] HRESULT  xLable([in] BSTR newVal);
	[propget,id(3),helpstring("property yLable")] HRESULT  yLable([out,retval] BSTR *pVal );
	[propput,id(3),helpstring("property yLable")] HRESULT  yLable([in] BSTR newVal);
	[propget,id(4),helpstring("property Columns")] HRESULT  Columns([out,retval] LONG *pVal);
	[propput,id(4),helpstring("property Columns")] HRESULT  Columns([in] LONG newVal);
	[propget,id(5),helpstring("property Rows")] HRESULT  Rows([out,retval] LONG *pVal);
	[propput,id(5),helpstring("property Rows")] HRESULT  Rows([in] LONG newVal);
	[propget,id(6),helpstring("property MarginBottom")] HRESULT  MarginBottom([out,retval] LONG *pVal);
	[propput,id(6),helpstring("property MarginBottom")] HRESULT  MarginBottom([in] LONG newVal);
	[propget,id(7),helpstring("property MarginTop")] HRESULT  MarginTop([out,retval] LONG *pVal);
	[propput,id(7),helpstring("property MarginTop")] HRESULT  MarginTop([in] LONG newVal);
	[propget,id(8),helpstring("property MarginRight")] HRESULT  MarginRight([out,retval] LONG *pVal);
	[propput,id(8),helpstring("property MarginRight")] HRESULT  MarginRight([in] LONG newVal);
	[propget,id(9),helpstring("property MarginLeft")] HRESULT  MarginLeft([out,retval] LONG *pVal);
	[propput,id(9),helpstring("property MarginLeft")] HRESULT  MarginLeft([in] LONG newVal);
	[id(10),helpstring("method SetData")] HRESULT  SetData([in] DOUBLE *xData, [in] DOUBLE *yData, [in] LONG NumOfPoints, [in] VARIANT_BOOL bResample);
	[id(11),helpstring("method SetDataWithDetail")] HRESULT  SetData2([in] DOUBLE *xData, [in] DOUBLE *yData, [in] LONG NumOfPoints, [in] DOUBLE xMin, [in] DOUBLE xMax, [in] DOUBLE yMin, [in] DOUBLE yMax, [in] VARIANT_BOOL bResample);
#line 61 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	[id(12),helpstring("method ShowGrid")] HRESULT  ShowGrid([in] VARIANT_BOOL bShow);
	[id(13),helpstring("method UpdateGraph")] HRESULT  UpdateGraph();
	[id(14),helpstring("method SetPlotType")] HRESULT  SetPlotType([in] LONG nType);
	[id(15),helpstring("method GetPlotRect")] HRESULT  GetPlotRect([out] LONG *left, [out] LONG *top, [out] LONG *right, [out] LONG *bottom);
	[id(16),helpstring("method GetClientRect")] HRESULT  GetClientRect([out] LONG *left, [out] LONG *top, [out] LONG *right, [out] LONG *bottom);
	[id(17),helpstring("method ZoomIn")] HRESULT  ZoomIn([in] LONG FromSample, [in] LONG ToSample);
	[id(18),helpstring("method ZoomInByPercent")] HRESULT  ZoomInByPercent([in] DOUBLE FromPercent, [in] DOUBLE ToPercent);
	[id(19),helpstring("method ZoomOut")] HRESULT  ZoomOut();
	[id(20),helpstring("Resets graph view to original view"),helpcontext(20)] HRESULT  Reset();
	[id(21),helpstring("method GetDisplayedRange")] HRESULT  GetDisplayedRange([out] LONGLONG *nStartSample, [out] LONGLONG *nEndSample);
	[id(22),helpstring("method SetLegendText")] HRESULT  SetLegendText([in] BSTR strText, [in]LONG top, [in]LONG left, [in]LONG bottom, [in]LONG right);
	[id(23),helpstring("method SetParentWnd")] HRESULT  SetParentWnd([in] OLE_HANDLE hWnd);
	[id(24),helpstring("method GetPlotType")] HRESULT  GetPlotType([in]LONG *PlotType);
};


[ version(1.0), uuid(EF8E3F70-D54A-4B7D-A6EB-1D47794BEF45), helpstring("Graph 1.0 Type Library") ]
library Graph
{
	importlib("stdole2.tlb");
	importlib("olepro32.dll");

	[
		uuid(1F12078D-03B2-4C25-84CA-3191E7DF3FFB),
		helpstring("_ISmartGraphEvents Interface")
	] 
#line 84 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	dispinterface _ISmartGraphEvents {
	properties:

	methods:
		[id(1),helpstring("method LButtonDown")] HRESULT  LButtonDown([in] LONG xPos, [in]LONG yPos, [in]LONGLONG wParam);
		[id(2),helpstring("method LButtonUp")] HRESULT  LButtonUp([in] LONG xPos, [in]LONG yPos, [in]LONGLONG wParam);
		[id(3),helpstring("method MouseMove")] HRESULT  MouseMove([in] LONG xPos, [in]LONG yPos, [in]LONGLONG wParam);
	};

	[
		version(1.0),
		uuid(A2919A75-B379-4BBD-8D95-15BEB3BAA140),
		helpstring("SmartGraph Class")
	] 
#line 103 "e:\\mine\\projects\\my articles sent to code project\\smartgraph\\smartgraph.h"
	coclass SmartGraph {
		interface ISmartGraph;
		[default, source]	interface _ISmartGraphEvents;
	};

}

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 Code Project Open License (CPOL)

Share

About the Author

Hossein Khosravi
Software Developer (Senior) FarsiOCR.ir
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
I am an assistant Prof. at Shahrood University of Technology. I'm interested in Pattern Recognition (specially OCR), Neural Networks, Image Processing and Machine Vision. I'm a PROGRAMMER as well. I was born in Khezri, a city in Khorasan, the largest province of Iran. I took My BS. from Sharif University of technology in 2002 and MSc. and PhD. from Tarbiat Modarres University in 2006 and 2010 respectively.
Currently I'm working in Shahrood university as an assistant professor in Faculty of Electrical & Robotic Engineering.
 
Hossein Khosravi's Blog: Andisheh Online
 
Commercial Site: Farsi OCR Resources

| Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 22 Dec 2004
Article Copyright 2004 by Hossein Khosravi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid