Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying An OleClass
Message
De
03/01/2017 15:26:47
 
 
À
03/01/2017 14:58:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01646275
Message ID:
01646278
Vues:
62
From the top of my head, and I was never clear enough to work without some hints in the doc....

>So I have a class, vsflex_cursor of vsflex_lite.vcx that I want to copy. It is an OleClass.

AFAIR OleClass was the identifier/pointer to the COM object either wrapped (OLEContainer, class name just OLEControl ?) or bound (OLEBoundControl)
IIRC the basic COM object before instantiation is something more similar to a singleton for each machine (some things you can set , I remember a colour picker somewhere in the dyna-toools, and such settings were then "global", probably in the registry), but you cannot subclass and set subclassed instance properties without creating a new COM object with the registry entries.

The subclassing had to be done on the vfp container side, typically with set_on_xxx() method reaching down to the COM-object-instance created / copied and handled by OLEContainer, sometimes reading vfp properties named identically/similar if design needed inheritance for such property setting.

I think the behaviour is described either in Ricks book or Megafox, but it has been a long time since I had to walk these lines ;-)

>
>I want to copy (not subclass) it, with the usual way being:
>
>
>create classlib dummy
>add class vsflex_cursor of vsflex_lite to dummy
>
>
>What I get is "Object class is invalid for this container."
>
>This happens with all of OLE controls in the project.
>
>Is this known behavior? A Google search brought up irrelevant hits based on the error message (other issues).
>
>tia,
>
>Hank
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform