How to freeze part of a window?

I’m trying to improve on my use of WM_SETREDRAW declares on Windows to freeze a window while controls get moved around, etc.

The big problem with using window freezing declares (as described in is that the window becomes transparent to clicks until it’s un-frozen. So, a user that double-clicks when they should single-click might find themselves clicking through to whatever is behind your app.

Is it possible to freeze just part of a window so that it doesn’t become transparent to clicks?

This just reminded me to reply to your email.

If anyone finds this through search, basically put your controls in your container of choice (canvas, panel, etc.), then freeze the container instead of the window, the clicks will then only go “through” the container and not your apps window so you wont lose focus and click through to apps behind. Bear in mind that your clicks will hit controls that are behind the container if you haven’t set their visibility to false and just use the container to hide them.

WM_SETREDRAW should only be used with contros, not the entire window. If you really need to lock the window, maybe try with the LockWindowUpdate function