Derive Custom UI Control from IControl Class

I’ve just migrated from using the Steinberg SDK to iplug2. After weeks (if not months) of banging my head against a wall, I can’t believe how quickly I could get up and running with the iplug2 framework, quite incredible. So I just wanted to thank Oli and everyone else involved.

Where was I? - Oh yes. What is the best way to derive my own new control from IControl? Is there anything I should be aware of etc?

Thanks all,
James

Welcome…

The mose simple example would be something like this…

#include "IControl.h"

class ExampleControl : public IControl
{
public:
  ExampleControl(const IRECT& rect)
  : IControl(rect) {}
  
  void Draw(IGraphics& g) override
  {
    g.FillRect(COLOR_RED, GetRECT());
  }
};

You can have a look at the included controls to see how you can make more complex stuff.

Try the controls in the IPlugControls example

1 Like

Doh… Thanks Oli, that’s much cleaner than what I used.

Thank you!