Originally posted by: Aiping Fang
I work with it very nicely when using its debug verion. A debug assertion faild when the program that use clplot.dll and clplot.lib was executed as release version. The error information as below:
Debug Assertion Failed!
File: afxwin1.inl
Line 19
Why? Would please tell me how to correct this error?
Thanks.
I am happy to share with you my simple remedy for the Assert in Release vrsion. Instead of adding the "plot" project as done in the demo code, create a new class, call it "plot" or anything you like. Copy and paste the contents of the header and cpp files. Copy and add MCMem header and cpp files to your project and include your newly created class into your dialog or view class, whichever you are using, and proceed as before. This will compile and run without Asserts in Debug and in Release version. Obviously, the handle to "this" in the Create syntax does not pass to a separate project in Release version only, I don't know if this is an MFC quirk or programming error but I was kind of hoping that somebody can suggest a way to re-define the handle. Anyway, my remedy works and this is good enough for me! Good luck. Faisal
ReplyThe realtimeplot demo is great!!!
I added the clplot.dll and clplot.lib to my project, wich is dialog based (I used your code of the first comment )
but when I run it I get an assert failure like this!
Debug Assertion Failed!
File: afxwin1.inl
Line 19
I used your code of the first comment
BOOL CDllTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CRect Rect;
//GetClientRect(&rect);
CWnd *wnd = GetDlgItem(IDC_PLOT);
wnd->GetWindowRect(Rect);
ScreenToClient(Rect);
plot.Create(WS_CHILD|WS_BORDER|WS_VISIBLE, Rect,
this ,1001);
return TRUE;
}
I've debuged my application and I've located the problem:
I cannot pass with the "this" in the plot.create(...) function.
Wich means pParentWnd->GetSafeHwnd() receives a wrong HWnd!
Could you give me some advice how I my application can work?
Thanks
Luke
(Submitted by Luke on 2001/05/09. Reposted)
Reply
Originally posted by: Kenneth Sin
I've downloaded the demo and it works nicely. I would like to use this plotting function for my program but what are the files I actually need to add into my progam? I only know C but not C++, would be great if any help is provided. Thanks!
Kenneth Sin
ReplyOriginally posted by: Jan Vidar Berger
All source for the control is precent in clPlot.h and clPlot.cpp.
ReplyOriginally posted by: David Weisz
It's a great control, and I would like to use this control in a school project. I would gratly apreciate if You can give me (us) the full source code.
Thank You!
Originally posted by: benoit BAILLIE
The error message displays :
Have you ever met this problem?
The version of VC++ is 6.0 under Win NT 4.0.
Thanks in advance
Benoit
An error occurs when i start the demo file.
Assertion failed!!
File : wingdi.cpp
line : 832
Originally posted by: Lubos Bednarik
I think it's great work.
m_plotBkColor = RGB(255,255,255)
I have also tried to add declaration for brushctlBkColor in clPlot::DrawBasic and command
Could you tell me how do ?
Thanks
Hello Jan,
But I have one question to you:
How to change background color in the window.
I have tried to change the line:
to
m_plotBkColor = RGB(0,0,0)
in clPlot::clPlot
but it doesn't work.
dc->FillRect for m_plotRect and bruschplotBkColor, but it doesn't work too.
Originally posted by: Jerome Isabelle
Hi,
I would like to add points to my plot more than once
per second( example: every 500 millisec ).
When I set the timer to SetTimer(1,500,NULL), I effectively
generate data each 500 milli, but I only add them every
1000 milli!
How would I achieve this?
Thank you.
Bonjour,
Je voudrais plcer des points sur le graphique � une fr�quence
sup�rieure � 1 seconde. J'ai essay� de modifier le SetTimer
sans succ�s.
Comment pourrai-je Y parvenir ?
Merci Beaucoup.
Jerome Isabelle
Originally posted by: liu chunsheng
Thank you for your great work of CLPlot,I am not sure how to do the following :
1 Open a handle to a specified communications resource.
2 Set and query the configuration of a serial(COM and LPT) communications resource.
3 Read from or write to a serial communications resource.
4 Monitor a specified set of events that might occur for a given serial communications resource.
5 Send a control command to the device driver associated with a specified communications resource,
causing the driver to execute an extended function.
Originally posted by: satish
hi i am satish
the plot is real great i have used it and it is very efficitive..
but i have a doubt...
how to in put or plot real data...where in the code i can make
any changes that it plots the real data
or the plot takes the real data values from the input
or flopy and plots it...
sandeep
Originally posted by: Sachin Ghodkhande
This GURU has made something very useful.
Will somebody make an OCX of it? Please do it.
It will be very useful for lower class programmers like us.
It is a very well made program. Taking into account memory usage, flickering, autoScrolling, etc. A perfect RealTime Graph
Sachin Ghodkhande
Reply