Until 1798 , he studied in Copenhagen before settling in Dresden . He studied in Copenhagen until 1798 , before settling in Dresden . He studied in Dresden until 1798 , before settling in Copenhagen .