Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Events from dynamically created CNiGraph object

Hi,
My application requires me to create a variable number of CNiGraph objects at runtime. I'm plotting data from a file and I don't know in advance how many variables there will be. So, I'm dynamically creating the graph objects in the OnInitDialog() method of my CView derived class. The thing I'm stuck on is how to get the various messages from the graph when it is created dynamically like this. I can't use Class Wizard for the message maps because the number is variable. I suppose I could create a bunch of static message maps (more than I think I would ever need), but is there a cleaner way to do this? I'm using Visual C++ 6.0.
Thanks, Bob
0 Kudos
Message 1 of 2
(3,067 Views)
Ok, I figured it out. You need to change the event sink map to use the ON_EVENT_RANGE instead of ON_EVENT. The help for ON_EVENT_RANGE tells you all you need to know.
Message 2 of 2
(3,067 Views)