Jump to content
autoitxp

onAutoItExitRegister() getting empty value

Recommended Posts

autoitxp
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <WinAPIConv.au3>
#include <WindowsConstants.au3>

Global $g_hEdit

OnAutoItExitRegister("_OnExit")
 Example()


Func Example()
    Local $hGUI
    
    $hGUI = GUICreate("Edit Create", 400, 300)
    $g_hEdit = _GUICtrlEdit_Create($hGUI, "This is a test" & @CRLF & "Another Line", 2, 2, 394, 268)
    GUISetState(@SW_SHOW)

    _GUICtrlEdit_AppendText($g_hEdit, @CRLF & "Append to the end?")

   
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example

    Func _OnExit()
    MsgBox(0, '' , _GUICtrlEdit_GetText(  $g_hEdit))
    EndFunc

I'm using windows 10 _OnExit function _GuictrlEdit_GetText() getting empty string ? what is issue ?
 

Share this post


Link to post
Share on other sites
autoitxp

Thanks for correction 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×