UDF > GUI > GuiMenu >


_GUICtrlMenu_FindParent

Obtient la fen�tre � laquelle appartient un menu

#include <GuiMenu.au3>
_GUICtrlMenu_FindParent ( $hMenu )

Param�tre

$hMenu Handle du contr�le Menu

Valeur de retour

Succ�s: Retourne le handle de la fen�tre.
�chec: Retourne 0.

En relation

_GUICtrlMenu_GetMenu

Exemple

#include <GuiMenu.au3>

Example()

Func Example()
    Local $hWnd, $hMain

    Run("notepad.exe")
    WinWaitActive("[CLASS:Notepad]")
    $hWnd = WinGetHandle("[CLASS:Notepad]")
    $hMain = _GUICtrlMenu_GetMenu($hWnd)

    ; Affiche que le handle du Menu appartient � Notepad
    Writeln("Notepad handle: 0x" & Hex($hWnd))
    Writeln("Menu Parent ..: 0x" & Hex(_GUICtrlMenu_FindParent($hMain)))
EndFunc   ;==>Example

; Ecrit une ligne de texte dans Notepad
Func Writeln($sText)
    ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc   ;==>Writeln