message::paint

This message is posted to a window when painting is required.

Parameters

parameter1
parameter2

The parameters are unused.

Return

result

If the window processes this message, it should return zero.

Notes

The default window procedure validates the update region of the window. The default window procedure generates a non-client paint message when the frame requires updating and a background erase message when the background requires repainting.

The function update_window causes this message to be generated. The function redraw_window also causes this message to be generated.

This message is also generated and placed in the thread's message queue when the operating system determines that the window requires repainting (but only when there are no other messages in the queue). The paint message is retrieved by function get_message only when there are no other messages in the queue (that is, with the lowest message priority).

Internal paint messages may be generated via the function redraw_window using flag redraw::internal_paint. Such messages may have no associated update region, in which case, the operator get_update_rectangle may be used to obtain the update rectangle. If no update rectangle exists, no painting should be attempted.