OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Use the TGadgetWindow::GetDesiredSize and TGadgetWindow::GetInnerRect functions to find the overall desired size (the size needed to accommodate the borders, margins, and the widest or highest gadget) and the size and location of the window's inner rectangle.
If shrink wrapping was requested for the window, GetDesiredSize calculates the size the window needs to be to accommodate the borders, margins, and the widest or highest gadget. If shrink wrapping was not requested, GetDesiredSize uses the current width and height. The results are then placed into size.
GetInnerRect calculates the area inside the borders and margins of the window. The results are then placed into rect.
You can override GetDesiredSize and GetInnerRect to leave extra room for a custom look for your window. If you override one of these functions, you probably also need to override the other.