Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - <b>windows building and managing windows</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Windows              Building and managing 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, your program starts receiving all kind
  of notifications (messages) from Windows about what actions are
  happening.

  That is, if you press the mouse button while the mouse cursor is over your
  main Window, Windows will notify you. FiveWin automatically processes this
  message and checks if you have defined something to do for that particular
  notification. If you have defined an action, FiveWin executes it, or if
  there is no action, it 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.

  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 you don't know how to control it right now, FiveWin will take
  care of it for you until you start understanding Windows. It is only a
  matter of time.

  Little by little you will understand how Windows works and how to make the
  best use of the features.

  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 lets 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

Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson