Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create an Object with clsid?
Message
From
16/11/2001 03:35:24
 
 
To
16/11/2001 00:32:05
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00582384
Message ID:
00582585
Views:
60
You did it! That solved my problems.

I really appreciate the time you took to help me out with this.

-Bri.


>I don't think that one can be used like that. I get an error "No such interface" when trying your code. But it is creatable with:
>
oITP = CreateObject("DEInsertTableParam.DEInsertTableParam")
>Mind you I don't know what this is for. All I can see is that it has 5 properties and no methods: Caption, CellAttrs, Numcols, Numrows, TableAttrs.
>
>It is probably for use by another object in this OCX and it won't do you any good to create it independently. I am not familiar with this OCX so you probably know more about this than me. I'm guessing you can probably add it to one of the properties of the other objects.
>
>>OK, I think I'm getting closer ... I'm getting a different error.
>>
>>I pasted your code and tried it. It worked perfectly. Now, that gives me the DHTML Editing control, rather than the TableInfo control, which is part of dhtmled.ocx, that I want.
>>
>>By looking at your code, I realized I was using the ProgID incorrectly. I was adding "DHTMLEDLib" to the beginning of the hierarchy. So, I just used the exact ProgID that I found in the registry. Like this:
>>
>>
>>ThisForm.AddObject('myctrl', 'olecontrol', 'DEInsertTableParam.DEInsertTableParam.1')
>>
>>
>>Now the error is that the "class is not registered". What do I do about that?
>>
>>-Bri.
>>
>>
>>>I tried something, and it works for me:
>>>
this.addobject("myedit", "olecontrol", "DHTMLEdit.DHTMLEdit.1")
>>>with this.myedit
>>>	.left=this.left+20
>>>	.top=this.top+20
>>>	.height=200
>>>	.width=200
>>>	.visible=.t.
>>>endwith
>>>This ProgID came up when searching for "DHTMLEdit" on the registry. HTH
>>>
>>>>Hello Crescencio,
>>>>
>>>>I found the CLSID in the registry. When I tried the ProgID, it seemed to hang for a long time and then the Insert Object dialog came up. I also tried the VersionIndependentProgID with no luck.
>>>>
>>>>Here are the relevant pieces of code I tried:
>>>>
>>>>
>>>>* Using the ProgID
>>>>ThisForm.AddObject('myctrl', 'olecontrol', 'DHTMLEDLib.DEInsertTableParam.DEInsertTableParam.1')
>>>>
>>>>
>>>>and ...
>>>>
>>>>
>>>>* Using the VersionIndependentProgID
>>>>ThisForm.AddObject('myctrl', 'olecontrol', 'DHTMLEDLib.DEInsertTableParam.DEInsertTableParam')
>>>>
>>>>
>>>>I guess I'm doing something wrong. Do you have any suggestions?
>>>>
>>>>Thanks for your help,
>>>>
>>>>-Bri.
>>>>
>>>>
>>>>>
>>>>>Have you tried searching for the clsid on the registry? (with regedit)
>>>>>
>>>>>You can create automation objects from clsid's with CreateObjectEx(), but I don't believe it works with OCX's.
>>>>>
>>>>>If you can find the ProgID for this CLSID you should be able to put that in the OLEClass parameter of AddObject().
>>>>>HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform