Hi,<br>
<br>
I have been treating to derivate a clas from vtkWindowRenderInteractor but the compilation showws this:<br>
<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30) : error C2065: 'CvtkWin32OpenGLRenderWindow' : undeclared identifier<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30) : error C2065: 'tmp' : undeclared identifier<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(30) : warning
C4552: '*' : operator has no effect; expected operator with side-effect<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35) : error C2065: 'vtkWin32OpenGLRenderWindow' : undeclared identifier<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35) : error C2065: 'ren' : undeclared identifier<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(35) : warning
C4552: '*' : operator has no effect; expected operator with side-effect<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(36) : error C2061: syntax error : identifier 'vtkWin32OpenGLRenderWindow'<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(37) : error C2059: syntax error : ')'<br>
C:\test\ISVtest\MyvtkWin32RenderWindowInteractor.cpp(50) : error C2065: 'vtkSetWindowLong' : undeclared identifier<br>
<br>
the code is:<br>
<br>
file .h<br>
<br>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
#include "vtkWin32RenderWindowInteractor.h"<br>
<br>
class CvtkWin32RenderWindowInteractor : public vtkWin32RenderWindowInteractor<br>
{<br>
<br>
public:<br>
static CvtkWin32RenderWindowInteractor *New();<br>
<br>
virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);<br>
virtual void OnSize (HWND wnd, UINT nType, int X, int Y);<br>
virtual void OnTimer (HWND wnd, UINT nIDEvent);<br>
virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);<br>
virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);<br>
virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);<br>
<br>
protected:<br>
<br>
CvtkWin32RenderWindowInteractor();<br>
virtual ~CvtkWin32RenderWindowInteractor();<br>
<br>
};<br>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br clear="all">file .cpp<br>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
CvtkWin32RenderWindowInteractor::CvtkWin32RenderWindowInteractor()<br>
{<br>
static int timerId = 1;<br>
this->WindowId = 0;<br>
this->TimerId = timerId++;<br>
this->InstallMessageProc = 1;<br>
this->MouseInWindow = 0;<br>
}<br>
<br>
CvtkWin32RenderWindowInteractor::~CvtkWin32RenderWindowInteractor()<br>
{<br>
<br>
CvtkWin32OpenGLRenderWindow *tmp;<br>
<br>
// we need to release any hold we have on a windows event loop<br>
if (this->WindowId && this->Enabled && this->InstallMessageProc) <br>
{<br>
vtkWin32OpenGLRenderWindow *ren;<br>
ren = static_cast<vtkWin32OpenGLRenderWindow *>(this->RenderWindow);<br>
tmp = (vtkWin32OpenGLRenderWindow *)(vtkGetWindowLong(this->WindowId,4));<br>
// watch for odd conditions<br>
if ((tmp != ren) && (ren != NULL)) <br>
{<br>
// OK someone else has a hold on our event handler<br>
// so lets have them handle this stuff<br>
// well send a USER message to the other<br>
// event handler so that it can properly<br>
// call this event handler if required<br>
CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc);<br>
}<br>
else <br>
{<br>
vtkSetWindowLong(this->WindowId,GWL_WNDPROC,(LONG)this->OldProc);<br>
}<br>
this->Enabled = 0;<br>
}<br>
}<br>
<br>
void CvtkWin32RenderWindowInteractor::OnMouseMove (HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnSize (HWND wnd, UINT nType, int X, int Y)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnTimer (HWND wnd, UINT nIDEvent)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags)<br>
{<br>
}<br>
void CvtkWin32RenderWindowInteractor::OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags)<br>
{<br>
}<br>
void
CvtkWin32RenderWindowInteractor::OnChar
(HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags)<br>
{<br>
}<br>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
of course with vtkWin32RenderWindowInteractor.h include<br>
<br>
Somebody can help me? <br>
<br>
Thanks<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