How to change text of top level menu
- Posted by Judith Evans <camping at txcyber.com> Mar 09, 2003
- 561 views
Here is some code Wolf sent me that works. -- Wolf: this modifies the second top level menu in the bar, if pos is 1. procedure zmodifymenu(integer pos, sequence newstring, integer MyWin) atom main_id, str_ptr, menu_id,jk --zero indexed, top bar only main_id = getHandle(MyWin) menu_id = w32Func(xGetMenu,{main_id}) str_ptr = allocate_string(newstring) jk = w32Func(xModifyMenu,{menu_id,pos,#400,0,str_ptr}) free(str_ptr) jk = w32Func(xDrawMenuBar,{main_id}) end procedure <Also how do I change the text of a top level menu? setText() does not work <unless there is something I need to do after that statement. I've tried <repaintWindow.