To generate just a WM_NCPAINT!

Use SetWindowPos with SWP_DRAWFRAME.

This won’t generate a WM_PAINT message but instead just a border repaint request, allowing you to just exactly refresh your control’s border only.

Appreciate your comments...