home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmmac.zip / MENUACEL.E < prev    next >
Text File  |  1995-03-17  |  3KB  |  76 lines

  1. ; This file is for EPM only.  It is common code that is related to
  2. ; building the menu and accelerator table.
  3. ; It is included by STDCNF.E for EPM 5.xx, and by MAIN.E (after the
  4. ; SHOWWINDOW) for EPM 6.xx.  The difference is that EPM 6.xx includes
  5. ; a dummy menu as a resource, allowing the building of the real menu
  6. ; to be deferred until after the window is shown - this lets the initial
  7. ; window be shown about 10% faster.
  8.  
  9.  compile if WANT_STACK_CMDS = 'SWITCH'
  10.   compile if defined(my_STACK_CMDS)
  11.    stack_cmds = my_STACK_CMDS
  12.   compile else
  13.    stack_cmds = 0
  14.   compile endif
  15.   compile if WANT_APPLICATION_INI_FILE
  16.    compile if WPS_SUPPORT
  17.    if wpshell_handle then
  18. ; Key 16
  19. ;     this_ptr = peek32(shared_mem+64, 4); -- if this_ptr = \0\0\0\0 then return; endif
  20. ;     parse value peekz(this_ptr) with ? stack_cmds ?
  21.       stack_cmds = substr(peekz(peek32(wpshell_handle, 64, 4)), 6, 1)
  22.    else
  23.    compile endif
  24.    newcmd=queryprofile( app_hini, appname, INI_STACKCMDS)
  25.    if newcmd<>'' then stack_cmds = newcmd; endif
  26.    compile if WPS_SUPPORT
  27.    endif  -- wpshell_handle
  28.    compile endif
  29.   compile endif  -- WANT_APPLICATION_INI_FILE
  30.  compile endif
  31.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  32.   compile if defined(my_CUA_MENU_ACCEL)
  33.    CUA_MENU_ACCEL = my_CUA_MENU_ACCEL
  34.   compile else
  35.    CUA_MENU_ACCEL = 0
  36.   compile endif
  37.   compile if WANT_APPLICATION_INI_FILE
  38.    compile if WPS_SUPPORT
  39.    if wpshell_handle then
  40.       CUA_MENU_ACCEL = substr(peekz(peek32(wpshell_handle, 72, 4)), 7, 1)
  41.    else
  42.    compile endif
  43.    newcmd=queryprofile( app_hini, appname, INI_CUAACCEL)
  44.    if newcmd<>'' then CUA_MENU_ACCEL = newcmd; endif
  45.    compile if WPS_SUPPORT
  46.    endif  -- wpshell_handle
  47.    compile endif
  48.   compile endif -- WANT_APPLICATION_INI_FILE
  49.  compile endif
  50.  compile if CHECK_FOR_LEXAM
  51.   compile if EVERSION >= '5.51'
  52.     LEXAM_is_available = (lexam(-1) <> '')
  53.   compile else
  54.    compile if EVERSION >= '5.21'
  55.     display -10
  56.    compile else
  57.     display -2
  58.    compile endif
  59.     LEXAM_is_available = (-326=dynalink(LEXAM_DLL, 'LAM@Watson', 0))
  60.     if LEXAM_is_available then -- "Unrecognized procedure name" - i.e., library was found.
  61.        call dynafree(LEXAM_DLL); call dynafree(LEXAM_DLL)
  62.     endif
  63.    compile if EVERSION >= '5.21'
  64.     display 10
  65.    compile else
  66.     display 2
  67.    compile endif
  68.   compile endif  -- EVERSION >= 5.60
  69.  compile endif  -- CHECK_FOR_LEXAM
  70.  compile if INCLUDE_MENU_SUPPORT & INCLUDE_STD_MENUS
  71. 'loaddefaultmenu'
  72.  compile endif
  73.  compile if EVERSION > '5.20'
  74. 'loadaccel'
  75.  compile endif
  76.