I want to draw some shapes on the screen, but I don't want any Window to be seen. I can't draw anything without a Window now. I can draw only in a window, its like a prison!
I can write both managed and unmanaged. How can I do that?
Printable View
I want to draw some shapes on the screen, but I don't want any Window to be seen. I can't draw anything without a Window now. I can draw only in a window, its like a prison!
I can write both managed and unmanaged. How can I do that?
In managed code, when I create a region using
Drawing::Region ^rg= gcnew Drawing::Region();
I cannot atach a graphics object to it to paint it.
It seems that this region is different.
That's not the point of regions. Regions are parts where painting is allowed for an application. Anything outside of the region in that window will not be rendered. You have to create regions for those things you want to draw and only these things will draw.
>>but I don't want any Window to be seen.
You must have a window for a windows application, even if that window is 1x1 and is hidden.
Even games have windows, they are just full screen.
I use a window style that doees not have a menu, system menu, title bar or border (ect).
Something like WS_POPUP and the extended style WS_EX_CLIENTEDGE
A region still needs to be seleceted into a DC to be drawn. The region just allows only certain areas of the client area to be drawn. Usually the rest is transparent.
Use a region to make the window frame non-rectangular and then use a custom drawn window background to get the desired GUI effect you want. You can have transparent windows and there are examples of them on www.codeguru.com. There are examples of seemingly invisible dialogs with buttons hanging out in open space. MSDN also has examples of this technique.
I frankly do not see the point for it as they are extremely hard to distinguish from all the background 'clutter' that normally is on a Windows desktop.
In my case my program has a start up show.Quote:
I frankly do not see the point for it as they are extremely hard to distinguish from all the background 'clutter' that normally is on a Windows desktop.
Did you not ever see programs with funky shape ? Well you've got your answer.