![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,188
Rep Power: 5
![]() |
Look up 'serialization' in your online help (or MSDN). That should get you started. Also, if you mean actual variable/value pairs from an initialization file, rather than just writing to/reading from a config file of your own design, there are API functions for that, too. Be aware, however, that sometimes they will operate on system registry values rather than values in an .INI file; it depends on several factors.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#12 |
|
Programming Guru
![]() |
It doesn't seem like English is your native language, and i would help you but i don't understand what you are saying.
__________________
|
|
|
|
|
|
#13 |
|
Newbie
Join Date: Oct 2005
Posts: 14
Rep Power: 0
![]() |
Hi All Friends Verry Sorry I am not good Speaking english. Because I am verry good spwaking Turkish
I am How write/read in ini files value for TreeView and ListView Component. |
|
|
|
|
|
#14 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Beware, Thanksgiving approaches
.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#15 |
|
Programming Guru
![]() ![]() ![]() |
welcome
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#16 | |
|
Expert Programmer
Join Date: Jun 2005
Posts: 885
Rep Power: 4
![]() |
Quote:
ListVal1=a ListVal2=b ListVal3=c in your ini file. Something like this code would do it (treat it as pseudo-code as I don't know all the Borland calls) TIniFile *StartUp = new TIniFile("c:\\test.ini" );
for (i = 0 ; i < myListView.Items.size(); i++)
{
char keyName[20];
sprintf(keyname, "ListVal%d", i);
StartUp->WriteInteger("Ornek", keyName, myListView.Items[i].ToString);
}
delete StartUp;ListVal1Name=a ListVal1Address=address a ListVal2Name=b ListVal2Address=address b TreeView components are a bit trickier. One way you could do it is to save the value of each node as in the listview, but also save the depth of each node as well. When you then read the ini file back in, use the depth to determine whether the new node needs to be inserted as a child of the current node, as a sibling of the current node, or as a child of a previous node - probably a recursive reader would be best for this. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|