Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically registering an OCX
Message
From
25/02/2002 12:32:42
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00622866
Message ID:
00624608
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform