retain items in the list control
-
how do i retain items in the list control so that even when i close the application, the items would still be availiable in the list control.
Save it to a file. At the time of retrieval just read from the file Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Save it to a file. At the time of retrieval just read from the file Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Read the items from the list control. When you are closing your application/relevant dialog write the contents of the list to a file. Use CFile, CStdioFile, fread() / fwrite() to put/get the data to/from the file and put it in the corresponding rows/columns of the list control when you are calling the list control dialog to display again Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
jokefake wrote:
i am very new in programming
So have you not studied up on file I/O? That's very basic stuff, that should be mastered before advancing on to more difficult topics.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
if you have for example a listbox (1) Create a file with CFile or CStdioFile (2)read items in the loop from listbox m_litsbox.GetText(i,str); (4)write to file (3) close file And read MSDN and a good book_**
**_
whitesky