kcvinu Posted October 3, 2015 Posted October 3, 2015 (edited) Hi all,I have got a code snippet from Scintilla's website. The code is for creating a scintilla control in visual basic. I have altered it and did some experiment with it in AutoIt. After some failed attempts, i got succeeded in creating a simple scintilla cotrol in my gui. That experiement raises a lot of questions in my mind. Some of them are i am asking.1. So we are cretaing scintilla as a child window ?. I thought that it is a control. 2. No.. not any more. This is my code. I am seeking guidance and advices to learn more about this. Thanks in advance.#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <SendMessage.au3> Local $h__MainGUI = GUICreate("Window", 500, 400, -1, -1) GUISetState() Local $h__THisGUI = WinGetHandle($h__MainGUI) Local Const $SCI_START = 2000 Local Const $SCI_ADDTEXT = $SCI_START + 1 Local Const $SCI_SETSELBACK = $SCI_START + 68 Local $h__sciDLL = _WinAPI_LoadLibrary("E:\2014 Softwares\KE editor\SciLexer.dll") Local $h__sciWnd = _WinAPI_CreateWindowEx($WS_EX_CLIENTEDGE, "Scintilla", "TEST",BitOR($WS_CHILD, $WS_VISIBLE),0,0,480,380,$h__THisGUI,0) _SendMessageA($h__sciWnd, $SCI_SETSELBACK, 1 ) _SendMessageA($h__sciWnd, $SCI_ADDTEXT, 16, "This is Vinod") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 3, 2015 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Danyfirex Posted October 3, 2015 Posted October 3, 2015 (edited) Au3Info can tell you that. the dll internally first register an Scintilla class using RegisterClassExW then use RegisterClassExA to create the window\control.Saludos Edited October 3, 2015 by Danyfirex kcvinu 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
kcvinu Posted October 3, 2015 Author Posted October 3, 2015 @Danyfirex Thanks. Let me check it with Au3Info. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Danyfirex Posted October 3, 2015 Posted October 3, 2015 It create an Edit Control. Saludos kcvinu 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
kcvinu Posted October 3, 2015 Author Posted October 3, 2015 Yes. And we can treat it as our own control in that GUI. Now, i am reading the documentation. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Danyfirex Posted October 3, 2015 Posted October 3, 2015 Yes Look:#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <SendMessage.au3> Global Const $__EDITCONSTANT_WM_SETTEXT = 0x000C Local $h__MainGUI = GUICreate("Window", 500, 400, -1, -1) GUISetState() Local $h__THisGUI = WinGetHandle($h__MainGUI) Local Const $SCI_START = 2000 Local Const $SCI_ADDTEXT = $SCI_START + 1 Local Const $SCI_SETSELBACK = $SCI_START + 68 Local $h__sciDLL = _WinAPI_LoadLibrary("SciLexer.dll") Local $h__sciWnd = _WinAPI_CreateWindowEx($WS_EX_CLIENTEDGE, "Scintilla", "TEST",BitOR($WS_CHILD, $WS_VISIBLE),0,0,480,380,$h__THisGUI,0) _SendMessageA($h__sciWnd, $SCI_SETSELBACK, 1 ) _SendMessageA($h__sciWnd, $SCI_ADDTEXT, 16, "This is Vinod") _GUICtrlEdit_SetText($h__sciWnd,"Hola Mundo. AutoIt Rocks") While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GUICtrlEdit_SetText($hWnd, $sText) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) _SendMessage($hWnd, $__EDITCONSTANT_WM_SETTEXT, 0, $sText, 0, "wparam", "str") EndFunc ;==>_GUICtrlEdit_SetTextSaludos kcvinu 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
kcvinu Posted October 3, 2015 Author Posted October 3, 2015 Documentation says that to use WM_NOTIFY message to work with scinitlla control. They gave an example c++ code to do it. But i just check it with an ordianry WM_COMMAND function in GUIRegisterMsg. As if it s an edit control in my gui. It worked, but it gave output twice to me. I don't know why. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
kcvinu Posted October 3, 2015 Author Posted October 3, 2015 @Danyfirex Please tell me about the const $__EDITCONSTANT_WM_SETTEXT. help file says that it is "Msg to send to control (Number). And in the example they used $WM_SYSCOMMAND. I am confused a little. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Danyfirex Posted October 3, 2015 Posted October 3, 2015 Documentation says that to use WM_NOTIFY message to work with scinitlla control. They gave an example c++ code to do it. But i just check it with an ordianry WM_COMMAND function in GUIRegisterMsg. As if it s an edit control in my gui. It worked, but it gave output twice to me. I don't know why.Show your code @Danyfirex Please tell me about the const $__EDITCONSTANT_WM_SETTEXT. help file says that it is "Msg to send to control (Number). And in the example they used $WM_SYSCOMMAND. I am confused a little.It's just for send text to a control https://msdn.microsoft.com/en-us/library/windows/desktop/ms632644(v=vs.85).aspxSaludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Developers Jos Posted October 3, 2015 Developers Posted October 3, 2015 (edited) Pretty sure somebody else has create an editor in AutoIt using Scintilla and posted about it in the forum. Maybe look for that.Also ISN AutoIt Studio is based on Scintilla.Jos Edited October 3, 2015 by Jos kcvinu 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Danyfirex Posted October 3, 2015 Posted October 3, 2015 (edited) @Jos can you tell me witch command use SciTE when show this kind of tooltip with scroll. (I'm don want to reverse SciTE :S) it makes my screen driver fails... Saludos Edited October 3, 2015 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Developers Jos Posted October 3, 2015 Developers Posted October 3, 2015 Do you mean how to configure that tooltip in SciTE?Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Danyfirex Posted October 3, 2015 Posted October 3, 2015 No no. I mean what it use internally. maybe how to reproduce that using sendmessage. then I will look inside to check that message because I think It should be a predefined message. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Developers Jos Posted October 3, 2015 Developers Posted October 3, 2015 SciTE will show the Calltips when you send IDM_SHOWCALLTIP to it.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Danyfirex Posted October 3, 2015 Posted October 3, 2015 the one with scrollbar? Saludos. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Developers Jos Posted October 3, 2015 Developers Posted October 3, 2015 That is the same message, but obviously there need to be multiple options in au3.api for it to trigger that version.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Danyfirex Posted October 3, 2015 Posted October 3, 2015 I see. Thank you Jos. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
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