lequithienan Posted October 23, 2009 Share Posted October 23, 2009 I create 1 guil with _GuiCtrlCreateEdit but i cannot using GuiCtrlSetData to form . Plz help me Link to comment Share on other sites More sharing options...
Authenticity Posted October 23, 2009 Share Posted October 23, 2009 (edited) AutoIt uses the control ID as opposed to the return value of _GUICtrl*_Create()'s return value which is a handle. Either use _WinAPI_GetDlgCtrlID() to get the control id and use this ID for the control (not control's items such as listview's, etc..) and use that control ID instead. a Simpler method would be to create the control using the native built in functions of AutoIt the start with GUICtrlCreate* and then you can get the control's handle using GUICtrlGetHandle().Edit: Moi mistake. Just ignore my mumbling... If you're working only with handle you should use the control's UDF library. Edited October 23, 2009 by Authenticity Link to comment Share on other sites More sharing options...
lequithienan Posted October 24, 2009 Author Share Posted October 24, 2009 I don't understand you told , you can show example ( . I cannot using guictrlsetdata with _GUICtrlEdit_Create Link to comment Share on other sites More sharing options...
Authenticity Posted October 24, 2009 Share Posted October 24, 2009 If you want to use the built in functions AutoIt has to offer you need to create the control using one of the GUICtrlCreate*() functions. You can later get the handle to this control and work with it on different UDF library. Example: #include <GUIConstantsEx.au3> #include <GUIEdit.au3> $hGUI = GUICreate("Title", 200, 200) $Edit = GUICtrlCreateEdit("Line1" & @CRLF & "Line2" & @CRLF & "Line3", 20, 20, 160, 160) $hEdit = GUICtrlGetHandle(-1) GUISetState() MsgBox(0x40, "Info", GUICtrlRead($Edit)) _GUICtrlEdit_AppendText($hEdit, @CRLF & "Line 4" & @CRLF & "Line 5") Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Exit If you choose however to create the control using _GUICtrlEdit_Create() instead, you can't manipulate the control using AutoIt's GUICtrl* functions. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now