How to change text of top level menu

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

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 sad
  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.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu