I have a WPF window that hosts Win32 window, I have class inherited from HwndHost.
Everything seems to work fine except when I move the mouse over the bottom right corner of the WPF window, the window freezes.
I used Spy++ to see what is going on. It turns out that the WPF Window receives few WM_WINDOWPOSCHANGING messages every 2-3 seconds and the Win32 Window keeps receiving a lot of WM_NCHITTEST all the time.
How can I resolve this problem? Thank you.
I found the solution by setting the size of Win32 window to be 1 pixel (both width and height) smaller than the WPF Host Window, the issue is gone.
I think it's because both Win32 and WPF windows were sharing the same non-client area and the messages got looping.