A SERVICE OF

logo

the TMDIClient, and toolbars and the like are children of a
TDecoratedMDIFrame, there is no need for this flag anymore.
The following child-handling functions of the TMDIFrame class have been
Relocated functions
moved to the TMDIClient class:
ArrangeIcons CMCreateChild
CascadeChildren CMInitChild
CloseChildren CMTileChildren
CMArrangeIcons CreateChild
CMCascadeChildren InitChild
CMCloseChildren TileChildren
Code that used or overrode these functions should be changed to reference
the TMDIClient instance, or be moved to a descendent of the TMDIClient
class.
The names of the menu command handlers use the ObjectWindows 2.0
style, that is, CMInitChild is now CmInitChild.
In ObjectWindows 1.0, you could find the active MDI child by using the
Replacing
PTWindow data member ActiveChild, of the TMDIFrame object. In,
ActiveChild with
ObjectWindows 2.0, you should use the GetActiveChild member function in
GetActiveChild
the TMDIClient class.
Y u should no longer set the variable T pplication::MainWindow. Insteado A
MainWindow
you should use the SetMainWindow function. SetMainWindow takes one
variable
parameter a TFrameWindow *, and returns a pointer to the old main,
window. If this is a new application, that is, one that has not set up a main
window yet, the return value is 0.
Suppose your existing code looks something like this:
void InitMainWindow()
{
MainWindow = new TFrameWindow(0, "This window", new TWindow);
MainWindow->AssignMenu("COMMANDS");
}
In ObjectWindows 1.0, this was a fairly common way of setting up your
main window at the beginning of your application’ execution. Ins
ObjectWindows 2.0, class data members are either protected or private,
preventing you from directly setting the value of the data members. The
previous code would look something like this:
Appendix A, Converting ObjectWindows 1.0 code to ObjectWindows 2.0
379