MGL_wmSetWindowPosition
Moves the window to new position and/or changes its size.
Declaration
void MGLAPI MGL_wmSetWindowPosition(
window_t *wnd,
int x,
int y,
size_t width,
size_t height)
Prototype In
mgraph.h
Parameters
wnd |
the window |
x |
new X coordinate of window position |
y |
new Y coordinate of window position |
width |
new window width |
height |
new window height |
Description
Changes window's position and size to new values and repaints the DC as neccessary. Depending on window's flags and status, different actions are triggered by the call to MGL_wmSetWindowPosition:
1. If the new size and position are same as old ones, nothing happens. 2. If wnd is top level window (i.e. its parent is wnd->wm->rootWnd) and size is unmodified and only position changes, optimized routine is used and the window is copied to its new position with MGL_bitBlt. 3. If the window has MGL_WM_FULL_REPAINT_ON_RESIZE flag or its position (i.e. not only size) changed, it is completely invalidated and queued for repaint. 4. Otherwise (i.e. the window doesn't have MGL_WM_FULL_REPAINT_ON_RESIZE and it only changed its size), only the different between old and new window area is repainted.
Note: The change in position won't be visible until the next call to MGL_wmUpdateDC. As an exception, if optimized bitblt move was used, the change is visible immediately.
See Also
MGL_wmSetWindowFlags, MGL_wmUpdateDC, MBL_bitBlt
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com