Using the Windows API
You can get the device context for the LEAD control's client area or for the bitmap in memory. Thus, you can use Windows API functions that require a device context. For example, you can use GDI drawing functions to add lines, shapes, or text to the bitmap.
Use the following methods to create and release a device context for the bitmap in memory:
Use the following methods to create and release a device context for the LEAD control's client area: