Changemenu Details (ChangeMenu,Hmenu,cmd,lpszNewItem,cmdInsert,Flags)

Started by bloodhound, April 28, 2006, 03:28:28 AM

Previous topic - Next topic

bloodhound

Could someone share a detail example on this command??

I know the Hmenu and am fuzzy about the lpszNewItem this is the address of the text right?
how about the others??..

thanks!



bloodhound


:dance:
Well... just got this myself with TRIAL and ERROR and some scanning of huge C source code examples on the web..

Here's my own definition, kinda rusty..  :wink

ChangeMenu,Hmenu,cmd,lpszNewItem,cmdInsert,Flags

Hmenu : the menu handle.. ex. "hPopupmenu"
cmd     : position to change or append if use "MF_CHANGE OR MF_APPEND OR MF_BYPOSITION"
             starting at menu 0,1,2...
lpszNewItem: text string addr
cmdInsert: the new or replaced routine.. ex. "IDM_ENABLE"
flags: MF_CHANGE / MF_APPEND / MF_BYPOSITION

example: ChangeMenu, HPopupmenu, 0, addr MsgDisabled, IDM_RUN, MF_CHANGE OR MF_BYPOSITION



it works on my project but a little fuzzy about the MF_BYPOSITION and cmd param..


evlncrn8

mf_byposition = the position in the menu you want to change, item 1, item 2, item 3 and so on
by command is logically enough by command.. ie the command 'message' you assign to the menu item