Getting the Tag Property to work for me
-
I'm sorry for this re-post. I invested much time in my design and need to get it working. I've got a Wizard Form where i create controls in runtime. I need to attach the reference/pointer of a String/double variable to a control. This variables exists in another class. so when the Wizard finishes, i iterate through all the controls and each control updates it's own referenced varaible. In .NET i used the Control.Tag property (is of type Object - that was easy). Want to do the same in C++ but the Control->Tag is of int type. Im missing something. Help me to convert the parameter Value:
void ExcuteWizard(..., AnsiString &Value) { TTextbox ctrl = new ....; ctrl->Tag = Value; //<< how do i convert the Value parameter? } void FinnishWizard() { for each control{ ((&AnsiString)Control->Tag) = Control->Text; //< Have someone a theory or explanation with regards to pointer and reference conversions? From a Pointer to a Int back to the Pointer. Hope you guys understand what i'm trying to do. Thanks.