Window mapping in V3d_View

Developing under Windows, I create a V3d_View, and attach it to a window in a control on a FormView using the following code (where cadwind is my window within the control, and myView is a V3d_View):

Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,cadwind->GetSafeHwnd());
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
myView->SetWindow(aWNTWindow);

The cadwind is in a control which is on the right hand side of the FormView.

I then go ahead and draw some stuff in myView. When I try to select the resulting image, however, I need to click at a location displaced in the view by a screen distance equal to the distance from the right edge of the FormView to the right edge of cadwind to successfully select the object.

I've tried to understand the various window mapping functions of V3d_View and its parent, but to no avail. What the devil is going on?

Thanks for the help,

A.T.

Aaron Turner's picture

Guess I'm being dislexic today. That should have read:

When I try to select the resulting image, however, I need to click at a location displaced in the view by a screen distance equal to the distance from the LEFT edge of the FormView to the LEFT edge of cadwind to successfully select the object.