many changes, strings to TCHARs. now settings is broken
Finally got string->TCHAR->string working for Settings.