- Code: Select all Expand view RUN
FUNCTION MAIN()
LOCAL oWnd, oMenu, oBar
MENU oMenu
MENUITEM "Test"
MENU
MENUITEM "Test1"
MENUITEM "Test2"
MENUITEM "Test3"
MENUITEM "Test4"
ENDMENU
ENDMENU
DEFINE WINDOW oWnd;
MENU oMenu
DEFINE BUTTONBAR oBar 3D OF oWnd
DEFINE BUTTON OF oBar;
TOOLTIP "This is a test";
NOBORDER
ACTIVATE WINDOW oWnd
RETURN NIL
A possible fix (but I don't know if it is the best one):
- Code: Select all Expand view RUN
METHOD SysCommand( nWParam, nLParam ) CLASS TWindow
local bKeyAction
if ::oBar != nil //EMG
AEval( ::oBar:aControls, { | oCtl | If( oCtl:ClassName() == "TBTNBMP", oCtl:LostFocus(), ) } ) //EMG
endif //EMG
if nWParam == 61696 // VK_F10
if ( bKeyAction := SetKey( VK_F10 ) ) != nil
Eval( bKeyAction, ProcName( 4 ), ProcLine( 4 ), Self )
return 0
endif
endif
if ::oSysMenu != nil .and. nWParam < 61440 // 0xF000
::oSysMenu:Command( nWParam )
else
do case
case nWParam == SC_CLOSE .or. nWParam == SC_CLOSE_OPEN
return ::End()
endcase
endif
return nil
EMG