routine MENU.CHECK given FORM.PTR, ITEMS, ITEM.TO.CHECK
''
'' COPYRIGHT (C) 1996, CACI Products Company.
'' AUTHOR: Steve Bailey
'' DATE: 12-8-96
'' DESCRIPTION:
''    This routine controls the display of checks on the menu items
''    Implements "one of many" menu item checkmark display given 
''    field names of menu items
''
define FORM.PTR as a pointer variable
define ITEMS as a 1-dim text array
define ITEM.TO.CHECK as an integer variable
define I as an integer variable

'' clear all menu items except the one to be checked.  DDVAL.A controls
'' display of the check mark
for I = 1 to DIM.F(ITEMS(*)) do
    if ITEM.TO.CHECK eq I
        let DDVAL.A(DFIELD.F(ITEMS(I), FORM.PTR)) = 1
    else
        let DDVAL.A(DFIELD.F(ITEMS(I), FORM.PTR)) = 0
    always

    '' update the menu item
    display DFIELD.F(ITEMS(I), FORM.PTR)
loop
  
return
End
