#includeint main() { BScreen screen; BRect rect = screen.Frame(); return 0; }
#includeIn this example, we create a new BWindow object with a rectangular region of (100, 100, 400, 400), representing a window with a width of 300 pixels and a height of 300 pixels. The window is titled but not resizable. The BRect class is part of the interface kit package in BeOS/Haiku.int main() { BWindow window(BRect(100, 100, 400, 400), "My Window", B_TITLED_WINDOW, B_NOT_RESIZABLE); return 0; }