you need to create a custom IControl to do this. There is one in the IPlugEEL example that does what you want.
Code:
class AlgDisplay : public IControl
{
public:
AlgDisplay(IPlugBase* pPlug, IRECT pR, IText* pText, const char* str = "127.0.0.1")
: IControl(pPlug, pR)
{
mDisablePrompt = true;
mText = *pText;
mStr.Set(str);
}
~AlgDisplay() {}
bool Draw(IGraphics* pGraphics)
{
return pGraphics->DrawIText(&mText, mStr.Get(), &mRECT);
}
void OnMouseDown(int x, int y, IMouseMod* pMod)
{
mPlug->GetGUI()->CreateTextEntry(this, &mText, &mRECT, mStr.Get());
}
void TextFromTextEntry(const char* txt)
{
mStr.Set(txt, MAX_ALG_LENGTH);
//TODO: update alg
SetDirty(false);
}
protected:
WDL_String mStr;
};