ActiveX Controls

89 views
Skip to first unread message

Mattm

unread,
May 29, 2012, 2:00:54 PM5/29/12
to IADS
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. 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.

MattM

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.

James Bretz

unread,
May 29, 2012, 2:23:05 PM5/29/12
to IADS
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



Mattm

unread,
May 29, 2012, 2:36:33 PM5/29/12
to IADS
Thanks Jim,

I appreciate the help.

MattM
> Jim- Hide quoted text -
>
> - Show quoted text -

Mattm

unread,
May 29, 2012, 2:54:00 PM5/29/12
to IADS
Jim,

A little more about the control. It's going to be like the Event
Monitor control, only simpler. It will monitor two parameters, and
display the value that's been converted from one format to another
(like a derived equation) according to a condition (say > a certian
value). It will basically have two columns, the "Code" value, and the
time it triggered. So I want to drag and drop those two parameter
onto the control, and then be able to manipulate other properties of
the control (background color, etc.). That's about it. Nothing too
crazy.

Any addition input, or help is appreciated. Thanks.

Mattm


On May 29, 2:23 pm, "James Bretz" <j...@iads-soft.com> wrote:

James Bretz

unread,
May 29, 2012, 2:58:44 PM5/29/12
to ia...@googlegroups.com
Sounds good ;)
Jim

--------------------------------------------------
From: "Mattm" <mathmen...@gmail.com>
Sent: Tuesday, May 29, 2012 11:54 AM
To: "IADS" <ia...@googlegroups.com>
Subject: [IADS] Re: ActiveX Controls
> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To post to this group, send email to ia...@googlegroups.com.
> To unsubscribe from this group, send email to
> iads+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/iads?hl=en.
>

Sherman, Paul

unread,
Jun 4, 2012, 1:00:28 PM6/4/12
to ia...@googlegroups.com
I finally got an ActiveX application that receives blob data from IADS and displays it
as video in the ActiveX app. But I've got a new problem. If I bring up an IADS display
and add the ActiveX app and then drag the video data source over to it, it works
just fine. But if I bring up an IADS display, add the ActiveX application to it, save
the configuration, close IADS and bring it up again, it crashes with the following :

A pop up window, stating "Unhandled exception at 0x0095cbb3 in Iads.exe :
0xC0000005 : Access violation writing location 0x00000000." appears along with
code from _file.c with a green arrow pointing at the last bracket at the end of
function "void __cdecl _lock_file"


James Bretz

unread,
Jun 4, 2012, 1:09:28 PM6/4/12
to ia...@googlegroups.com
Paul,

Sounds like some uninitialized variable access in the dll upon load. My
guess is that one of your functions are being called when the "mParameter"
is still NULL (parameter not yet attached).

The tutorial PDF shows how to run Iads from the debugger (with your project
code loaded). Try to crash it with the debugger attached and it will show
you the exact location.

Jim

--------------------------------------------------
From: "Sherman, Paul" <pshe...@smartronix.com>
Sent: Monday, June 04, 2012 10:00 AM
To: <ia...@googlegroups.com>
Subject: [IADS] ActiveX related problem
Reply all
Reply to author
Forward
0 new messages