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
.Object.Backcolor = 16776960
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.
>>>>