Draw window with just borders
How can I create a application window that is showing just the borders of the window, but i don't want to show the contents of the window itself. I mean i want to see the rest of the desktop or the others windows through the entire region of my window. No using transparences. Just draw the borders.
I suppose it's like detecting the messages WM_ERASEBKGND and WM_PAINT and doing nothing in these cases to force not painting in the contens, but I have tried and window is still drawing a white backgrou开发者_如何学编程nd.
How can i get it?
As per my understanding,
If u r working in win32 application or wince application.
During the registering of class i.e Register of window class.
If object of WNDCLASS is wc . Assign the value for wc.hbrbackground as follows:
wc.hbrBackground = (HBRUSH) GetStockObject(NULL_BRUSH);
This will work i.e. u can see the background window things. But after that it will not clear the background window image from ur current window. For that u need to do something different. I hope once u apply this and u will come to know what i mean to say exactly.
Is creating and applying a region (CreateRectRgn
, SetWindowRgn
) an option for you? You could just cut out the client area. See here for details
精彩评论