C++ how to turn on event when rhino is open

Hi;
In this sample


we cant thurn on the event after we run the command, I want to turn on the event when rhino is open, how cant I do that?

HI @pythonuser,

A plug-in can hook up event handlers when it loads, in the plug-in’s Rhino.PlugIns.PlugIn.OnLoad override.

– Dale