Click to See Complete Forum and Search --> : Where should one read the INI-file


Birger Thureson
March 31st, 1999, 03:28 PM
where is the best place to read and hold data from the INI-file. should it be read in the InitInstance() function???


I use the retrieved values in many classes so i only want to read the INI-file once.


Where shall I put the variables holding the values from the INI-file???

(In the CWinApp-derived application class or where)???


Please help me!

sally
March 31st, 1999, 07:59 PM
1) if you only want to read them once, the place is InitInstance

2) Create a static class, holding only static members and static functions

3) In InitInstance read from INI file and poke the values into the static class

4) Access the values from this static class whereevere you need them

5) Lycka till


Sally

Sally
March 31st, 1999, 07:59 PM
1) if you only want to read them once, the place is InitInstance

2) Create a static class, holding only static members and static functions

3) In InitInstance read from INI file and poke the values into the static class

4) Access the values from this static class whereevere you need them

5) Lycka till


Sally