MGL_wmSetWindowPainter
Sets painter callback for the window.
Declaration
void MGLAPI MGL_wmSetWindowPainter(
window_t *wnd,
painter_t painter)
typedef void (MGLAPIP painter_t)(struct window_t *wnd,MGLDC *dc)
Prototype In
mgraph.h
Parameters
wnd |
the window |
painter |
painter callback |
Description
The painter is responsible for redrawing the window it is attached to. It can only draw to the part of device context convered by the window.
Every window must have a painter callback associated with it. MGL WM calls painters as neccessary from MGL_wmUpdateDC to ensure that the device context reflects current status of windows.
The painter callback takes two arguments: one of them is the window being painted and the other is the device context to paint on. The DC is already made current and clipping region is properly set.
Note: You can use MGL_wmSetWindowUserData to attach arbitrary data to the window and use this data in painter function.
See Also
MGL_wmSetWindowFlags, MGL_wmShowWindow, MGL_wmCreateWindow, MGL_wmUpdateDC, MGL_wmBeginPaint, MGL_wmSetWindowUserData, MGL_wmInvalidateWindow
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com