Essentially, I need to have a child HWND be able to draw itself even
outside the boundaries of its parent. Does anyone know if this is
possible?
It MUST BE a child window (no titlebar, not movable, and not shown in
the taskbar)...
________
| |
| CHILD |_______________
|_______| |
| |
| PARENT |
| |
|__________________|
It is not possible. That is one of the chief defining properties of a child
window. From MSDN:
"A child window has the WS_CHILD style and is confined to the client area of
its parent window."
However, you can create a region of essentially arbitrary complexity (which
may have holes in it or consist of separate parts) and then call
SetWindowRgn to make your parent window have that shape.
Thus you can create a region that is the same size as the child window,
position it where you want (using OffsetRgn), combine it with your circle
region (using CombineRgn), and then call SetWindowRgn. You then draw the
child window in its allocated space.
--
Quixote
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)
What's wrong with a popup window? You can't move a child window out of
parent window's client area. Period. (You can apply Quixote's suggestion,
but it looks complicated and basically it's just a workaround). You can
regulate behaviour of a popup by removing WS_CAPTION style; it is not
shown in the taskbar. You can even handle WM_WINDOWPOSCHANGING and/or
WM_GETMINMAXINFO to confine it to a certain rectangle on the screen.
--
Jugoslav
___________
www.geocities.com/jdujic
[ ... ]
> It MUST BE a child window (no titlebar, not movable, and not shown in
> the taskbar)...
No titlebar, not movable and not shown in the task bar does NOT imply
that it must be a child window. A child cannot appear outside the
client area of its parent, but a popup can, and a popup does not
necessarily have to have a title bar -- as long as it doesn't, it won't
show up in the task bar and won't be movable.
--
Later,
Jerry.
The universe is a figment of its own imagination.