#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("Browse Button inside Input", 320, 100)
$aPath_Inpt = _GUICtrlCreateBttnInput("C:\", 10, 60, 300, 22)
GUISetState(@SW_SHOW, $hGUI)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $aPath_Inpt[0] ;Button event
$sFile = FileOpenDialog("Open file as", "", "All supported files (*.*)", 0, "", $hGUI)
If Not @error Then GUICtrlSetData($aPath_Inpt[1], $sFile)
EndSwitch
WEnd
Func _GUICtrlCreateBttnInput($sText, $iLeft, $iTop, $iWidth, $iHeight)
Local $nBtn, $nInpt, $aRet[2]
$iWidth -= 20
$nBtn = GUICtrlCreateButton("...", $iWidth + 8, $iTop + 1, 20.5, $iHeight - 1.5)
GUICtrlCreateInput("", $iWidth + 9, $iTop, 20, $iHeight, BitOR($GUI_SS_DEFAULT_INPUT, $ES_READONLY, $WS_CLIPSIBLINGS))
GUICtrlSetBkColor(-1, 0xFFFFFF)
$nInpt = GUICtrlCreateInput($sText, $iLeft, $iTop, $iWidth, $iHeight, BitOR($GUI_SS_DEFAULT_INPUT, $WS_CLIPSIBLINGS))
$aRet[0] = $nBtn
$aRet[1] = $nInpt
Return $aRet
EndFunc