[vtkusers] Invalid index for GetWindowLongPtr in vtkWin32RenderWindowInteractor ? (x64)

Thomas Lambertz thomas at hexerei-software.de
Sat May 13 09:07:57 EDT 2006


Hello,

i tried to find a way to make vtkRenderWindowInteractor work under 
Windows x64. To be honest - i am not very familiar with the Windows API 
- so if i am talking rubbish please be patient...

I tried to isolate why there is no render-output when i used 
vtkWindowRenderInteractor under x64. A good example are the tutorials in 
vtk/Example/Tutorial. Step 1-4 are working properly as the render 
"manually" - step 5-6 have changed to vtkWindowRenderInteractor and 
doesnt work.
Adding some debug-output i saw that the Render() method wasnt invoked - 
so no surprise that there is only a black Windows ;-)

Searching in vtkWin32RenderWindowInteractor and 
vtkWin32OpenGLRenderWindow i found Code like this:
vtkGetWindowLong(hWnd,4);
The returned Pointer/Handle is NULL and GetLastError() gives an Error 
1413 which means invalid index. As i understand "4" ist the wrong 
parameter. Excerpt from Winuser.h:
/*
 * Window field offsets for GetWindowLong()
 */
#define GWLP_WNDPROC        (-4)
#define GWLP_HINSTANCE      (-6)
#define GWLP_HWNDPARENT     (-8)
#define GWLP_USERDATA       (-21)
#define GWLP_ID             (-12)

I assumed GWLP_WNDPROC was intended and i changed the Code in that way. 
But that is not the solution - now i get this errormessage:

ERROR: In ..\..\vtk5.0_64\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 809
vtkWin32OpenGLRenderWindow (0000000000366F40): Could not create window, 
error:  0

And consistently there is no output-window...


Sorry for making a such great hullabaloo. I hope that someone else can 
grab this information to become more succesful to solve this problem.

kind regards,
Tom

PS: Under win32 the correspondent GWL_WINPROC is also defined as (-4) - 
but this does not seemes to make Problems (i havent investigate this 
further)





More information about the vtkusers mailing list