RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Controls.MoveWindowOrg Function

Changes the location of the point (0,0) within a device context.

Pascal
procedure MoveWindowOrg(DC: HDC; DX: Integer; DY: Integer);
C++
MoveWindowOrg(HDC DC, int DX, int DY);

Controls

Call MoveWindowOrg to change the location of where items are drawn on the canvas of an object. When drawing to a canvas, objects specify the location of the image they draw as a set of coordinates, which are offsets from the upper left corner. MoveWindowOrg allows the same drawing code to draw its image in a different location. The DC parameter is a handle to the device context of the canvas, printer, or window where the image is to be drawn. The DX and DY parameters specify the number of pixels to move the location of the (0,0) point on that drawing surface.  

MoveWindowOrg is especially useful when playing metafiles, which draw to a particular position on a canvas, because it provides the ability to play the metafile to a different location on the canvas. 

 

TCanvas 

TPrinter 

TWinControl

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!