home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP23.EXE / CHP2310.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.4 KB  |  48 lines

  1. /*
  2.    Listing 23.10  MEMOEDIT User Defined Function for help screens
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11.  
  12. #include "MEMOEDIT.CH"
  13. #include "INKEY.CH"
  14.  
  15. function ME_UDF( me_mode,me_row,me_col )
  16. LOCAL keypress,nByte,cWord,cScr
  17. field chelp
  18. if me_mode = ME_UNKEY .or. ;  // MEMOEDIT.CH (Mode 1)
  19.    me_mode = ME_UNKEYX        // (Mode 2)
  20.       keypress := lastkey()    // Determine key pressed
  21.       do case
  22.       case keypress = K_F6       // F6 - Hyper lookup
  23.          nByte := mlctopos(cHelp,60,me_row,me_col)
  24.          cWord := substr(cHelp,nByte,12)
  25.          select HELP
  26.          seek upper(cWord)
  27.          if found()
  28.             *
  29.             * Display a second box to describe the word
  30.             * found
  31.             *
  32.             cScr :=savescreen(8,20,15,60)
  33.             @ 8,20 to 15,60 double
  34.             @ 8,21 say " "+trim(cWord)+" "
  35.             memoedit( HELP->text,9,21,14,59,.F.,.F.)
  36.             inkey(500)
  37.             restscreen(8,20,15,60,cScr)
  38.             *
  39.          endif
  40.          return ME_DEFAULT
  41.       otherwise
  42.          return ME_DEFAULT       // Zero - default action
  43.       endcase
  44. endif
  45. return nil
  46.  
  47. // end of file CHP2310.PRG
  48.