Thanks for the info David. I sure would like to call my CNiGraph::PlotY method from inside any thread and I would appreciate some example code. Don't spend to much time on it because I know you are working hard to get the new version of Measurement Studio released. I'd hate to think that I slowed down the process. Well, slowed it down too much anyway.
I keep thinking that there should be some kind of a simple solution because everthing seems to work fine until I try and automate a button press. My message thread is polling an A/D over a can bus and feeding back the data continuously to an edit box. I have a button that uses the DDX communication function UpdateData(TRUE); to load the member variable w
ith the value of the edit box and then add that value to my chart. This works fine if I press the button myself. If I try and just call the function that the button calls each A/D conversion though I get a Run Time error "abnormal program termination". Do you think I could write my own thread to just press the button? That's still in a thread though isn't it. Would I still have to do the marshaling?
Right now I'm just anxious to get something working. For sure the next release of Measurement Studio will solve this problem but in the meantime I would really appreciate just some way to work around this. I've already spent a good deal of time on it and am not afraid to spend a great deal more. If you could make some example code that would be great but maybe the number of people interested in this issue doesn't warrent the time spent. Thanks again for your help and the cool software.
Grant
Grant M. Johnson
Project Engineer
LECO Corporation