Hello,
is it possible to reactivate a menu-item after
it is disabled using RemoveMenu( ... ?
The system-exit-button is disabled using :
hMenu := GetSystemMenu( oWinDlg:hWnd, .F. )
nCount := GetMItemCount( hMenu )
RemoveMenu( hMenu, nCount-1, nOR( 1024 ) )
how to activate X again at runtime ( ON / OFF ) ?

the function ( still something missing ? )
calling the function with lDisableX = .F., doesn't work :
best regards
Uwe
is it possible to reactivate a menu-item after
it is disabled using RemoveMenu( ... ?
The system-exit-button is disabled using :
hMenu := GetSystemMenu( oWinDlg:hWnd, .F. )
nCount := GetMItemCount( hMenu )
RemoveMenu( hMenu, nCount-1, nOR( 1024 ) )
how to activate X again at runtime ( ON / OFF ) ?

the function ( still something missing ? )
calling the function with lDisableX = .F., doesn't work :
FUNCTION DISABLEX( oWinDlg, lDisableX )
LOCAL nCount := 0, hMenu := 0
LOCAL cClass := oWinDlg:ClassName()
hMenu := GetSystemMenu( oWinDlg:hWnd, .F. )
nCount := GetMItemCount( hMenu )
IF lDisableX
  // To Disable `X' Button of a Window or a Dialog
  RemoveMenu( hMenu, nCount-1, nOR( 1024 ) )
ENDIF
DrawMenuBar( oWinDlg:hWnd )
RETURN NILbest regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.