//IMPORT  WM_消息.wcs  //需要WM_消息.wcs 拷到本文件目录！！！
SET  WM_LBUTTONDOWN                  =0x0201
SCRN ScrW,ScrH0 
//SCRN ScrW,ScrH 
ENVI B_TRIM=50    //XP下测试任务栏挡住了
CALC #ScrH=%ScrH0% - %B_TRIM%
ENVI &&bStart=0

TEAM ENVI WinL=80| ENVI WinH=50
CALC #WinW=%ScrW% - %WinL%
CALC #WinTOP=%ScrH% - %WinH% 


_SUB WinMenu, L%WinL%T%WinTOP%W%WinW%H%WinH%,,,,-10,,-top -forcenomin -disaltmv 
//   LABE -center ,L0T0W200H20,固定窗口,,0x00#0xFF0000,
    ITEM ,L10T10W60H20,开始菜单, CALL OnStart
    ITEM ,L80T10W40H20,关闭,   TEAM  KILL  \start| KILL \ 
    ITEM ,L130T10W60H20,记事本, EXEC NOTEPAD
    ITEM ,L200T10W60H20,计算器,  EXEC  CALC
     ENVI @WinMenu.MSG=%&WM_LBUTTONDOWN%:TEAM ENVI &bStart=0|  KILL \start   //点一下就消失，子菜单一般应该这样
_END

TEAM ENVI startH=90|  ENVI startW=190
CALC #startL=%WinL%
CALC #startTOP=%ScrH% - %startH% - %WinH%

_SUB OnStart
    ENVI &&s=%&bStart%
    FIND $0=%&s%, TEAM ENVI &bStart=1|  call @*start
    FIND $1=%&s%, TEAM ENVI &bStart=0|  KILL  \start   //乒乓键
_END
_SUB start, L%startL%T%startTOP%W%startW%H%startH%,start,,,-,,-top -forcenomin -disaltmv 
     ENVI @start.MSG=%&WM_LBUTTONDOWN%:TEAM ENVI &bStart=0|  KILL \   //点一下就消失，子菜单一般应该这样

    ITEM ,L10T10W60H20,开始菜单,  TEAM ENVI &bStart=0|  KILL \

_END


CALL WinMenu 

