Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]window transparent #427

Open
wltyzh opened this issue Oct 25, 2024 · 1 comment
Open

[Feature Request]window transparent #427

wltyzh opened this issue Oct 25, 2024 · 1 comment

Comments

@wltyzh
Copy link

wltyzh commented Oct 25, 2024

I want to make the window partially transparent, that is, make the window transparent in the area where there is no drawing, but I have failed after many attempts, including using SetLayeredWindowAttributes and UpdateLayeredWindow.

SetLayeredWindowAttributes can only make the specified color transparent, such as black, but this will affect my other normally drawn black parts;

UpdateLayeredWindow should be more suitable, but I did not get any effect when I used it in the on_paint of the view;

Maybe UpdateLayeredWindow has some usage restrictions, such as it cannot be applied to child windows, and the WM_PAINT event cannot be responded to; I don’t know if I should use UpdateLayeredWindow in the parent window, but if it is used in the parent window, the content drawn by the view needs to be passed to the parent window, which may cause a lot of code modifications;

Is there any good way to achieve this effect?

@djowel
Copy link
Member

djowel commented Oct 25, 2024

Interesting. Such a feature would be cool, indeed. Alas, I have not investigated a way to do this, cross-platform. Some research is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants