<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi,<BR>
I am writing a program by vtkSphereWidget ( using C++ ) ,and I want to connect my render window with the mouse event , so I use the AddObserver() function , at the same time , I write a new function that could be invoked , its name is MyFunction() . As the usage of AddObserver() , my code is : <BR>
sphereWidget->AddObserver( InteractionEvent, MyFunction );<BR>
but there is a error : 'unsigned long __thiscall vtkObject::AddObserver(unsigned long,class vtkCommand *,float)' : cannot convert parameter 2 from 'void' to 'class vtkCommand *' .<BR>
So why is it ? and how can I use the AddObserver() ? Could you give me an example ? thank you !<BR><br /><hr />中国十大热门旅游景点 <a href='http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE' target='_new'>了解更多信息!</a></body>
</html>