OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Dialog boxes, unlike other child windows, such as windows and controls, are often displayed and destroyed many times during the life of their parent windows, but are rarely displayed or destroyed at the same time as their parents.
Usually, an application displays a dialog box in response to a menu selection, mouse click, error condition, or other event.
Therefore, you must be sure to not repeatedly construct new dialog box objects without deleting previous ones. Remember that when you construct a dialog box object in its parent window object's constructor or include the dialog box as a data member of the parent window object, the dialog box object is inserted into the child-window list of the parent and deleted when the parent is destroyed.
You can retrieve data from a dialog box at any time, as long as the dialog box object still exists. You will do this most often in the dialog box object's CmOK member function, which is called when the user presses the dialog box's OK button.