Jalaj P. Jha Technical & Miscellaneous Ramblings

28Feb/070




Creating Solid and Hatch Brushes

The default brush associated with a device context is a hollow brush thus the Rectangle, Ellipse and similar function all tends to draw outlines only and doesn't fill the shape. The current brush setting can be received in a LOGBRUSH structure (discussed in WinAPI: Using Brushes) using the GetCurrentObject and GetObject functions, already discussed in Modifying Existing Pen in DC

27Feb/070




WinAPI: Using Brushes

After Pen Objects we will discuss here Brushes that's another type of object which is associated with a Device Context. While Pens are used by Windows to draw lines, Brushes are objects that are used to fill the area enclosed within bound regions as ellipse, rectangle, polygons or paths.

26Feb/070




Modifying Existing Pen in DC

Want to modify the color or width or the style of the Pen that's currently associated with the device context? You can't do it directly as there's no such function provided by the GDI. However, it's said, where there's a will there's a way.

25Feb/071




WinAPI : The CreatePen Function

Getting ahead from where we ended in previous post Pen Object in Device Context, let's see how to create a pen and associate it with the device context.