[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Windows
 ----------------------------------------------------------------------------

  Windows are the essential element of Windows programming.

  Every program in Windows works inside a main Window. Once the main
  Window is built and working, our program starts receiving all kind
  of notifications (messages) from Windows about what actions are
  happening.

  That is, if we press the mouse button while the mouse cursor is over our
  main Window, Windows will notify us. FiveWin automatically processes this
  message and checks if we have defined something to do for that particular
  notification. If you have defined an action, FiveWin executes it, or
  notifies Windows that there is nothing to do.

  This kind of programming is known as Event-Driven-Programming. An event
  may be a keyboard touch, mouse movement, another Windows activity, a
  certain time period expiring, etc...

  Think of it like a continuous READ command.  From the moment our main
  Window starts working, Windows will continually send us notifications
  which FiveWin will answer automatically if we are not manually taking
  control of the process.

  There is no way in Windows to stop that flow of information. It is a
  constant flow of information and reacting actions. You should learn how
  to manage that flow. We understand that if you have no previous Windows
  programming experience, you won't know how it works. Don't worry too
  much if right now you don't know how to control it, FiveWin will take
  care of it for you until you start understanding Windows. It is only a
  matter of time.

  Step by step you will understand them and you will know how to use them.

  xBase commands for creating Windows:

  DEFINE WINDOW <oWnd> ;                    // Name of the Windows Object
    [ FROM <nTop>, <nLeft> TO <nBottom>, <nRight>  ] ; // Screen position
    [ MENU <oMenu> ] ;                      // Optional menu
    [ TITLE <cTitle> ] ;                    // Window title
    [ MDI ] ;                               // MDI behavior
    [ OF <oWndContainer> ] ;                // Window container
    [ STYLE <nStyle> ]                      // Window style


  Activating commands:

  ACTIVATE WINDOW <oWnd> ;                  // Name of the Window Object
     [ ON LEFT  CLICK <uLeftClkAction> ] ;  // Left Click event defined action
     [ ON RIGHT CLICK <uRightClkAction> ] ; // Right Click event defined action
     [ ON PAINT <uPaintAction> ] ;          // Painting event defined action
     [ ON RESIZE <uResizeAction> ] ;        // ReSize event defined action
     [ ON MOVE   <uMoveAction> ] ;          // Move event defined action
     [ ON KEYDOWN <uKeyDownAction> ]        // KeyPressed event defined action

  ON extensions let control events react with the xBase syntax.
   Sometimes there can be multiple actions assigned to an ON event.  In
   such cases you must place these multiple commands inside parenthesis and
   separate them with COMMAS:

             ON LEFT CLICK ( nMsgBox( "Hello" ), nMsgBox( "Good Bye" ) ) 

  In many cases where you want to perform more complex actions, it is easier
  to define a new function and to call it:

            ON LEFT CLICK MyFunction()

See Also: TWindow Commands
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson