home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 23.10 MEMOEDIT User Defined Function for help screens
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
-
- #include "MEMOEDIT.CH"
- #include "INKEY.CH"
-
- function ME_UDF( me_mode,me_row,me_col )
- LOCAL keypress,nByte,cWord,cScr
- field chelp
- if me_mode = ME_UNKEY .or. ; // MEMOEDIT.CH (Mode 1)
- me_mode = ME_UNKEYX // (Mode 2)
- keypress := lastkey() // Determine key pressed
- do case
- case keypress = K_F6 // F6 - Hyper lookup
- nByte := mlctopos(cHelp,60,me_row,me_col)
- cWord := substr(cHelp,nByte,12)
- select HELP
- seek upper(cWord)
- if found()
- *
- * Display a second box to describe the word
- * found
- *
- cScr :=savescreen(8,20,15,60)
- @ 8,20 to 15,60 double
- @ 8,21 say " "+trim(cWord)+" "
- memoedit( HELP->text,9,21,14,59,.F.,.F.)
- inkey(500)
- restscreen(8,20,15,60,cScr)
- *
- endif
- return ME_DEFAULT
- otherwise
- return ME_DEFAULT // Zero - default action
- endcase
- endif
- return nil
-
- // end of file CHP2310.PRG
-