Hey so for a GUI I'm designing I came up with an idea of having the main window then sort of a container panel which would hold all of the other widgets. I'm using a static window for the panels and I'm not at all happy with how it's turning out. It has a gray background color even when when I set the window style to WS_EX_TRANSPARENT and I set the background color to Transparent in WM_PAINT using SetBkMode(hdc, TRANSPARENT). Basically what I want to be able to do is have a solid window as the frame, transparent window as the panels, and solid windows as the widgets.
Here's a basic picture of what I am trying to accomplish:
I've searched around and I can't seem to find anything on how to properly do this. Reason that I want to do this is because I feel as though this is a lot more structured/better organized and will be able to be easily expandable upon. Each window component has its own class and within their class they contain a vector of the other components they contain. So my Frame class has a vector of all the panels contains and the panel class has a vector of all the widgets it contains.
Perhaps if you handle that message and return a null brush it will make the static control transparent...
return (LONG_PTR)GetStockObject(NULL_BRUSH);
My other idea was to make the panel a popup layered window, but apparently layered child windows are only supported in Windows 8.
Come to think of it, using a window for the panel seems kind of superfluous. It is already a control container. So in place of a window you could get by with a RECT to define the area in which the contained controls are aligned.
Come to think of it, using a window for the panel seems kind of superfluous. It is already a control container. So in place of a window you could get by with a RECT to define the area in which the contained controls are aligned.
That's actually a great idea. Not sure how that slipped past me. Nonetheless, thank you both for the help!