From: daicamad on
I want to draw the background of my Wnd with the background (glass
look) like the background of non-client area in Window Vista.

However when I tried DrawThemeBackground with "WINDOW", "WP_CAPTION",
"CS_ACTIVE", it does not do it. It give some blue background.

Is there other way, or other function that do this? (I am on window
Vista)

Thanks

From: daicamad on
I found the answer. The answer turn out not related to MFC, hence I
got no answer back ;^)

To do what I wanted, we must use Desktop Window Manager. Code as
follow:

HRESULT EnableBlurBehind(HWND hwnd)
{
HRESULT hr = S_OK;

// Create and populate the BlurBehind structure.
DWM_BLURBEHIND bb = {0};
// Disable Blur Behind and Blur Region.
bb.dwFlags = DWM_BB_ENABLE;
bb.fEnable = true;
bb.hRgnBlur = NULL;

// Disable Blur Behind.
hr = DwmEnableBlurBehindWindow(hwnd, &bb);
if (SUCCEEDED(hr))
{
//do more things
}
return hr;
}