Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Editor = '~Notepad' User32 = StrCat(DirWindows(1), 'User32.dll') If !WinExist(Editor) Then Run('Notepad', '') TimeDelay(1) hEdit = DllHwnd(Editor) hMenu = DllCall(User32, long:"GetMenu", long:hEdit) Pause(`DEBUG PAUSE`, StrCat(`hEdit = `, hEdit, @CRLF, `hMenu = `, hMenu, @CRLF)) ;***DEBUG LINE*** Cnts = DllCall(User32, long:"GetMenuItemCount", long:hMenu)-1 hSubs = '' For Cnt = 0 To Cnts hSub = DllCall(User32, long:"GetSubMenu", long:hMenu, long:Cnt) hSubs = ItemInsert(hSub, -1, hSubs, @TAB) Next Pause(`DEBUG PAUSE`, StrCat(`hSubs = `, @CRLF, StrReplace(hSubs, @TAB, @CRLF))) bb = BinaryAlloc(64) ; MF_BYPOSITION = &H400& = 1024 ; int GetMenuString( ; HMENU hMenu, // handle to the menu ; UINT uIDItem, // menu item identifier ; LPTSTR lpString, // pointer to the buffer for the string ; int nMaxCount, // maximum length of the string ; UINT uFlag // menu flags ; ); hFile = ItemExtract(1, hSubs, @TAB) Len = DllCall(User32, long:"GetMenuStringA", long:hFile, long:1, lpbinary:bb, long:64, long:1024) BinaryEodSet(bb, Len) Str = BinaryPeekStr(bb, 0, Len) BinaryFree(bb) Pause(`DEBUG PAUSE`, StrCat(`hFile = `, hFile, @CRLF, `Len = `, Len, @CRLF, `Str = `, Str, @CRLF)) ;***DEBUG LINE*** Exit
Article ID: W17001
File Created: 2007:07:03:14:27:32
Last Updated: 2007:07:03:14:27:32