The OffsetRect function moves the specified rectangle to the specified position.
BOOL OffsetRect(
LPRECT Lprc,// Rectangle
Int Dx,// Horizontal offset
Int Dy// Vertical offset
);
Parameters:
Lprc: [input/output] points to a RECT structure, which contains the logical coordinates of the moved rectangle
Dx: [input] The number of left and right movements of the specified rectangle. When moving to the left, this parameter must be a negative value.
Dy: [Output] The amount of up and down movement of the specified rectangle. This parameter should be a negative value when moving on.
Return Value:
If the function is successful, non-0 is returned; otherwise, 0 is returned.
Note:
Because the purpose of rectangle is different, the rectangle function does not have a clear measurement unit. Generally, the coordinates and sizes of all rectangles are expressed by logical values. The ing mode and the rectangle function determine the final measurement unit.