Pues funcionó perfecto, aquí el ejemplo que me facilitaste del menú y utilizando el DisableX
Se consigue un menú de sistema totalmente personalizado, fabuloso Cristóbal, gracias.
// ---------------------------------------------------------------------//
// MNUNEW05.PRG
// Prueba de nuevas caracteristicas en menus
//
//
// ---------------------------------------------------------------------//
#include "Fivewin.ch"
#define MF_BYPOSITION 1024 // 0x0400
#define MF_DISABLED 2
Static oWnd
Static oFontMenu
Static oBr
Function Main()
Local cFont := "Segoe UI Symbol"
Local cFontH := -14
Local oBar
Local cTitle
Local oIcon
local cVar1 := "中国版"
local nHt := 0
Fw_SetUnicode( .T. )
SetResDebug( .T. )
if !IsWin8() .and. !IsWindows10()
cFont := "Calibri"
endif
DEFINE FONT oFontMenu NAME cFont SIZE 0, cFontH
DEFINE ICON oIcon FILE "..\icons\menu.ico"
cTitle := " Pruebas de Menus: Font - " + if( !Empty( oFontMenu ), oFontMenu:cFaceName, "" ) +;
if( !Empty( oFontMenu ), Str( oFontMenu:nHeight ), "" ) + " - Redefine SYSMENU - 5"
DEFINE DIALOG oWnd FROM 3,6 TO 30, 100 ;
TITLE cTitle COLOR CLR_WHITE, METRO_OLIVE
oWnd:SetIcon( oIcon )
ACTIVATE DIALOG oWnd CENTERED ON INIT ( DisableX( oWnd, .T.) , BuildMnu0() )
if !Empty( oFontMenu )
While oFontMenu:nCount > 0
oFontMenu:End()
Enddo
endif
RELEASE BRUSH oBr
oIcon:End()
if File( "checkres.txt" )
FErase( "checkres.txt" )
endif
CheckRes()
Return nil
// ---------------------------------------------------------------------//
Function BuildMnu0()
local oMnu
REDEFINE SYSMENU oMnu OF oWnd FONT oFontMenu
SEPARATOR
MENUITEM "SubMenu" CHARICON 57605
MENU 2007
MENUITEM "Segundo Item" CHARICON 57696
SEPARATOR
MENUITEM "Tercer Item" CHARICON 57736
ENDMENU
SEPARATOR
MENUITEM "தமிழ் (India)"
MENU
MENUITEM "FIVEDIT" SEPARATOR BOLD
MENUITEM "Methods" HSYSBITMAP 32761
MENUITEM "Datas" HSYSBITMAP 32760
MENUITEM "Messages" HSYSBITMAP 32744
MENUITEM "Messages" HSYSBITMAP 32743
MENUITEM "ClassData" CHARICON "M"
MENUITEM "SCINTILLA" SEPARATOR BREAK BOLD
MENUITEM "Methods de Object" CHECKED
MENUITEM "Datas Values" HSYSBITMAP 32739
MENUITEM "Messages Data" CHARICON 57731
MENUITEM "Messages Method" HSYSBITMAP 32741
MENUITEM "ClassData Object" HSYSBITMAP 32742
ENDMENU
SEPARATOR
MENUITEM "中国版 (China)" CHECKED
SEPARATOR
MENUITEM "&Reset Menu" ACTION oMnu:Reset()
ENDSYSMENU
Return oMnu
// ---------------------------------------------------------------------//
FUNCTION DisableX(oWin, lDisable)
LOCAL hMenu := 0
LOCAL nCount := 0
DEFAULT lDisable := .T.
IF lDisable
hMenu = GetSystemMenu(oWin:hWnd, .F.)
nCount = GetMItemCount(hMenu)
? nCount
IF oWin:ClassName() = "TDIALOG"
RemoveMenu(hMenu, 0, nOR( MF_BYPOSITION, 0 ) )
RemoveMenu(hMenu, 0, nOR( MF_BYPOSITION, 0 ) )
ELSE
RemoveMenu(hMenu, nCount - 1, nOR( MF_BYPOSITION, MF_DISABLED) )
RemoveMenu(hMenu, nCount - 2, nOR( MF_BYPOSITION, MF_DISABLED) )
ENDIF
ELSE
GetSystemMenu( oWin:hWnd, .T. )
ENDIF
RETURN nilSe consigue un menú de sistema totalmente personalizado, fabuloso Cristóbal, gracias.



