English
Regulars table & Café

EnableMenuItem.

 

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:

CompileMarkSeparation
THX, "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]
 
XProfan 8/9.1, Win XP, AMD 64/3200
05/06/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.129 Views

Untitledvor 0 min.
Heltal07/25/14
Juergen Baier02/09/11

Themeninformationen

this Topic has 1 subscriber:

CB (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie