void CNTGraphCtrl::DoZoom(UINT nFlags, CPoint point)
{
if (m_nTrackMode==Zoom)
{
if (bUnzoom)
{
dOldRangeX[MIN]=dRangeX[MIN];
dOldRangeY[MIN]=dRangeY[MIN];
dOldRangeX[MAX]=dRangeX[MAX];
dOldRangeY[MAX]=dRangeY[MAX];
bUnzoom = FALSE;
}
CRectTracker tracker;
double xmin, xmax, ymin, ymax;
xmin=dRangeX[MIN];
xmin=dRangeX[MAX];
ymin=dRangeY[MIN];
ymax=dRangeY[MAX];
if (tracker.TrackRubberBand(this, point) )
{
CPoint pt1, pt2;
tracker.m_rect.NormalizeRect ();
pt1= tracker.m_rect.TopLeft ();
pt2= tracker.m_rect.BottomRight ();
xmin = PT2DBLX(pt1.x);
ymax = PT2DBLY(pt1.y);
xmax = PT2DBLX(pt2.x);
ymin = PT2DBLY(pt2.y);
}
SetRange(xmin,xmax,ymin,ymax);
// Don't ask me why!
//CClientDC dc(this);
//SendMessage(WM_LBUTTONUP, (WPARAM) dc.GetSafeHdc(), 0);
//COleControl::OnLButtonUp(nFlags, point);
}
}
我第二下左键点下if (tracker.TrackRubberBand(this, point) ) 返回值为非,各位大神帮忙解决下这个BUG,非常感谢
10 个解决方案
#1
自己顶一下,大神们来帮帮忙呀
#2
ZOOM,什么版本的NTGRAPH,我用的没有
#3
我是codeproject这个上面下载的,哥们 能不能把你的NTGRAPH源码发我看看
#4
ZOOM主要做什么用
#5
缩放功能,你没用过这个?
#6
我直接通过鼠标点击消息获取起点,终点然后SetRange
#7
缩放功能,你没用过这个?
ZOOM主要做什么用
我直接通过鼠标点击消息获取起点,终点然后SetRange
#8
缩放功能,你没用过这个?
ZOOM主要做什么用
我直接通过鼠标点击消息获取起点,终点然后SetRange
#9
#if !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用
#10
#if !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用
#1
自己顶一下,大神们来帮帮忙呀
#2
ZOOM,什么版本的NTGRAPH,我用的没有
#3
ZOOM,什么版本的NTGRAPH,我用的没有
#4
ZOOM主要做什么用
#5
ZOOM主要做什么用
#6
缩放功能,你没用过这个?
ZOOM主要做什么用
我直接通过鼠标点击消息获取起点,终点然后SetRange
#7
缩放功能,你没用过这个?
ZOOM主要做什么用
我直接通过鼠标点击消息获取起点,终点然后SetRange
#8
缩放功能,你没用过这个?
ZOOM主要做什么用
我直接通过鼠标点击消息获取起点,终点然后SetRange
#9
#if !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用
#10
#if !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
#define AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__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;
class CPicture;
/////////////////////////////////////////////////////////////////////////////
// CNTGraph wrapper class
class CNTGraph : public CWnd
{
protected:
DECLARE_DYNCREATE(CNTGraph)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xc9fe01c2, 0x2746, 0x479b, { 0x96, 0xab, 0xe0, 0xbe, 0x99, 0x31, 0xb0, 0x18 } };
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:
short GetAppearance();
void SetAppearance(short);
CString GetCaption();
void SetCaption(LPCTSTR);
BOOL GetEnabled();
void SetEnabled(BOOL);
unsigned long GetAxisColor();
void SetAxisColor(unsigned long);
unsigned long GetGridColor();
void SetGridColor(unsigned long);
unsigned long GetLabelColor();
void SetLabelColor(unsigned long);
unsigned long GetCursorColor();
void SetCursorColor(unsigned long);
COleFont GetLabelFont();
void SetLabelFont(LPDISPATCH);
COleFont GetTickFont();
void SetTickFont(LPDISPATCH);
COleFont GetTitleFont();
void SetTitleFont(LPDISPATCH);
COleFont GetIdentFont();
void SetIdentFont(LPDISPATCH);
short GetXGridNumber();
void SetXGridNumber(short);
short GetYGridNumber();
void SetYGridNumber(short);
BOOL GetShowGrid();
void SetShowGrid(BOOL);
CString GetXLabel();
void SetXLabel(LPCTSTR);
CString GetYLabel();
void SetYLabel(LPCTSTR);
unsigned long GetElementLineColor();
void SetElementLineColor(unsigned long);
unsigned long GetElementPointColor();
void SetElementPointColor(unsigned long);
long GetElementLinetype();
void SetElementLinetype(long);
long GetElementWidth();
void SetElementWidth(long);
long GetElementPointSymbol();
void SetElementPointSymbol(long);
BOOL GetElementSolidPoint();
void SetElementSolidPoint(BOOL);
BOOL GetElementShow();
void SetElementShow(BOOL);
long GetTrackMode();
void SetTrackMode(long);
CString GetElementName();
void SetElementName(LPCTSTR);
BOOL GetElementIdentify();
void SetElementIdentify(BOOL);
BOOL GetXLog();
void SetXLog(BOOL);
BOOL GetYLog();
void SetYLog(BOOL);
CPicture GetControlFramePicture();
void SetControlFramePicture(LPDISPATCH);
CPicture GetPlotAreaPicture();
void SetPlotAreaPicture(LPDISPATCH);
unsigned long GetControlFrameColor();
void SetControlFrameColor(unsigned long);
unsigned long GetPlotAreaColor();
void SetPlotAreaColor(unsigned long);
long GetFrameStyle();
void SetFrameStyle(long);
CString GetAnnoLabelCaption();
void SetAnnoLabelCaption(LPCTSTR);
double GetAnnoLabelX();
void SetAnnoLabelX(double);
double GetAnnoLabelY();
void SetAnnoLabelY(double);
unsigned long GetAnnoLabelColor();
void SetAnnoLabelColor(unsigned long);
BOOL GetAnnoLabelHorizontal();
void SetAnnoLabelHorizontal(BOOL);
short GetAnnotation();
void SetAnnotation(short);
BOOL GetAnnoVisible();
void SetAnnoVisible(BOOL);
short GetAnnoCount();
void SetAnnoCount(short);
short GetElement();
void SetElement(short);
short GetElementCount();
void SetElementCount(short);
unsigned long GetAnnoLabelBkColor();
void SetAnnoLabelBkColor(unsigned long);
short GetCursorCount();
void SetCursorCount(short);
short GetCursor();
void SetCursor(short);
double GetCursorX();
void SetCursorX(double);
double GetCursorY();
void SetCursorY(double);
short GetCursorStyle();
void SetCursorStyle(short);
BOOL GetCursorVisible();
void SetCursorVisible(BOOL);
short GetCursorMode();
void SetCursorMode(short);
CString GetFormatAxisBottom();
void SetFormatAxisBottom(LPCTSTR);
CString GetFormatAxisLeft();
void SetFormatAxisLeft(LPCTSTR);
BOOL GetYTime();
void SetYTime(BOOL);
BOOL GetXTime();
void SetXTime(BOOL);
// Operations
public:
void SetRange(double xmin, double xmax, double ymin, double ymax);
void AutoRange();
void CopyToClipboard();
void PrintGraph();
void AddElement();
void DeleteElement(short ElementID);
void ClearGraph();
double GetElementXValue(long index, short ElementID);
void SetElementXValue(long index, short ElementID, double newValue);
double GetElementYValue(long index, short ElementID);
void SetElementYValue(long index, short ElementID, double newValue);
void PlotXY(double X, double Y, short ElementID);
void PlotY(double Y, short ElementID);
void ShowProperties();
void SaveAs(LPCTSTR szFilename);
void AddAnnotation();
void DeleteAnnotation(short annoID);
void AddCursor();
void DeleteCursor(short cursorID);
void AboutBox();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NTGRAPH_H__DD0B623C_C9D1_49B8_8512_A2D69335842D__INCLUDED_)
没有你那个函数,所以只能自己画,还好用