Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically registering an OCX
Message
De
25/02/2002 12:32:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00622866
Message ID:
00624608
Vues:
22
Hi Ashley.

>I do not know what registry class you are referring to.

As I mentioned, it's the Registry class in HOME() + "FFC\REGISTRY.VCX" (ie. the REGISTRY.VCX in the FFC subdirectory of your VFP home directory).

>Could you do some hand holding and give me a code example.
loRegistry = newobject('Registry', home() + 'FFC\Registry.vcx')
lcValue = ''
#define cnHKEY_CLASSES_ROOT -2147483648
lcClassID = '{C74190B6-8589-11D1-B16A-00C0F0283628}'
loRegistry.GetRegKey('', @lcValue, ;
    'CLSID\' + lcClassID + '\InProcServer32', ;
    cnHKEY_CLASSES_ROOT)
if empty(lcValue)
* ActiveX control isn't registered
endif
In this example, I set lcClassID to the class ID for the TreeView control. How do you know what the class ID is? Create a form, drop an OLE control on it, and in the Insert Object dialog that appears, select the ActiveX control you want. The class ID is shown in the "Result" area of the dialog.

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform