Is it possible to create a \"transparent\" hwnd window ? What I mean by that is that there is no background or borders of that window but that only text is visible...like if
From your tag of hwnd
, I'm assuming that you are working with C++ or at least have access to the Win32 API, there are plenty of resources to help you get started. The concept is called Window Compositing
.
Transparent win32 window and text
Quick and Dirty Window Transparency
If you use WPF instead of C++, here's a link: Transparent Windows in WPF
On Windows 2000 and later, you can create a top-level window with the WS_EX_LAYERED
style (on Windows 8 and later, child windows can now use the WS_EX_LAYERED
style as well), and then use SetLayeredWindowAttributes()
or UpdateLayeredWindow()
to make the window transparent.
Create a solid background color, and then set that color as the window's transparent color. Anything on the window that is not using that color will not be transparent. The OS will handle the rest for you.
Refer to MSDN for more details: