EqualRect (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code example returns whether two given TRect objects are equal in position and size.

Code

#include <System.Types.hpp>

int _tmain(int argc, _TCHAR* argv[]) {
	TRect *aRect1 = new TRect(1, 2, 6, 7);
	TRect *aRect2 = new TRect(1, 2, 4, 6);

	if (EqualRect(aRect1, aRect2))
		printf("The two rectangles are equal in size and position!");
	else
		printf("The two rectangles are not equal!");
return 0;
}

Uses