Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing an OCX
Message
 
To
19/01/2000 06:30:35
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00319745
Message ID:
00319775
Views:
25
That is the error I'm getting. I need some way of creating this programmatically without using a form - I will look on MSDN, there's an article there may come close to what I want.

Thanks,

>Nigel,
>
>Is it giving you a "objectclass is invalid for this container" error message ? If so, it is not possible to instantiate them directly this way. You could make a new class based on a form, put the subclassed control on it and instantiate the form (with the class on it) with CREATE OBJECT.
>
>Another alternative is to use ADDOBJECT instead of CREATEOBJECT which enables you to instantiate it on a form directly.
>
>Walter,
>
>
>>That works on a form but not if you want to do CREATEOBJECT("SubClassedControl") - one of the classes I also need to subclass are used in this way.
>>
>>>Nigel,
>>>
>>>Place it on a form, Select it, save it as class, Open the class and add methods and properties you need. Open your form and drag the class to your form from the project manager (Tab Classes)
>>>
>>>Walter,
>>>
>>>>Does anybody know how to subclass an OCX. I want to subclass the MS Treeview control to see if I can reduce the memory required for loading it multiple times. I have been advised to subclass a control on a previous issue but never got around to trying it.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform