BRect rect(10, 10, 50, 50); BPoint point(20, 30); if (rect.Contains(point)) { printf("The point is inside the rectangle.\n"); } BRect outerRect(0, 0, 100, 100); BRect innerRect(20, 20, 80, 80); if (outerRect.Contains(innerRect)) { printf("The inner rectangle is completely inside the outer rectangle.\n"); }In the first example, we create a BRect object called `rect` that has top-left coordinates (10, 10) and bottom-right coordinates (50, 50). We also create a BPoint called `point` with coordinates (20, 30). We then use the `Contains` method to check if `point` is inside `rect`, and print a message if it is. In the second example, we create two BRect objects called `outerRect` and `innerRect`. We use the `Contains` method to check if `outerRect` completely contains `innerRect`, and print a message if it does. BRect Contains is part of the Be API library, which is included in the BeOS and Haiku operating systems. It is also available as a C++ library called the OpenBeOS API, which is an open source implementation of the BeOS API.