INFO: Transparent Windows
This article was previously published under Q92526
This article has been archived. It is offered "as is" and will no longer be updated.
Microsoft Windows version does not support fully functional transparentwindows.
If a window is created using CreateWindowEx() with the WS_EX_TRANSPARENTstyle, windows below it at the position where the original window wasinitially placed are not obscured and show through. Moving theWS_EX_TRANSPARENT window, however, results in the old window backgroundmoving to the new position, because Windows does not support fullyfunctional transparent windows.
WS_EX_TRANSPARENT was designed to be used in very modal situations and thelifetime of a window with this style must be very short. A good use of thisstyle is for drawing tracking points on the top of another window. Forexample, a dialog editor would use it to draw tracking points around thecontrol that is being selected or moved.
In Windows 2000, specific colors in a window can be made truly transparentby giving the window the WS_EX_LAYERED extended style and callingSetLayeredWindowAttributes.
Article ID: 92526 - Last Review: 12/04/2015 09:19:49 - Revision: 1.2
Microsoft Platform Software Development Kit-January 2000 Edition, Microsoft Windows Software Development Kit 3.1
- kbnosurvey kbarchive kbinfo kbwndwprop kbwndw KB92526