From: "Alexandre Julliard" julliard@winehq.org
It seems dangerous to set DS for the whole window procedure, it will be calling a lot of other functions that may end up depending on DS. It's especially dangerous here since the window instance won't be a valid DS for 32-bit windows. I think you really want to set it only around the Local* calls and restore it as soon as possible.
True, but it is so clean and simple :) Also, I thought DS would only be relevant for 16-bit code, and moreover this will be (in the near future) the only remnant of local handles we will have.
But yeah, we do have notifications to worry about, I guess we have to push the set/restore closer to where it's needed.