在最新版本的Duilib中,使用CWndShadow添加窗口陰影會無效,需要修改CWndShadow類中MakeShadow函數中的一下內容方能生效:
// Get the region of parent window, HRGN hParentRgn = CreateRectRgn(0, 0, rcParent->right - rcParent->left, rcParent->bottom - rcParent->top); GetWindowRgn(hParent, hParentRgn);
還發現了一種可能會導致CWndShadow的陰影無效,這個有可能是包含CWndShadow頭文件包含的問題,找准該頭文件是否包含的不正確。補充:包含的頭文件中沒有正確的包含到DuiLib的頭文件從而使CWndShaw無效;