NativeWindow AssignHandle/ReleaseHandle should use Set/RemoveWindowSubclass #2380
Labels
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
NativeWindow AssignHandle/ReleaseHandle
useSetWindowLongPtr
to subclass windows. This is particularly problematic if multiple independent components subclass the same window, as described here:https://blogs.msdn.microsoft.com/anandgeorge/2010/04/10/usage-of-nativewindow-assignhandlereleasehandle-when-unmanaged-code-is-involved/
Our Office add-in coexists with other .NET add-ins and frequently runs into this problem. To solve it,
NativeWindow
should use theCOMCTL32
SetWindowSubclass
/RemoveWindowSubclass
API.The text was updated successfully, but these errors were encountered: