Calling SetWindowCompositionAttribute can indeed add the acrylic effect of Win10 to the window, but I have a problem that I still can't solve, that is, how to realize the rounded window while adding the acrylic effect. As shown in the picture below, even if I use win32guiSetWindowRgn(int(self.winId()),win32gui.CreateRoundRectRgn(0, 0, 500, 500, 500, 500), True) in pyqt, the acrylic panel cannot be cropped. May I ask Do you have any good ideas?


The
SetWindowCompositionAttributeAPI is not public. To apply one or more high quality effects to an image or a set of images, you can use Direct2D.Here are some helpful links for you get started:
How to load an image into Direct2D effects using the FilePicker
Directional blur effect
Custom effects
And if you still you still want to use
SetWindowCompositionAttributeAPI, I would suggest that you raise your voice on Feedback Hub.