Hi,
I was looking for text entry and found AlgDisplay in IPlugEEL. Working fine but can't serialize it to remember entered text after closing and re-opening DAW.
I tried but can't find the way...
Let me know what i'm doing wrong...
Thanks.
Here is my code;
Plug.h
Code:
WDL_String Text01;
char CharText01[4096] = "Track Name";
Plug.cpp
Code:
mTextControl = new AlgDisplay(this, r, &textProps, CharText01);
pGraphics->AttachControl(mTextControl);
-
-
-
bool Plug::SerializeState(ByteChunk* pChunk)
{
TRACE;
IMutexLock lock(this);
Text01.Set(CharText01);
pChunk->PutStr(Text01.Get());
return IPlugBase::SerializeParams(pChunk);
}
int Plug::UnserializeState(ByteChunk* pChunk, int startPos)
{
TRACE;
IMutexLock lock(this);
startPos = pChunk->GetStr(&Text01, startPos);
strcpy(CharText01, Text01.Get());
return IPlugBase::UnserializeParams(pChunk, startPos);
}