| |
|
|
|
Description:
SetMenuDefaultItem heave a exhaust through Big-Font forth.
Deklaration:
DEF @SetMenuDefaultItem(3) !USER32,SetMenuDefaultItem
Parameter:
1.Parameter: lever the Menüs. 2.Parameter: according to Parameter 3 ID or position the Menüitems as LongInt. 3.Parameter: Flag to explanation of Parameter 2. => 1 = Parameter 2 gives The position the Menüitems on. 1.Menüitem has The position 0. 0 = Parameter 2 gives The ID the Menüitems on.
Return Value:
1 with success, 0 with failure.
Examples:
CompileMarkSeparationDEF @SetMenuDefaultItem(3) !"USER32","SetMenuDefaultItem"
DEF @GetMenu(1) !"USER32","GetMenu"
DEF @GetSubMenu(2) !"USER32","GetSubMenu"
DEF @DrawMenuBar(1) !"USER32","DrawMenuBar"
Declare MenuHandle&
Windowstyle 31
Windowtitle "Menü Item Default"
Window 0,0-640,440
Popup "&Programm"
Appendmenu 101,"Hauptmenü &Programm hervorheben!"
Appendmenu 103,"&beenden"
Popup "&Optionen"
Appendmenu 201,"&Eintrag 1"
Appendmenu 202,"&Eintrag 2"
Appendmenu 203,"&Eintrag 3"
LET MENUHANDLE&=@GetSubMenu(@Getmenu(%HWND),0)
@SetMenuDefaultItem(MenuHandle&,103,0)
@DrawMenuBar(%HWND)
While 0=0
Waitinput
CASE @Menuitem(103) : END
IF @Menuitem(101)
@SetMenuDefaultItem(@Getmenu(%HWND),0,1)
@DrawMenuBar(%HWND)
endif
Wend
|
|
|
| |
|
|