PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
NewWindow
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax:  PWND NewWindow( PFILE pfFile, BYTE Flags,
                           int xPosNormal,  int yPosNormal,
                           int xSizeNormal, int ySizeNormal,
                           int xPosIcon,    int yPosIcon );
 
  Returns: Handle for the new window. PNULL if the window could not be
           created.
 
  See:     fSetWindowWithFile, GetEditorObject
 
     NewWindow creates a new window on the desktop with the specified
     file.
 
     For all coordinates, the origin (0,0) is the upper-left corner of
     the gray desktop area beneath the menu bar.
 
     Argument         Description
 
     <pfFile>         PFILE of the file to display in the window.
 
     <Flags>          Set of bit flags that specify the following
                      attributes for the window:
 
                      Bit              Attribute
 
                      NEWWND_ICON      Window is minimized (an icon)
                      NEWWND_ZOOMED    Window is maximized (zoomed)
                      NEWWND_CLOSED    Window is closed
                      NEWWND_PWB       Window is a PWB window
 
                      Use 0 for <Flags> to specify a normal window.
 
     <xPosNormal>     Normal (restored) position of the window on the
     <yPosNormal>     desktop. Use -1 for both arguments to use the
                      default window position.
 
     <xSizeNormal>    Normal (restored) size of the window on the
     <ySizeNormal>    desktop. The size arguments are offsets from the
                      window position Use -1 for both arguments to use
                      the default window size.
 
     <xPosIcon>       Position for the window's icon. Use -1 for both
     <yPosIcon>       arguments to use the next available icon slot.
 
     To display a file in a new window with the default size, position,
     and state, use the following call:
 
          pwnd = NewWindow( pfile, 0, -1, -1, -1, -1, -1, -1 );
 
     If the new window is a PWB window (that is, the <Flags> include
     NEWWND_PWB), PWB automatically creates a menu command for the
     window in the PWB Windows cascaded menu. You can change the name of
     the menu item (to specify a different access key, for example) with
     the SetPWBWindowMenuTitle function.
     See: SetPWBWindowMenuTitle
                                    -♦-