ruby win32api call getMenuItemInfo

T

Ted Baker

Hi all,

I have successfully managed to implement the following apis

findWindow=Win32API.new("user32.dll", "FindWindow", ['P','P'], 'N')
sendMessage=Win32API.new("user32.dll", "SendMessage",['N','N','N','P'],
'N')
getMenu=Win32API.new("user32.dll", "GetMenu", ['N'], 'N')
getMenuItemCount=Win32API.new("user32.dll", "GetMenuItemCount",['N'],
'N')
getSubMenu=Win32API.new("user32.dll", "GetSubMenu", ['N','N'], 'N')
deleteMenu=Win32API.new("user32.dll", "DeleteMenu", ['N','N','N',],'N')
drawMenuBar=Win32API.new("user32.dll", "DrawMenuBar", ['N'], 'N')
setWindowLong=Win32API.new("user32.dll", "SetWindowLong",['N','N','N'],
'N')

but am unable to get getMenuItemInfo to work, this is because it takes a
type structure and boolean as parameters and i can't figure it out...

this is what i have

getMenuItemInfo =Win32API.new("user32.dll", "GetMenuItemInfo",
['L','L','NEED','NEED'], 'L')

the api is as follows...

BOOL GetMenuItemInfo(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
LPMENUITEMINFO lpmii
);

typedef struct tagMENUITEMINFO {
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
ULONG_PTR dwItemData;
LPTSTR dwTypeData;
UINT cch;
HBITMAP hbmpItem;
} MENUITEMINFO, *LPMENUITEMINFO;

any help greatly appreciated...

Thanks

Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top