BlueKarana
asked on
Visual Studio 2010 MFC ActiveX: basic method for defining OBJECT tag for ocx?
I'm just getting into developing MFC ActiveX controls in vs2010. Read: keep it simple, I'm practically clueless :)
I created a solution with an MFC ActiveX control project within it. Inside that I created a custom method. I created a CAB project inside the solution. But, I thought as a first step in testing I'd keep it simple and just install the OCX (that is, not have a signed CAB just yet). My site is classic asp and I'm planning on accessing the control using a form, by the way.
I wrote this object tag def:
<OBJECT ID="CXIDControlCtrl" height=0 width=0
CODEBASE="http://<%=sServerName%> /XIDContro l.ocx#vers ion=1,0,0, 0"
</OBJECT>
So, what's next, cause this didn't work? (the page asks if I want to allow blocked content, I say yes, and it keeps asking over and over without actually installing it)
I probably need a classid, right? Where do I find that? Where do I find the correct version?
Do I need to do a separate MFC installation or is that packaged inside my ocx?
What else am I not getting?
(the ms site led me done a rabbit hole with articles with old tech and incomplete workflows. Any suggestions for cradle-to-grave instructions are also welcomed!)
Thanks!!!!
I created a solution with an MFC ActiveX control project within it. Inside that I created a custom method. I created a CAB project inside the solution. But, I thought as a first step in testing I'd keep it simple and just install the OCX (that is, not have a signed CAB just yet). My site is classic asp and I'm planning on accessing the control using a form, by the way.
I wrote this object tag def:
<OBJECT ID="CXIDControlCtrl" height=0 width=0
CODEBASE="http://<%=sServerName%>
</OBJECT>
So, what's next, cause this didn't work? (the page asks if I want to allow blocked content, I say yes, and it keeps asking over and over without actually installing it)
I probably need a classid, right? Where do I find that? Where do I find the correct version?
Do I need to do a separate MFC installation or is that packaged inside my ocx?
What else am I not getting?
(the ms site led me done a rabbit hole with articles with old tech and incomplete workflows. Any suggestions for cradle-to-grave instructions are also welcomed!)
Thanks!!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
FYI, turns out MS ActiveX Control Pad is NOT compatible with Windows 7, which of course I'm on.
ASKER
Turns out the Class ID is in the .idl file. It doesn't spell it out, but that's it.
// Class information for CXIDControlCtrl
[
uuid(C03909D8-936B-404A-98 15-448658E A19A7)
]
The sample code in the article did help so I'll consider this a solution.
Thanks for your help jkr.
// Class information for CXIDControlCtrl
[
uuid(C03909D8-936B-404A-98
]
The sample code in the article did help so I'll consider this a solution.
Thanks for your help jkr.
ASKER
Thanks for responding, jkr
ASKER
The article looks great. thanks.
I did try what it suggests already and didn't have any luck, the ActiveX Control Pad. When I tell it to insert and ActiveX Control my project doesn't appear in the list. ???
I'll run through the whole example tomorrow and see if I'm just missing something.