begin_paint


handle begin_paint(handle window,
                   paint* paint_structure)

This function creates a device context suitable for painting a window.

Parameters

handle window

The handle of the window to be painted.

paint* paint_structure

A pointer to a paint structure that is filled in by the system.

Return

handle

The handle of the device context or null if an error occurred.

Notes

Any region outside the update region is excluded from drawing.

The update region is set by:

If the update region is targeted for erasure, the background erase message is sent to the window.

If the window's class possesses a background brush, that brush is used to paint the background of the update region prior to returning.

This function should be used only during the processing of message::paint.

The device context may be released by calling the function end_paint.