On the version TC x32 text can be obtained.
On the version TC x64, the text is not returned.
The problem with _GUICtrlMenu_GetItemText () for x64
Is there a solution? Perhaps there is another way to get the text of the drop-down menu item ...
Code: Select all
#include <WinAPI.au3>
#include <Constants.au3>
#include <GuiMenu.au3>
$Struct=DllStructCreate($tagPOINT)
Do
Dim $aPos=MouseGetPos(),$0=DllStructSetData($Struct,'x',$aPos[0])+DllStructSetData($Struct,'y',$aPos[1]),$hWnd=_WinAPI_WindowFromPoint($Struct)
If '#32768'=_WinAPI_GetClassName($hWnd)Then
Sleep(9)
Dim $hMenu=_SendMessage($hWnd,481,0,0),$iIndex=_GUICtrlMenu_MenuItemFromPoint(0,$hMenu)
If $iIndex>-1 Then
$sText=_GUICtrlMenu_GetItemText($hMenu,$iIndex)
ToolTip('Number: '&$iIndex&@CRLF&'Text :'&$sText,0,0,'Info')
EndIf
EndIf
Until Sleep(99)-1
Image: http://tc-image.3dn.ru/Image/tc/0/tc_pr_64.png