MDI window
Posted: Sun Jun 08, 2008 6:24 pm
In the following sample, try to hit ALT-1 and you will get the system menu instead of the Changed1 menu action. If you hit ALT-2 you will get Changed1 menu action instead of the Changed2 one. You will also notice that the MDI Child icon is vanished at this point.
EMG
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oMenu
MENU oMenu 2007
MENUITEM "Test&1" ACTION MSGINFO( "1" )
MENUITEM "Test&2" ACTION MSGINFO( "2" )
MENUITEM "Test&3" ACTION MSGINFO( "3" )
ENDMENU
DEFINE WINDOW oWnd MDI;
TITLE "MDI Test";
MENU oMenu
ACTIVATE WINDOW oWnd;
ON INIT CREATECHILD( oWnd )
RETURN NIL
STATIC FUNCTION CREATECHILD( oMdi )
LOCAL oWnd, oMenu
MENU oMenu 2007
MENUITEM "Changed&1" ACTION MSGINFO( "1" )
MENUITEM "Changed&2" ACTION MSGINFO( "2" )
MENUITEM "Changed&3" ACTION MSGINFO( "3" )
ENDMENU
DEFINE WINDOW oWnd MDICHILD OF oMdi;
TITLE "MDI Child Test";
MENU oMenu
ACTIVATE WINDOW oWnd;
VALID !GETKEYSTATE( VK_ESCAPE );
MAXIMIZED
RETURN NIL