When the Window Manager calls a window definition function with a message of wDraw , it stores a value of type short in the param parameter without clearing the high-order word. When processing the wDraw message, use only the low-order word of the param parameter. The window frame typically but not necessarily includes the window's title, which should be displayed in the system font and system font size. The Window Manager port is already set to use the system font and system font size. When designing a title bar that includes the window title, allow at least 16 pixels vertically to support localization for script systems in which the system font can be no smaller than 12 points.
Nothing drawn outside the window's structure region is visible.
When you receive a wHit message, you must determine where the cursor was when the mouse button was pressed. The wHit message is accompanied by the mouse location, in global coordinates, in the param parameter. The standard window definition functions, for example, return wNoHit if the point is in the window frame but not in the title bar. In an inactive document window, for example, a mouse-down event in the part of the title bar that would contain the close box if the window were active is reported as wInDrag . Calculating Regions When you receive the wCalcRgns message, you calculate the window's structure and content regions based on the current graphics port's port rectangle.