Dear all experienced asm coders,
How can i create a window with a TRANSPARENT client area? It means the window contain borders, titlebar and menubar, and you can see through the desktop in the client area.
I tried mov WNDCLASSEX.hbrBackground, TRANSPARENT , but it fails
Thanks
How can i create a window with a TRANSPARENT client area? It means the window contain borders, titlebar and menubar, and you can see through the desktop in the client area.
I tried mov WNDCLASSEX.hbrBackground, TRANSPARENT , but it fails
Thanks
try NULL, but it has problems on redrawing...
as far i know the only way to create (real) transparent
windows is to use regions... as you only want to see
through some parts of your window (client area,
whatever) the best solution would be to create a snapshot
of your window, save it as bmp and create a region over it
with rgnCreator (for example)... you can then take the
region data and throw it over your window... you'll need
no bitmaps or other garbage then... 2nd solution would
be a custom skinned window... (look in the algo section,
i posted an example a while ago)... this technique is very
easy but you'll end up including bitmaps in your resources.
maybe you can do something with the windows-paint msg's
too but that would be harder to implement i think...
windows is to use regions... as you only want to see
through some parts of your window (client area,
whatever) the best solution would be to create a snapshot
of your window, save it as bmp and create a region over it
with rgnCreator (for example)... you can then take the
region data and throw it over your window... you'll need
no bitmaps or other garbage then... 2nd solution would
be a custom skinned window... (look in the algo section,
i posted an example a while ago)... this technique is very
easy but you'll end up including bitmaps in your resources.
maybe you can do something with the windows-paint msg's
too but that would be harder to implement i think...
I've never tried, but im confident this will work:
(a) WS_EX_TRANSPARENT
Combined with (b): CS_PARENTDC
Hope its helps
:alright:
NaN
(a) WS_EX_TRANSPARENT
Specifies that a window created with this style should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted
Combined with (b): CS_PARENTDC
Sets the clipping rectangle of the child window to that of the parent window so that the child can draw on the parent. A window with the CS_PARENTDC style bit receives a regular device context from the system's cache of device contexts. It does not give the child the parent's device context or device context settings. Specifying CS_PARENTDC enhances an application's performance
Hope its helps
:alright:
NaN
Thanks for all your help.
By the way,
Does Windows 9x support WS_EX_TRANSPARENT ?
By the way,
Does Windows 9x support WS_EX_TRANSPARENT ?
You have to check the MSDN to be sure: Here
But i would suspect it is, since it supports CreateWindowEx anyways.
:alright:
NaN
But i would suspect it is, since it supports CreateWindowEx anyways.
:alright:
NaN