1. raves and rants..

Thanks, Robert, for your refreshing honesty about benchmarking:
[ Someone once said that there are 3 levels of lies:
   1. Lies
   2. Damn Lies
   3. Benchmarks

I think the benchmarks in demo\bench are reasonably fair,
but... ]

...and thank you, Gabriel, for your 'excellent' arguments to Ralph in:
[ Subject: Re: Weird error messages & more ]
With things like THIS on the mailing list, we 'newbies' might actually
learn something blink

anyways, here's a bit of code I wrote a while back which changes a
menu's 'text' in win32lib programs. This works for the top menu 'texts'
only, and believe it or not, I actually once had a version which could
change the 'text' at ANY level, foolishly deleted it, and can't seem to
re-produce !  Maybe someone could, as an addition to the 'apparently
dead' win32lib. Hopefully only apparently, this LLAMA 'looks' a lot
like Tcl/Tk ?


procedure modifymenu(integer pos, sequence newstring)
atom main_id, str_ptr, menu_id
--zero indexed, top bar only sad
  main_id = getHandle(MyWin)
  menu_id = c_func(xGetMenu,{main_id})
  str_ptr = allocate_string(newstring)
  jk = c_func(xModifyMenu,{menu_id,pos,MF_BYPOSITION,0,str_ptr})
  free(str_ptr)
  jk = c_func(xDrawMenuBar,{main_id})
end procedure

...Wolf

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu