Help!! "Device Context"
-
Can any explain me diff ways of obtaining DCs. In my problem, I have to draw some geometric figure from a function(methode) where i dont have DC. Thanks in advance!! :cool:
-
Can any explain me diff ways of obtaining DCs. In my problem, I have to draw some geometric figure from a function(methode) where i dont have DC. Thanks in advance!! :cool:
-
no, i m not getting DC using GetDC...
-
no, i m not getting DC using GetDC...
-
no, i m not getting DC using GetDC...
-
no, i m not getting DC using GetDC...
Hi, Always draw on OnDraw(), and / or OnPaint() (MFC). From Outside these function call RedrawWindow() to update.
-
Can any explain me diff ways of obtaining DCs. In my problem, I have to draw some geometric figure from a function(methode) where i dont have DC. Thanks in advance!! :cool:
It depends on what you need a DC for (what you want to draw on). A DC is a "device context". It represents the drawing attributes of a device. If you need a DC to draw in the client area of a window you can use GetDC(); If you want to be able to draw on an entire window (not just the client are) there's GetWindowDC(). To draw anywhere on the screen, either of the above can be used to obtain a screen DC. For non-screen-related devices there's CreateDC() For drawing to memory there's CreateCompatibleDC(); Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder