Since I searched the censuses and found no more than a dozen people with the surname of "Thex", I am thinking it might be a derivative of "Thexton".
A biography/family history of Charles H. Thex is included in "Montana, Its Story and Biography", Vol 3, pages 1084 & 1085. Charles was born 30 Sep 1860, near Jefferson, Texas, son of Frank and Mary (Cutbirth) Thex.Mary was a daughter of Daniel Cutbirth who married a sister of Daniel Boone. Frank Thex, who was born in either KY or TN, went into Texas with his father, Sampson Thex, and they settled just north of Jefferson, where they were farmers and stockmen. The grandfather, Sampson Thex lived to be 117 years old and died at Linville, TX. Samuel was married to a Miss Cutbirth.Children of Frank and Mary Thex: Martha (Mrs. William Smith, Parker county, TX); Lizzie (Mrs. Hez Allen, near Fort Sill, OK); Missouri A. (Mrs. John Hale, Parker county, TX); Jefferson (near Elm Springs, OK); Charles Houston (MT); Mary (Mrs. John Caldwell, Weston, TX).
Charles Houston Thex came to Montana in 1888 and worked on a ranches on Otter Creek. Later he homesteaded and developed a prosperous ranch on Upper Otter Creek.
On 15 Feb 1897, Custer county, MT, Charles married Miss Bertha Hagen, daughter of Guy Hagen, of Glendale, Norway.Mrs. Thex came from Norway seeking better employment opportunities and met Charles Thex while working as a housekeeper for the "OU" ranch on Otter Creek.Thex children: Guy, Franklin, Mary, Calvin, Boone, Annie, Sarah, Francis, Clifford.