🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm.x86
Article #117

Re: disable menuitem. Help !!

#117
From: Alan Illeman
Date: Tue, 09 Feb 1999 00:00
32 lines
1603 bytes
Try..

call GetMenu,hdlg
mov ebx,eax
call GetMenuItemID,ebx,0
call EnableMenuItem,ebx,eax,MF_GRAYED+MF_BYPOSITION

^^^^^^^^^^^^^^^^^^^^^^^

The position is zero based. If you have a top-level menu item
called File which when clicked produces a drop-down menu
consisting of New, Save, SaveAs, Exit

then New is 0, Save is 1, etc

wrote in message <79niu0$ehm$1@winter.news.rcn.net>...
>Hello Out there
>
>I try to disable a menu item with the following code
>
>call GetMenu,hdlg
>mov ebx,eax
>call GetMenuItemID,ebx,0
>call EnableMenuItem,ebx,eax,MF_GRAYED
>
>This fails...
>
> 1. I dont know if this is the way to disable a menu (are there other
>ways)
> 2. I don't understand the menu item positioning in GetMenuItemID
>
>Please explain !!!
Technical Details
Message-ID: <79pl2b$ff$1@winter.news.rcn.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <79niu0$ehm$1@winter.news.rcn.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f7d8d,78a48dcea00c7952
X-Google-Attributes: gidf7d8d,public
X-Google-Thread: feaef,78a48dcea00c7952
X-Google-Attributes: gidfeaef,public
X-Google-Thread: 114917,78a48dcea00c7952
X-Google-Attributes: gid114917,public
From: "Alan Illeman" <illeman@interlinks.net>
Subject: Re: disable menuitem. Help !!
Date: 1999/02/09
Message-ID: <79pl2b$ff$1@winter.news.rcn.net>
X-Deja-AN: 442437331
Approved: <johnfine@erols.com>
References: <79niu0$ehm$1@winter.news.rcn.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Mozilla-Status: 0801
X-Complaints-To: abuse@rcn.com
X-Trace: rj134s5wxZmNnzJ1FRC0TuzxIw6yOZRgipHRfzfKsjI=
Organization: none
NNTP-Posting-Date: 9 Feb 1999 15:43:07 GMT
Newsgroups: comp.lang.asm.x86,alt.lang.asm,borland.public.tasm