Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - GetMenuItemInfo

Posted in WinTask

'Private Type MENUITEMINFO
'  cbSize As Long
'  fMask As Long
'  fType As Long
'  fState As Long
'  wID As Long
'  hSubMenu As Long
'  hbmpChecked As Long
'  hbmpUnchecked As Long
'  dwItemData As Long
'  dwTypeData As String
'  cch As Long

dim MENUITEMINFO as unsigned
dim ptr as unsigned
MENUITEMINFO=allocate(100)


hwnd=GetWindowHandle(top$(),1)
hmenu=External("user32","GetMenu", hwnd)
'hsubmeu=External("user32","GetSubMenu", hMenu, 1)

ret=External("user32", "GetMenuItemInfoA", hmenu, 0, 1, MENUITEMINFO)

ptr=MENUITEMINFO+12
var=peekinteger(ptr,4)
msgbox(str$(var))


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now