Hi,
Is it possible to add a menuitem to system menu?
Thanks,
procedure DisableX(ODLG)
local hMenu
hMenu := GetSystemMenu(oDlg:hWnd,.f.)
RemoveMenu( hMenu, 6, MF_BYPOSITION)
RemoveMenu( hMenu, 5, MF_BYPOSITION)
RemoveMenu( hMenu, 4, MF_BYPOSITION)
RemoveMenu( hMenu, 3, MF_BYPOSITION)
RemoveMenu( hMenu, 2, MF_BYPOSITION)
RemoveMenu( hMenu, 1, MF_BYPOSITION)
RemoveMenu( hMenu, 0, MF_BYPOSITION)
return
AppendMenu( <hMenu>, <nFlags>, <nFlags>, <cPrompt> ) --> lSucces
procedure AddItemSystemMenu(ODLG, cPrompt, bRunProc)
local hMenu
hMenu := GetSystemMenu(oDlg:hWnd,.f.)
AppendMenu( hMenu, 0, ??, cPrompt)
return
James Bott wrote:I'm not sure I would recommend putting anything on the system menu. Most users will not look there, in fact most users don't even know there is a menu there. And I don't think I have ever seen anything but the default items on this menu in any app.
James
FUNCTION addSys(oDlg)
local oMenu
REDEFINE SYSMENU oMenu OF oDlg
MENUITEM "Item 1" ACTION MsgInfo( "any action" )
MENUITEM "Item 2"
ENDMENU
return oMenu
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 99 guests