Example of using ActiveX inside OpenDCL ?

Started by stephan_35, November 20, 2009, 03:38:45 AM

Previous topic - Next topic

stephan_35

Hello,

I would like to know if it's easy to use activeX inside openDCL, and if anybody already use these ???

Thanks for help.
Best regards.
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

Fred Tomke

Hi Stepjan, you mean an ActiveX control? It is as easy as you can trust that the user has installed it. I have used it at my ObjectDCL dialogs. But some admins did not install the controls I needed or the control was unregistered. Then error messages came up and I gave up.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

stephan_35

Hi,
By the merest chance, would you use the ActiveX control treeview?
I'm having some trouble with setting objects OpenDCL, and I wanted to attempt the side of ActiveX ...

I found this :
http://www.opendcl.com/forum/index.php?topic=149.msg829#msg829
Quote
(dcl_AxControl_DoMethod <tree-control> "Add" <optional Relative> <optional Relationship> <optional Key> <optional Text> <optional Image> <optional SelectedImage>)

The arguments are more fully described at:
http://msdn2.microsoft.com/en-us/library/aa443386(VS.60).aspx

To test the tree control, I tried the following:

(setq Nodes (dcl_AxControl_GetProperty <tree-control> "Nodes"))
; now Nodes is an OLE Object, and we use (dcl_AxObject_*) syntax
(Setq NewNode (dcl_AxObject_DoMethod Nodes "Add"))
; NewNode is also an OLE Object
(dcl_AxObject_SetProperty NewNode "Text" "MyNewTreeItem")
; this should work, but the call into the tree control fails with a COM error
(setq text (dcl_AxObject_GetProperty Node "Text")) ;this works fine
(dcl_AxObject_Close NewNode) ;release the node
(dcl_AxObject-Close Nodes) ;release the nodes collection

I'm not sure why the call to set the 'Text' property fails, but I will investigate this. The code above should work, and at least it can demonstrate the basic steps.
Thank you for your help
Best regards
OpenDCL 6.0.0.6 / Editor 5.1.2.3  / Vista 32 Bits
Development of  specific tools for trades in AutoLisp - php - sql

owenwengerd

If you encounter any problems with the ActiveX tree control, post them here.
Owen Wengerd (Outside The Box) / ManuSoft