Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

WMDIFrame:Init() Method
Construct an MDI frame window object
------------------------------------------------------------------------------

Syntax
WMDIFrame{ <oApp>, [ <cTitle> ] , [ <cnMenuId> ] , [ <lCreate> ] }
             -->   SELF

Arguments
<oApp> specifies the application that is to own the frame
object.  The frame's screen window will not have a parent,
because it's a top-level window.

<cTitle> specifies the caption for the title bar of the window
(if any) to be created.

<cnMenuId> is an optional menu id.  If it is a string, it is
taken to be the name of a resource menu.  If it is a number,
it is taken to be a menu handle.  The default (NIL) is to set
no menu.  Usually this is because you assign a menu after the
window has been created, normally as a result of the MENU
command.

<lCreate> specifies whether the window object's Create()
method is to be invoked immediately.  Usually you want the
default (.T.).

Returns
SELF.

Description
This method initialises an MDI frame window object.  By
default, this will also create a window on the screen.

An MDI client is also created, with the frame as its parent.
If there is a menu, the position of the "Window" menu item is
supposed to be immediately before the last item (which should
be the "Help" item).  This position is passed to the MDI
client.

Note: the order of <cTitle> and  <cnMenuId>  is the opposite
of that needed for WControlWindow's <nId> and <cTitle>,
reflecting the fact that <cnMenuId> and later parameters are
usually omitted for a frame window, whereas <nId> is usually
specified for controls and <cTitle> is not.

Example
// From SOURCE\OO\MDIBITMA.PRG:
CLASS MainWindow INHERIT WMDIFrame
// . . .
     METHOD Exit()           INLINE ::oApp:Quit()

     METHOD Init(oApp, cText)                           ;
            INLINE super:Init(oApp, cText),             ;
                   ::StatusBar := WStatusBar{self},     ;
                   self
// . . .
ENDCLASS


See Also: WMDIFrame:Create() WSDIWindow WMDIFrame WMDIChild

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson