Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting started with Measument Studio

Note: I messed up my previous post and can't edit it (Some timer timed out...) So I'm reposting the full post.

So I've been strugeling to get up and running with Measutment studio for a few days now. I'm having problems just getting a graph on the screen.
Here is what I've done:

1) Started a new Measument Studio project. (C++ in VS.Net 2003)
2) Added a graph to the dialog window in VS's dialog editor.
3) Changed the ID of the graph to IDC_GRAPH
4) Wrote this code:
CWnd* window = GetDlgItem(IDC_GRAPH);

CNiGraph* graph = (CNiGraph*) window;
for(int i = 0; i < 50; i++){
graph->ChartY((double) i);
}
5) Ran this code. When this snippet runs, my application crashes.

Now I think the problem is that graph is not of type CNiGraph*.
But for the life of me, I can't figure out what it's type should be.

Am I calling the right function to get a pointer to the graph?
What datatype do I get when I call GetDlgItem? I don't know enough about
MFC to make sense of it's runtime type system, so I don't really know what I've got.
Am I getting a pointer to IUknown?

Well, if anyone has some advise, I'd welcome it.
Thanks in advance,
Philip Knodle
0 Kudos
Message 1 of 2
(2,993 Views)
Please see the reply to the original post.

- Elton
0 Kudos
Message 2 of 2
(2,986 Views)