OK I tested this, and I see no evidence that IsWindowUnicode takes into account the dlgproc under Windows. So I'm afraid the patch is wrong.
Hmmm. Perhaps then IsWindowUnicode doesn't work in Windows by checking the window proc at all? MSDN doesn't mention such a thing.
Possibly the character set of the window is stored as an extra field in the WND struct, and set manually by the window/dialog creation functions. Would that be an acceptable way to implement this?