Originally posted by: Petr Hracek
Hey all,
It's very great work. It's excelent.
I have one big problem. I tried compile this demo code
and MSVC++.NET2003 sow me message that _GetBaseMessageMap is not a member of CScrollChart <T>.
And other error:
d:\Temp\test\cldemo.cpp(47): error C2440: 'static_cast' : cannot convert from 'void (__thiscall CDialogMain::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
Can you help me anybody?
Petr.
ReplyOriginally posted by: mingligar
Thanks. your projet is The one I want to find. I get it.
ReplyOriginally posted by: edward
can this display data as much as I like, or huge quantities?
ReplyOriginally posted by: Taghi
template<class T>
//else m_TextVerMax.SetWindowText(strTmp);
So that the whole function can looked as follow:
void CTest02Dlg::OnNewLimits(WPARAM wParam, LPARAM lParam)
<< In the class file >>
Change the "LPtoDP(T X,T Y)" function as the folowing :
CPoint CScrollChart<T>::LPtoDP(T X,T Y)
{
int nY;
int nX;
CRect rectClient;
GetClientRect(rectClient);
nY = ((rectClient.Height() * (Y-m_MinValue) * 0.95) /( m_MaxValue-m_MinValue));
nX = ((rectClient.Width() * (X - m_pointIni)) / m_nHzRange);
return CPoint(nX, rectClient.Height() - nY);
}
<< In your program >>
And if you want to refresh the min vertical limit textbox
as in the demo program only in "OnNewLimits" message
mapped function uncomment the folloing statment:
{
CString strTmp;
strTmp.Format("%d",wParam);
if ( (GetCurrentMessage()->message) == WM_NEWHORZLIMITS) m_TextHozMin.SetWindowText(strTmp);
else m_TextVerMin.SetWindowText(strTmp);
strTmp.Format("%d",lParam);
if ( (GetCurrentMessage()->message) == WM_NEWHORZLIMITS) m_TextHozMax.SetWindowText(strTmp);
else m_TextVerMax.SetWindowText(strTmp);
}
Originally posted by: Maarten
CScrollChart::Create
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
nID
Specifies the chart control's ID.
What is the chart control's ID? Is is the scrollbar?
This header looks wonderfull but I can't get it running...
In the example it has value 101. Why? I can't find the reason...
Thanks for help!!
Greetz
Reply
Originally posted by: Amit
Thanks
Emil,
for your help.That u have suggested is one away solution and i also find other solution
as
Create pointer
CScrollChart *myscrollchart;
myscrollchart=new CScrollChart();
this work fine
Now I have concern about memory size.
when I put four scrollchart controls having 3 to 4 lines each with 0 timer the memory uses increases drastically.And CPU usage is also 99% which affect other application's working.
So can any one suggest how to clip the control.
Window display as of size of control would be sufficient for me.
Amit
ReplyOriginally posted by: Amit
Hi
I want to delete the control on the fly. but code suggested by sonia seems to be not working in my case.
It is giving error while creating pointer of the template class CScrollChart .If any one knows the solution please help me
thanks
Amit
Originally posted by: Jeremy
Hello, thanks for the control. It looks very useful. I am able to draw the chart, but when I do AddLine and AddData nothing happens - I can't draw any lines on the chart.
Can you give me any info that may help with this issue?
Thanks,
Jeremy
Originally posted by: Helena
How can I print the graph?
Originally posted by: hnf
how clear the graph and restart an other
Reply