PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WhenLoaded
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax: void _cdecl EXTERNAL WhenLoaded( void );
 
  See:    cmdTable, swiTable
 
     All PWB extensions must define a WhenLoaded function.
 
     PWB calls WhenLoaded immediately after loading the extension. Any
     initialization tasks required by your extension functions or
     switches should be done in WhenLoaded. If your extension does not
     require initialization, WhenLoaded can return immediately to PWB.
 
     For example,
 
          WhenLoaded()
          {
              return;
          }
 
     Typical tasks that you can perform in WhenLoaded include:
 
        ■ Display an initialization message (DoStatusBox)
 
        ■ Initialize text switches
 
        ■ Assign keys to functions (SetKey)
 
        ■ Install new menus (IdAddPwbMenuItem)
 
        ■ Define and initialize new colors (AddAColor)
 
        ■ Create and initialize new PWB windows (Addfile,
          GetEditorObject, SetPWBWindowMenuTitle)
                                    -♦-