[vtkusers] vtk 64bit windows

Dov Mayzlish dov.mayzlish at philips.com
Sun Jun 3 09:16:13 EDT 2007


Hi,

I'm a vtk beginner, trying to embed vtk image in my viewport.

My code is something like this:


        this->renWin = vtkRenderWindow::New();
        this->iren = vtkRenderWindowInteractor::New();
        this->ren = vtkRenderer::New();
...


        this->renWin->AddRenderer(this->ren);
 
        // setup the parent window
        void* hwnd = (this->Handle.ToPointer());   // (the class is a .NET 
UserControl)
        this->renWin->SetParentId(hwnd);
        this->iren->SetRenderWindow(this->renWin); 
 

        // initialize
        this->iren->Initialize();
        this->ren->ResetCamera();


When working 32bit, this works perfect.

When working 64bit, an empty black window is created, named "Form1" 
(instead of the name I gave it).

When I comment out the lines (64bit)
        //void* hwnd = (this->Handle.ToPointer());
        //this->renWin->SetParentId(hwnd);
a new window with the correct name appears with the correct actor, but the 
"Form1" window appears as well.
Since I plan to embed the viewport in a large application, I need the 
image to be in my existing viewport.

Does anyone have a suggestion what could make only the 64bit build to fail 
to embed the image in my viewport?

Thanks,
Dov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070603/a5febd18/attachment.htm>


More information about the vtkusers mailing list