Fix crasher in 2D viewer by ignoring too small resizes

(also add a SelectObject for cleanliness even though the dc
is going to get destroyed at the end of the function)