TRectBottomRight (C++)
Description
This example illustrates how to use the BottomRight method to return the lower-right point of the rectangle.
Code
#include <tchar.h>
#include <stdio.h>
#include <system.types.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
TPoint *aPoint= new TPoint();
TRect *aRectangle = new TRect(2,3,7,8);
printf("%d %d %d %d\n",aRectangle->Left,aRectangle->Top,aRectangle->Right,aRectangle->Bottom);
// The console will output: 2 3 7 8, representing the coordinates of the corners of aRectangle
*aPoint= aRectangle->BottomRight();
printf("%d %d\n", aPoint->X,aPoint->Y);
//The console will output: 7 8, representing the coordinates of the aPoint , the lower-right point of the rectangle
return 0;
}