Why is it that RhinoApp().SetActiveView(view) is so much slower than the simple alternative: view->SetActiveWindow()?

Can anyone hazard a guess as to why getting the blue highlight that indicates an active view (Top view shown below) to appear on a specified view is 30X slower in C++ using:

RhinoApp().SetActiveView(view);

vs

view->SetActiveWindow();

I can find CRhinoApp in the C++ SDK documentation but not RhinoApp so I am not sure what all RhinoApp targets which could go towards explaining its slowness. However I cannot get:

CRhinoApp.SetActiveView(view);

to compile without an error so I could not try it. Anyone know how to fix this so I could check its performance?

Regards,
Terry.

Hi @Terry_Chappell,

To set Rhino’s active view, you should use CRhinoApp::SetActiveView.

CRhinoView::SetActiveWindow simply calls the MFC framework’s CView::SetActiveWindow, which is not what you want.

– Dale

@dale,

I noticed that when I maximized the Top view that its title became blue even without using SetActiveWindow. Does this mean it is now the ActiveView?

Regards,
Terry.

The color of the viewport title is reflected by it being “active” or not

OK then. I am all set after maximizing the Top view. It has become the ActiveView (as indicated by its blue color title) and I do not need to do anything more to make it such.

Regards,
Terry.