Use CAppSettings instead of GetProfile/WriteProfile family functions