Ok I understand how it gets the number now. Thanks.
But now how do I call that number back into the Color propertie of my edit box.
I used this to save the Color number:
code:
TIniFile *StartUp = new TIniFile("IValues.ini");
StartUp->WriteString("CtlValues", "txtColor", Edit1->Color);
delete StartUp;
I tried to load it in with this but I get debug error:
code:
TIniFile *StartUp = new TIniFile("IValues.ini");
Edit1->Color = StartUp->ReadString("CtlValues", "txtColor", "");
delete StartUp;
Debug Errors:
quote:
[C++ Warning] save.cpp(30): W8018 Assigning AnsiString to TColor
[C++ Error] save.cpp(30): E2034 Cannot convert 'AnsiString' to 'TColor'
So it looks like to me that the Edit1->Color can't convert the Color number (AnsiString) to Edit1's Color propertie.
How would I get this to work?
*Sorry for all the questions. You all have been a big help. I'm new to this so don't mind me.