| |
|
|
CB |
Description:
EnableMenuItem (de)activate one Menuelement, too in a external (a DLL loaded) Menu.
Deklaration:
DEf @EnableMenuItem(3) !USER32,EnableMenuItem
Parameter:
1.Parameter: the lever the Menuleiste 2.Parameter: according to Parameter 3 position (integrally links=0) or ID (%MENUITEM) the Menüpunktes. 3.Parameter: One Flag, the whom Content of Parameter 2 angibt=> - $0 = (MF_BYCOMMAND) In Parameter 2 standing The ID the Menüpunktes. - $400 = (MF_BYPOSITION) In Parameter 2 standing The position the Menüpunktes. moreover can with | one Flag add go, the The statement the Menüpunktes angibt.=> - $2 = (MF_DISABLED) The exhaust isn't anwählbar, but neither ausgegraut. - $0 = (MF_ENABLED) The exhaust isn't ausgegraut and anwählbar. - $1 = (MF_GRAYED) The exhaust is ausgegraut and not anwählbar.
Return Value:
existing the exhaust not, becomes $FFFFFFFF zurückgegeben, otherwise the previous status the Menüs ($0, $1 0the $2)
Examples:
CompileMarkSeparationTHX, "Pascal" :-)
window 50,50-500,500
popup "Datei"
appendmenu 01,"Neuer Eintrag"
appendmenu 02,"Eintrag löschen"
appendmenu 03,"Eigenschaften"
popup "Hilfe"
appendmenu 13,"Kontexthilfe"
appendmenu 14,"Hilfedatei"
appendmenu 15,"Info über..."
print "Taste drücken"
def @GetMenu(1) !"USER32","GetMenu"
def @EnableMenuItem(3) !"USER32","EnableMenuItem"
def @DrawMenuBar(1) !"USER32","DrawMenuBar"
declare Menu&
let Menu&=@GetMenu(%hwnd) Handle des Fenstermenüs
declare Position%
let Position%=1 Position des Menüpunktes (ganz links=0)
while 1
waitkey
@EnableMenuItem(Menu&,Position%,1025) Disable=1025
@DrawMenuBar(%hwnd) Neuzeichnen
waitkey
@EnableMenuItem(Menu&,Position%,1024) Enable=1024
@DrawMenuBar(%hwnd) Neuzeichnen
endwhile
[keywords:0b14f88276] Menu Menuitem Enable Disable enable deaktivieren externes and @ GetFocus [/keywords:0b14f88276] |
|
|
| |
|
|