Changed to use gc to draw text instead of dc.