I have had a look and there is an error in your code.
In your WM_THEMECHANGED handler you do this :
if (hThemeDisplay) _CloseThemeData(hThemeDisplay);
_OpenThemeData(hWnd, L"Button");
But that frees the theme handle but never reassigns the value from the new OpenThemeData call to hThemeDisplay.
WindowBlinds will not render if a theme handle has been freed.
The WM_THEMECHANGED handler is also missing a break.