Hey guys, I found the answer...
1) I define my custom methods in my procedure file....
DEFINE CLASS myCustomClass AS OLEPUBLIC
*NOTE: Do not declare the OLECLASS here!
PROC TypeLibMethod1
ENDPROC
PROC TypeLibMethod2
ENDPROC
ENDDEFINE
2) Then in my form...
thisform.NewObject('FormObjectName','myCustomClass','Path/ProcFile',,'TypeLib')
It appears as if this is more of an overlay than a subclass. Anyway I think that this will fit the bill.
Thanks for all your help
>Look the VFP8 Help File,
DEFINE CLASS there example
>
>
> PUBLIC frmOLETest
> frmOLETest = CREATEOBJECT('Form')
> frmOLETest.Visible = .T.
>
> frmOLETest.ADDOBJECT('OCXTest', 'BlueOLEControl', ;
> 'MSOutl.Outline')
> frmOLETest.OCXTest.AddItem('Item One')
> frmOLETest.OCXTest.AddItem('Item Two')
>
> DEFINE CLASS BlueOLEControl AS OLEControl
>
> * Set a property of the ActiveX control
> .Object.Backcolor = 16776960
>
> * Set properties of the OLE Container Control
> Visible = .T.
> Height = 100
> Width = 200
> ENDDEFINE
>
>
>
>>When I use mscomctllib.listviewctrl.2 (per your example) it does the same thing.
>>
>>Can you verify?
>>
>>This is what I have
>>
>>*AMADDON.PRG
>>DEFINE CLASS myListView as olecontrol
>> OleClass = 'mscomctllib.listviewctrl.2'
>>ENDDEFINE
>>
>>Create a form and drop a command button on it.
>>In the click method, I have
>>
>>thisform.NewObject('test','myListView','amaddon.fxp')
>>
>>
>>>DId you verify OleClass value for this control?
>>>
>>>>When I issue "this.NewObject('objectname','classname','procname')" in the form's init, the Activex dialog pops up prompting me to select a control.
>>>>
>>>>Any idea as to what is happening?
>>>>
>>>>>
>>>>>What error do you get? Try to drop ActiveX on a form and read OLECLASS property.
>>>>>