Is there a method on a DgnButtonEvent to accomplish the same thing?
UpdatePosition(DgnButtonEventCR ev) { DPoint3d screenPt3D = { 0 }; ev.GetViewport()->ViewToScreen(&screenPt3D, ev.GetViewPoint(), 1); // Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Screen. Point2d globalPt = { (int)screenPt3D.x, (int)screenPt3D.y }; Point2d screenPt2d = { 0 }; // Can I do this somehow directly without calling mdlWindow_globalPointToScreen() ? mdlWindow_globalPointToScreen(&screenPt2d, mdlWindow_viewWindowGet(ev.GetViewNum()), &globalPt); // Converts a point in global coordinates to a point in screen coordinates for the screen number specified by windowP. }
Bruce