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]

WSDIWindow:Init() Method
Construct an SDI frame window object
------------------------------------------------------------------------------

Syntax
WSDIWindow{ <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 SDI frame window object.  By
default, this will also create a window on the screen.

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\DBFGEN.PRG:
CLASS MyApp INHERIT WApp
     METHOD Create(cText)     INLINE ::oWnd := MainWindow{self, cText}
ENDCLASS

CLASS MainWindow INHERIT WSDIWindow
// . . .
     METHOD Init(oApp, cText)                          ;
            INLINE super:Init(oApp, cText),            ;
                   ::StatusBar := WStatusBar{self},    ;
                   self


See Also: WApp:Create()

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