CRect::NormalizeRect

This method normalizes a CRect object so both the height and width are positive. The method does a comparison of the top and bottom values, swapping them if the bottom is greater than the top. The same action is performed on the left and right values. This method is useful when dealing with different mapping modes and inverted rectangles.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

void NormalizeRect( );