Re: Win32Lib: setEnable not work for top menu "objects"?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dan Moyer wrote:
> 
> 
> I don't seem to be able to disable top menu's using setEnable; 
> I can disable menu ITEMS, but not a TOP menu, like "File", or "Edit", etc.
> 
> I assume I've seen this occur in other windows programs, but I'm not sure.
> Am I doing something wrong, or is it fundamentally not doable, or just
> not (yet?) implemented?

A bug. Depending on which version of the library you have ...

You need to make a small change to the setEnable() routine inside win32lib.ew.

Replace

  if w32Func( xEnableMenuItem, {
        lHandle,        -- menu handle
        id,                     -- id
        flag} )= #FFFFFFFF      -- enable/disble
  then


with 

  if w32Func( xEnableMenuItem, {
        lHandle,        -- menu handle
        ctrl_Menu[id][3],
        flag} )= #FFFFFFFF      -- enable/disble
  then

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu