Please help! Can't link Tk Canvas to V3d_View.

Hello.

I'm trying to integrate Tcl/Tk with OpenCascade on a Windows 2000 system.

I can't link the tk canvas to the V3d_View. I could do it when integrating with the FOX Gui but not in Tk.

Can someone help me. I'm using this code:

//assumnig MyGraphicDevice and MyView are

//already created

//Handle(Graphic3d_WNTGraphicDevice) and

//Handle(V3d_View)

//and the canvas path in Tk is .mycanvas

Tk_Window mainwin, win; HWND winid;

mainwin = Tk_MainWindow(interp);

win = Tk_NameToWindow(interp, ".mycanvas",(Tk_Window) mainwin);

winid = (HWND) Tk_WindowId(win);

Handle(WNT_Window) aWNTWindow = new WNT_Window(MyGraphicDevice,winid);

MyView->SetWindow(aWNTWindow); //here I get an exception

if (!aWNTWindow->IsMapped()) aWNTWindow->Map();

What's wrong? Should I be using other classes to manage X11 windows?

Can someone point me the right direction.

Thanks a lot.

r-fortes's picture

Hello again.

Do I need a Open GL canvas widget to link to cascade? I found two already but I'm still trying to make them work. Does anyone knows one for Tk 8.2 ?

Thanks again