Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

problems using cwgraph

Hi.
I am developing a graphical user interface to display several parameters on different dialogs using Microsoft Visual C++ .NET.  Each of 5 dialogs have one CWgraph and they are all displaying data.  I retrieve a single x,y pair and then plot this using the chartxy() member function.  I have run into several problems while trying to add these measurement studio plots to my project and I was wondering if anyone else ran into anything like this.
1) Using the controls in a windowless mode caused the program to run slowly and kept displaying the message "Control tried to invalidate pixels outside its bounds" in the output window.
2) I tried to use windowed graphs and that caused the program to crash when I deleted the dialog box in which the graphs reside.
3) Finally I started not worrying about deleting the dialogs before exiting and just allowing the object dump.  In this windowed mode the program uses 100% of CPU time and runs very slowly.
 
I would appreciate any advice.  Thanks!
amig
0 Kudos
Message 1 of 2
(3,468 Views)

Are you using multiple threads in your application? If you do, make sure you call CoInitialize() before you call any function of the graph.

Do you have a sample I have a look at? Which version of Measurement Studio are you using?

Thanks

Bilal Durrani
NI
0 Kudos
Message 2 of 2
(3,463 Views)