Archive for February, 2007
Pen Object in Device Context
We saw a lot of functions that draw geometrical shapes. But the problem is that you can’t change the color or width or the style of the pen. The exception to my previous statement is the SetDCPenColor function that can change the pen color associated with the device context, and which we already discussed it in one of previous post WinAPI : GetPixel Function. However, the function is supported only on Windows 200 and later so you cannot use the function if your intent is to develop supporting previous versions too. Is there any way out?
Read the rest of this entry »
WinAPI : InvertRect Function
The InvertRect function can be utilized to invert the colors within a given rectangular area of the device context, similar to bitmap operation that you will find with most of the photo editing tools.
Read the rest of this entry »
WinAPI : RoundRect Function
The Windows API contains Reound Rect function using which we can draw rounded rectangle.
Read the rest of this entry »
Ellipse and Rectangle Functions
While the Ellipse can be drawn by passing the last four parameters of the Arc function as zeroes, a function Ellipse do exists with the Windows API and which can be utilized for drawing the ellipse.
Read the rest of this entry »


