Hamtramck and Highland Park were not "carved out of" Detroit. They were once the far-flung suburbs, but the city grew and eventually surrounded them both.
Hamtramck began as a farm community of German settlers in 1798. Col. Jean Francois Hamtramck (later Gen.) was a French Canadian who commanded Fort Shelby for the Continental Army during the Revolutionary War. The township was named for him in 1827. Polish families moved there early in the century to work at the factories (St. Florian's church was built 1907-09), especially when the Dodge plant opened in 1914.
http://en.wikipedia.org/wiki/Hamtramck,_Michigan
http://hamtramck.us/about/pages/index.php
http://en.wikipedia.org/wiki/Jean_Fran%C3%A7ois_Hamtramck