Use SetWindowLongPtrW() when setting WndProc
commit75bfcddbdcc76b66c3d99f5b556038a13ce8e4cf
authorJon Turney <jon.turney@dronecode.org.uk>
Wed, 1 Feb 2023 13:10:25 +0000 (1 13:10 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Thu, 2 Feb 2023 12:56:49 +0000 (2 12:56 +0000)
tree9a26959f0630b209484449b76cb57a8eb2cc634c
parentb567162a4c65e15991f5b5c9ebc6b5f8268e7933
Use SetWindowLongPtrW() when setting WndProc

Using the SetWindowLongPtrA() variant means that a Unicode to ASCII shim
is inserted around the installed WndProc, which is not what we want.

(Specfically, this flattens the PropSheet caption to an 8-bit encoding
as it passes through the WndProc as a WM_SETTEXT message, which is not
reversible for non-latin scripts)

Future work: Rewrite this using SetWindowSubclass() instead, which
sidesteps all these issues.
proppage.cc
propsheet.cc