Matt,
> I'm looking at developing an ActiveX control, and I've been looking at
> the "CreatingAnActiveXDisplayUsingEverySampleInC#" example, since I
> would like to drop some parameters onto it to be used in the control.
> The example uses only one parameter, and I'll need more than one for
> control I'm working on. As I'm going through the example, I'm a
> little confused as to what an Attachpoint is. Is there a different
> attach point for each parameter (as is suggested by some of the
> comments in the IAcceptIadsParameter interface methods).
> The AttachPointCount method comment says "Attach points is basically a
> parameter slot, much like a property from the properties sheet. For
> this display, we only have one attachment (i.e. one paramter". I was
> doing fine until I read the get_AttachPointDepth method's comments.
> They say "In this function, we need to return how many parameters can
> be piled up on a single attachment point. In this case, we only have
> 1. For CrossPlot display, this would be 2 (i.e. x/y pair). For a 3D
> CrosPlot, this would be 3 (i.e. x/y/z triplet". So for my control, I
> guess the answer would be 2, but the question is, would I have 1
> attachpoint, with a depth of 2 with my 2 parameters, or would I have 2
> attachpoints, with a depth of 1 each.
Yes, that comment is confusing. I should correct it. The answer to your
question is: Two attach points with the depth of 1 each. The only time you
want to use "Depth" of other than 1 is if you allowed multiple parameters
attached to the same 'Property' (as the Iads CrossPlot allows multiple
parameters attached to the "X" and multiple to the "Y"). In other words, if
you only ever have 1 parameter attached to each "Property" (AttachPoint),
then the depth is always one.
Imagine building a StripChart and you had a property called "Pen". In
theory, you could have 5 parameters attached to "Pen". In that case, it
would draw all 5 traces (just like the Iads StripChart). In most all cases,
the depth is 1... only for the most advanced displays is it not 1.... and
honestly, in that case, I'm not even 100% sure that the current ActiveX
interface supports depth > 1. This was simply added as a mechanism for
future expansion to mimic the Iads core displays (when a parameter is
dropped and the <ctrl> key is held down). We eventually plan on adding this
feature to custom ActiveX displays... some day, but so far nobody has needed
the capability, so we've left it to languish to keep things simple (thus I
should have removed/changed those comments in the tutorial).
> If it's 2 attachpoints, I need
> to compensate for this in the other methods; Add, AttachPointCount,
> AttachPointName, Count, Item, Remove, and get_AttachPointDepth.
> Thanks.
I'm not sure what control type you're building, but if it's a CrossPlot, the
answer is "2 attachpoints, one called 'X', the other 'Y'... depth = 1"
Start there and then worry about multiple parameter pairs (x/y pairs) later.
> Also, do you all have the patches/code for 7.3.3. Andy wants to start
> playing with it. Is posting it to your ftp site an option? Thanks.
Not quite done yet. We'll upload it and email soon,
Jim