OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Creating an object and its corresponding element does not mean that you will see something on the screen.
When Windows creates the interface element, Windows checks to see if the element's style includes WS_VISIBLE. If it does, Windows displays the interface element; if it does not, the element is created but is not displayed onscreen.
TWindow's constructor sets WS_VISIBLE, so most interface objects are visible by default. But if your object loads a resource, that resource's style depends on what is defined in its resource file. If WS_VISIBLE is turned on in the resource's style, WS_VISIBLE is turned on for the object. If WS_VISIBLE is not turned on in the resource's style, WS_VISIBLE is turned off in the object's style. You can set WS_VISIBLE and other window styles in the interface object's Attr.Style data member. For example, if you use TDialog to load a dialog resource that does not have WS_VISIBLE turned on, you must explicitly turn WS_VISIBLE on before attempting to display the dialog with Create. You can find out whether an interface object is visible by calling IsWindowVisible, which returns true if the object is visible. At any point after the interface element has been created, you can show or hide it by calling its Show member function with a value of true or false, respectively.