Obtient les coordonnées d'écran d'un ComboBox dans son état déroulé
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetDroppedControlRect ( $hWnd )
$hWnd | Handle du contrôle |
_GUICtrlComboBoxEx_GetDroppedControlRectEx
#include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $aRect, $hCombo ; Crée une GUI $hGUI = GUICreate("ComboBoxEx Get Dropped Control Rect", 400, 300) $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100) GUISetState(@SW_SHOW) ; Ajoute des fichiers _GUICtrlComboBoxEx_BeginUpdate($hCombo) _GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES, False) _GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES) _GUICtrlComboBoxEx_BeginUpdate($hCombo) _GUICtrlComboBoxEx_AddDir($hCombo, @WindowsDir & "\*.exe") _GUICtrlComboBoxEx_EndUpdate($hCombo) _GUICtrlComboBoxEx_EndUpdate($hCombo) ; Obtient Dropped Control Rect $aRect = _GUICtrlComboBoxEx_GetDroppedControlRect($hCombo) MsgBox($MB_SYSTEMMODAL, "Information", "Dropped Control Rect: " & StringFormat("[%d][%d][%d][%d]", $aRect[0], $aRect[1], $aRect[2], $aRect[3])) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example