<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=699410800-06062006><FONT face=Arial color=#0000ff size=2>MFC is
using DEBUG_NEW which has 3 arguments. Just use ::new (globla scope) and it will
do what YOU want</FONT></SPAN></DIV>
<DIV><SPAN class=699410800-06062006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=699410800-06062006><FONT face=Arial color=#0000ff size=2>Paul
Tait</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
vtkusers-bounces+paul=opes.com.au@vtk.org
[mailto:vtkusers-bounces+paul=opes.com.au@vtk.org] <B>On Behalf Of
</B>Alexander.Wang<BR><B>Sent:</B> Monday, 5 June 2006 10:29 AM<BR><B>To:</B>
vtkusers <BR><B>Subject:</B> [vtkusers] Problem in the inheritance of
vtkCommand<BR><BR></FONT></DIV>
<DIV> </DIV>
<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>I want to have some callback for the interaction. I defined a class
vtkDicomObserver inherited from vtkCommand, but there is a problem in the
method NEW. When compiling the code of this method, the compiler tell me:
<EM>error C2660: 'new' : function does not take 3 parameters. </EM>The program
is running under Windows XP and MSVC 6.0, as a SDI project. Can anyone give me
some advice? Here is the reference code.</DIV>
<DIV> </DIV>
<DIV>//Code Begin</DIV>
<DIV>class vtkDicomObserver : public
vtkCommand<BR>{<BR>public:<BR> virtual char const * GetClassName()
const<BR> {<BR> return
"vtkDicomObserver";<BR> }<BR> static vtkDicomObserver *
New()<BR> {<BR> return new vtkDicomObserver;</DIV>
<DIV>//error occurs when compiling this
sentence<BR> }<BR> vtkDicomObserver()<BR> {<BR> this->ImageViewer=NULL;<BR> this->ImgRenderWindowInteractor=NULL;<BR> }<BR> virtual
void Execute(vtkObject *, unsigned long event, void*
)<BR> {<BR> if(this->ImageViewer)<BR> {</DIV>
<DIV> ...<BR> }<BR> }<BR> vtkImageViewer *
ImageViewer;<BR> vtkRenderWindowInteractor *
ImgRenderWindowInteractor;<BR> CPoint Point;<BR>};</DIV>
<DIV><BR>//Code End</DIV>
<DIV> </DIV>
<DIV>Thanks in advance!</DIV>
<DIV> </DIV>
<DIV>Yours sincerely,</DIV>
<DIV>Alexander</DIV><SPAN></SPAN><BR><!-- footer --><BR><BR><BR><BR><BR>
<DIV style="BORDER-BOTTOM: #999 1px solid"></DIV><BR><FONT
style="FONT-SIZE: 14px" color=black>你 不 想 试 试 今 夏 最 “酷” 的 邮 箱 吗 ?</FONT>
<BR><A style="FONT-SIZE: 13px; COLOR: blue; LINE-HEIGHT: 160%"
href="http://www.126.com/" target=_blank>蕴 涵 中 华 传 统 文 化 于 世 界 一 流 科 技 之 中,创 新
Ajax 技 术,126 “D 计 划”火 热 体 验 中 ! </A><BR>
<P><FONT size=2>--<BR>No virus found in this incoming message.<BR>Checked by
AVG Free Edition.<BR>Version: 7.1.394 / Virus Database: 268.8.1/355 - Release
Date: 2/06/2006<BR></FONT></P>
<P><FONT face=Arial size=2></FONT></P></BLOCKQUOTE></BODY></HTML>
<BR>
<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.1.394 / Virus Database: 268.8.1/355 - Release Date: 2/06/2006<BR>
</FONT> </P>