<html>
<body>
Hi Diego,<br><br>
I'm posting your response back the VTK users list. Please keep the
discussion on the list; that way other people can help answer your
questions, and the discussion will be in the archives for the mailing
list.<br><br>
- Amy<br><br>
At 01:31 PM 9/14/2005, you wrote:<br>
<blockquote type=cite class=cite cite="">hi.<br><br>
The problem not is a precompiler code lines, is the form of inheritance
<br>
in the mail I omitted them <br><br>
<br>
2005/9/14, Amy Squillacote
<<a href="mailto:amy.squillacote@kitware.com">
amy.squillacote@kitware.com</a>>:<br>
<dl>
<dd>Hi Diego,<br><br>
<dd>Did you include CvtkWin32OpenGLRenderWindow.h in<br>
<dd>your .cpp file? (I'm guessing this is a subclass<br>
<dd>you created of vtkWin32OpenGLRenderWindow.) Also<br>
<dd>vtkSetWindowLong is #define'd inside a few<br>
<dd>classes in VTK/Rendering, so you can't just use<br>
<dd>it; you would need to set the up the #define<br>
<dd>appropriately. (See<br>
<dd>vtkWin32RenderWindowInteractor.cxx around line 50 for an
example.)<br><br>
<dd>- Amy<br><br>
<dd>At 12:00 PM 9/14/2005, Diego Parada wrote: <br>
<dd>>Hi,<br>
<dd>><br>
<dd>>I have been treating to derivate a clas from<br>
<dd>>vtkWindowRenderInteractor but the compilation showws this:<br>
<dd>><br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30)<br>
<dd>>: error C2065: 'CvtkWin32OpenGLRenderWindow' : undeclared
identifier <br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30)<br>
<dd>>: error C2065: 'tmp' : undeclared identifier<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30)<br>
<dd>>: warning C4552: '*' : operator has no effect; <br>
<dd>>expected operator with side-effect<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35)<br>
<dd>>: error C2065: 'vtkWin32OpenGLRenderWindow' : undeclared
identifier<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35) <br>
<dd>>: error C2065: 'ren' : undeclared identifier<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35)<br>
<dd>>: warning C4552: '*' : operator has no effect;<br>
<dd>>expected operator with side-effect<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(36) <br>
<dd>>: error C2061: syntax error : identifier
'vtkWin32OpenGLRenderWindow'<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(37)<br>
<dd>>: error C2059: syntax error : ')'<br>
<dd>>C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(50) <br>
<dd>>: error C2065: 'vtkSetWindowLong' : undeclared identifier<br>
<dd>><br>
<dd>>the code is:<br>
<dd>><br>
<dd>>file .h<br>
<dd>><br>
<dd>
>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<br>
<dd>>#include "vtkWin32RenderWindowInteractor.h"<br>
<dd>><br>
<dd>>class CvtkWin32RenderWindowInteractor : public
vtkWin32RenderWindowInteractor<br>
<dd>>{<br>
<dd>><br>
<dd>>public:<br>
<dd>> static CvtkWin32RenderWindowInteractor
*New(); <br>
<dd>><br>
<dd>> virtual void OnMouseMove (HWND
wnd, UINT nFlags, int X, int Y);<br>
<dd>> virtual void OnNCMouseMove(HWND wnd,
UINT nFlags, int X, int Y);<br>
<dd>> virtual void OnRButtonDown(HWND wnd,
UINT nFlags, int X, int Y); <br>
<dd>> virtual void OnRButtonUp (HWND
wnd, UINT nFlags, int X, int Y);<br>
<dd>> virtual void OnMButtonDown(HWND wnd,
UINT nFlags, int X, int Y);<br>
<dd>> virtual void OnMButtonUp (HWND
wnd, UINT nFlags, int X, int Y); <br>
<dd>> virtual void OnLButtonDown(HWND wnd,
UINT nFlags, int X, int Y);<br>
<dd>> virtual void OnLButtonUp (HWND
wnd, UINT nFlags, int X, int Y);<br>
<dd>> virtual void
OnSize (HWND wnd, UINT nType,
int X, int Y);<br>
<dd>> virtual void
OnTimer (HWND wnd, UINT nIDEvent);<br>
<dd>> virtual void OnKeyDown
(HWND wnd, UINT<br>
<dd>> nChar, UINT nRepCnt, UINT nFlags);<br>
<dd>> virtual void
OnKeyUp (HWND wnd, UINT <br>
<dd>> nChar, UINT nRepCnt, UINT nFlags);<br>
<dd>> virtual void
OnChar (HWND wnd, UINT<br>
<dd>> nChar, UINT nRepCnt, UINT nFlags);<br>
<dd>><br>
<dd>>protected:<br>
<dd>><br>
<dd>> CvtkWin32RenderWindowInteractor(); <br>
<dd>> virtual
~CvtkWin32RenderWindowInteractor();<br>
<dd>><br>
<dd>>};<br>
<dd>
>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<br>
<dd>>file .cpp<br>
<dd>
>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
<dd>
>CvtkWin32RenderWindowInteractor::CvtkWin32RenderWindowInteractor()
<br>
<dd>>{<br>
<dd>> static int
timerId =
1;<br>
<dd>>
this->WindowId
= 0;<br>
<dd>>
this->TimerId
= timerId++;<br>
<dd>> this->InstallMessageProc = 1;<br>
<dd>> this->MouseInWindow = 0; <br>
<dd>>}<br>
<dd>><br>
<dd>
>CvtkWin32RenderWindowInteractor::~CvtkWin32RenderWindowInteractor()<br>
<dd>>{<br>
<dd>><br>
<dd>> CvtkWin32OpenGLRenderWindow *tmp;<br>
<dd>><br>
<dd>> // we need to release any hold we have on a windows
event loop <br>
<dd>> if (this->WindowId && this->Enabled
&& this->InstallMessageProc)<br>
<dd>> {<br>
<dd>> vtkWin32OpenGLRenderWindow *ren;<br>
<dd>> ren =
static_cast<vtkWin32OpenGLRenderWindow *>(this->RenderWindow);
<br>
<dd>> tmp = (vtkWin32OpenGLRenderWindow
*)(vtkGetWindowLong(this->WindowId,4));<br>
<dd>> // watch for odd conditions<br>
<dd>> if ((tmp != ren) && (ren !=
NULL))<br>
<dd>> {<br>
<dd>> // OK someone else has a
hold on our event handler <br>
<dd>> // so lets have them handle
this stuff<br>
<dd>> // well send a USER message
to the other<br>
<dd>> // event handler so that it
can properly<br>
<dd>> // call this event handler
if required<br>
<dd>> <br>
<dd>
>CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc);<br>
<dd>> }<br>
<dd>> else<br>
<dd>> {<br>
<dd>>
vtkSetWindowLong(this->WindowId,GWL_WNDPROC,(LONG)this->OldProc);
<br>
<dd>> }<br>
<dd>> this->Enabled = 0;<br>
<dd>> }<br>
<dd>>}<br>
<dd>><br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnMouseMove<br>
<dd>>(HWND wnd, UINT nFlags, int X, int Y)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnNCMouseMove(HWND<br>
<dd>>wnd, UINT nFlags, int X, int Y)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnRButtonDown(HWND<br>
<dd>>wnd, UINT nFlags, int X, int Y) <br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnRButtonUp<br>
<dd>>(HWND wnd, UINT nFlags, int X, int Y)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnMButtonDown(HWND<br>
<dd>>wnd, UINT nFlags, int X, int Y) <br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnMButtonUp<br>
<dd>>(HWND wnd, UINT nFlags, int X, int Y)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnLButtonDown(HWND<br>
<dd>>wnd, UINT nFlags, int X, int Y) <br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnLButtonUp<br>
<dd>>(HWND wnd, UINT nFlags, int X, int Y)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnSize<br>
<dd>>(HWND wnd, UINT nType, int X, int Y) <br>
<dd>>{<br>
<dd>>}<br>
<dd>>void
CvtkWin32RenderWindowInteractor::OnTimer
(HWND wnd, UINT nIDEvent)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnKeyDown<br>
<dd>>(HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags) <br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnKeyUp<br>
<dd>>(HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags)<br>
<dd>>{<br>
<dd>>}<br>
<dd>>void<br>
<dd>>CvtkWin32RenderWindowInteractor::OnChar<br>
<dd>>(HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags) <br>
<dd>>{<br>
<dd>>}<br>
<dd>
>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
<dd>>of course with vtkWin32RenderWindowInteractor.h include<br>
<dd>><br>
<dd>>Somebody can help me?<br>
<dd>><br>
<dd>>Thanks<br>
<dd>>--<br>
<dd>>Diego Armando Parada Cuervo<br>
<dd>>Estudiante de Ingeniería de Sistemas y Computación<br>
<dd>>Universidad Pedagógica y Tecnológica de Colombia <br>
<dd>>_______________________________________________<br>
<dd>>This is the private VTK discussion list.<br>
<dd>>Please keep messages on-topic. Check the FAQ at:<br>
<dd>><a href="http://www.vtk.org/Wiki/VTK_FAQ">
http://www.vtk.org/Wiki/VTK_FAQ </a><br>
<dd>>Follow this link to subscribe/unsubscribe:<br>
<dd>><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br><br>
</dl><br><br>
<br>
-- <br>
Diego Armando Parada Cuervo<br>
Estudiante de Ingeniería de Sistemas y Computación<br>
Universidad Pedagógica y Tecnológica de Colombia </blockquote></body>
</html>