Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically subclassing OleControl class...
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Programatically subclassing OleControl class...
Miscellaneous
Thread ID:
00102736
Message ID:
00102736
Views:
62
Hey All,

I'm trying to programatically subclass an OleContainer control. I need to override the code in some of the methods of an OLE control. I am able to do this manually via the form designer but when I try to do it in code I can't seem to get it to work:

DEFINE CLASS MyClass AS OleControl
OleClass = "[Insert class of control here]"

PROCEDURE GetData
Blah blah blah, my stuff here...
RETURN

ENDDEFINE

If I try something simple like this I get an "Interface Not Supported".
o = CreateObject("Form")
o.Visible = .t.
o.AddObject("Class1","MyClass")

When I try this I get an OLE "No Such Interface Supported" error.

Like I said, I can successfully do what I need to do via the form designer but I need to be able to this programatically. Any ideas or insight into the difference between doing it manually and in code?
--
David Mann
Software Developer

"I don't believe in 'isms', I just believe in me" -- Ferris Bueller
Next
Reply
Map
View

Click here to load this message in the networking platform