arcker Posted July 16, 2007 Author Share Posted July 16, 2007 i would like to continue, but i have no time for the rtf, i'll try the callback dll found in the autoitfeture request please post your function here, i'll try to merde it with mine asap i think this project have a great potential, but i can't be alone to do this any help will be welcome my first big wish on this project would be to make some tables : if rtf is available, so tables will be available too but i've to learn rtf syntax and it's a huge work, too big for me for now thx for your support -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
grham Posted July 16, 2007 Share Posted July 16, 2007 Ok In reality the code is not anything you couldn'nt do yourself. Theese are in fact your functions slightly modified: font size: Func _RichEdit_SetFontSize($hWnd, $Size , $iSelec = True) Local $tcharformat, $pCHARFORMAT $tcharformat = _tagCHARFORMAT2() _tagsetdata ($tcharformat, "cbSize", _taggetsize ($tcharformat)) _tagsetdata ($tcharformat, "dwMask", $CFM_SIZE) _tagsetdata ($tcharformat, "yHeight", $Size*20) $pCHARFORMAT = _tagGetPtr ($tcharformat) Return _API_SendMessage ($hWnd, $EM_SETCHARFORMAT, $iSelec, $pCHARFORMAT) EndFunc Remark: the $Size parametr is (the same?) number as in all text editors - for example: _RichEdit_SetFontSize($hWnd, 12 , $iSelec = True) -----> size 12 I made in my (your adapted) gui a font size selector (combo) in the toolbar and a functionality for it that actualize the font size selector and the font name selector (combo) "on fly" by clicking over the text (it gets the format of the text) and sets the values to the combos. and strike out: Func _RichEdit_SetStrikeOut($hWnd, $hBold = False, $iSelec = 0x01) Local $tcharformat, $pCHARFORMAT $tcharformat = _tagCHARFORMAT2() _tagsetdata ($tcharformat, "cbSize", _taggetsize ($tcharformat)) _tagsetdata ($tcharformat, "dwMask", $CFM_STRIKEOUT) If $hBold Then _tagsetdata ($tcharformat, "dwEffects", $CFE_STRIKEOUT) Else _tagsetdata ($tcharformat, "dwEffects", 0) EndIf $pCHARFORMAT = _tagGetPtr ($tcharformat) Return _API_SendMessage ($hWnd, $EM_SETCHARFORMAT, $iSelec, $pCHARFORMAT) EndFunc About reading the text as plane text: Gafrost uses the RichEdit20.dll to get the text. See Rich Edit Control in Search He is working on it (I hope) Link to comment Share on other sites More sharing options...
arcker Posted July 16, 2007 Author Share Posted July 16, 2007 mmm i've recoded it to make it work with new struct... but format doesn't work anymore so i have to debug it, to includeyour function, and i'll repost it, sooner or later -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
arcker Posted July 25, 2007 Author Share Posted July 25, 2007 updated ,see first post supports load & save callback functions -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
grham Posted July 29, 2007 Share Posted July 29, 2007 (edited) updated ,see first postsupports load & save callback functionsThat's great!Btw. do you mind it would be possible to save it to (and to load it from) a variable (without file writing)?(for example for combining, adding ..... a text from 2 rich edit controls or for reading and putting a text "on fly") Edited July 29, 2007 by grham Link to comment Share on other sites More sharing options...
arcker Posted July 30, 2007 Author Share Posted July 30, 2007 (edited) yes it's possible. I've juste posted a save / load example because it's the mort common option. you can insert some text at the cursor position for example. for combining from to rich edit, you have to be careful with the rtf, but you can combine, modify the rtf source with the good tags, and then inserts it. Edited July 30, 2007 by arcker -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
Zedna Posted November 22, 2007 Share Posted November 22, 2007 I like your A3LRichEdit.au3 arcker!! I think merging/finishing your A3LRichEdit.au3 with Gary's GuiRichEdit.au3 can be great new standard GuiRichEdit UDF. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jennico Posted December 9, 2007 Share Posted December 9, 2007 (edited) hello arcker !can you please rewrite your program since AutoIt3Lib by pauli is not downloadable anymore ? gary says that all the functions are integrated in the new releases and removed the link.when i try to open it, the error message is: a3lmenu.au3 is missing. i presume, this is part of AutoIt3Lib.thanx for updatingbtw: i would love to integrate your script in my unicode keyboards, i badly need a richedit for it. Edited December 9, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
JustinReno Posted December 10, 2007 Share Posted December 10, 2007 Why not just make your own? Link to comment Share on other sites More sharing options...
jennico Posted December 10, 2007 Share Posted December 10, 2007 (edited) that would be "plan b". i was thinking to do that but i am not able to fight on several frontiers and get a script ready in reasonable time. would be nice to minimize the problems to be solved. :-) Edited December 10, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
jennico Posted December 10, 2007 Share Posted December 10, 2007 oh wow !i just noticed that all of the richedit examples in the forum do not work anymore with the new 3.2.10.0. this is really bad done ! they have also changed lots of udf's from the last versions, so you have to struggle real hard to get your scripts work again. i never use betas, only official releases, so i thought this would never happen !too bad ! Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
arcker Posted December 10, 2007 Author Share Posted December 10, 2007 yeah i will redo it now that callback is implemented, i have some reason to update it. -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
grham Posted December 10, 2007 Share Posted December 10, 2007 (edited) yeah i will redo itnow that callback is implemented, i have some reason to update it.That's good, I only wanted to tell you that I rewrote it for me, added some thingsand it works. If it interests you, tell me.Or not - that's on you. Edited December 10, 2007 by grham Link to comment Share on other sites More sharing options...
arcker Posted December 10, 2007 Author Share Posted December 10, 2007 if it works with latest version, please post because i don't manage to make it work with load and save... send it and i will try to merge all of the useful tools. -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
grham Posted December 10, 2007 Share Posted December 10, 2007 (edited) Edited to delete the link because of a bug. Edited December 14, 2007 by grham Link to comment Share on other sites More sharing options...
arcker Posted December 10, 2007 Author Share Posted December 10, 2007 ok as i can see, you use the old dllcallback method it's where i'm stuck -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
grham Posted December 10, 2007 Share Posted December 10, 2007 (edited) okas i can see, you use the old dllcallback methodit's where i'm stuck yes, I tried it with the included dllcallback and I didn't make it to work Edited December 10, 2007 by grham Link to comment Share on other sites More sharing options...
jennico Posted December 11, 2007 Share Posted December 11, 2007 doesn't do it to me. missing winapi.au3. can someone make it complete with all includes ? i downgraded to v3.2.8.1 meanwhile. at least the edit boxes are working again. not so in versions 3.2.10.x. i reported a bug and they will fix the edit box bug. but don't know when. so best if someone packs together all needed au3's. j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
fanoI Posted December 23, 2007 Share Posted December 23, 2007 I'm using your example and the A3LRichEdit Lib... and it works I have only 2 problem:Don't Scroll verticall or orizzontally... AutoItPad do it... I looked deeply in your code but I haven't found the magic code to scroll. Can You help me? My RichEdit will be read only and I use the readonly function for this but I like a lot to hide the cursor (that is not the mouse cursor but the blinking |) Is this possible?This my GuI code... I've done something wrong?expandcollapse popup#include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <WinAPI.au3> #include<guiedit.au3> #include"A3LRichEdit.au3" Global Const $DEBUGGING = True Global $EditField Global $iGUIH Global $iGUIW CreateGUI("1.0") MsgLoop() Func MsgLoop() Debug("Questo è un messaggio di Debug") LogError("Questo è un messaggio di Errore") LogMsg("Questo è un messaggio che non importa a Nessuno!") While (GUIGetMsg() <> $GUI_EVENT_CLOSE) ; nothing to do here... for now WEnd EndFunc ; ==================================================================================================== =========================== ; Creates a GUI for the server ; ==================================================================================================== =========================== Func CreateGUI($version) Local $hGUI $hGUI = GUICreate("Send2Lphant Versione: " & $version, 600, 400, -1, -1, $WS_OVERLAPPEDWINDOW) $library = _WinAPI_LoadLibrary ("MSFTEDIT.DLL");load the library for the 4.1 version (it's good to know) $RichEditClass = "RichEdit50W";Name of the 4.1 Rich Edit Control ;****************************************************************************************** ;Create the RichEdit Control ;****************************************************************************************** $EditField = _WinAPI_CreateWindowEx ($WS_EX_CLIENTEDGE, $RichEditClass, "", BitOR($WS_CHILD, $ES_WANTRETURN, $ES_NOHIDESEL, $WS_HSCROLL, $WS_VSCROLL, $WS_VISIBLE, $ES_MULTILINE, $ES_AUTOHSCROLL, $ES_AUTOVSCROLL), 10, 10, 580, 380, $hGUI) ;$EditField = GUICtrlCreateEdit("", 0, 0, _WinAPI_GetClientWidth($hGUI), _WinAPI_GetClientHeight($hGUI), $ES_READONLY) ;$EditField = GUICtrlCreateLabel("", 0, 0, _WinAPI_GetClientWidth($hGUI), _WinAPI_GetClientHeight($hGUI)) ; Se si setta lo stile $ES_READONLY il background diventa grigio, lo rimettiamo bianco ;GUICtrlSetBkColor($EditField, $CLR_WHITE) ; GUICtrlSetBkColor($iMemo, 0xffffff) ; Bianco ;GUICtrlSetFont($EditField, 9, 400, 0, "Courier New") GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUISetState() $iGUIH = _WinAPI_GetClientHeight ($hGUI) $iGUIW = _WinAPI_GetClientWidth ($hGUI) _richedit_seteventmask ($EditField, BitOR($ENM_SCROLL, $ENM_CHANGE)) EndFunc ; ==================================================================================================== =========================== ; Scrive messaggi di debug sul display ; ==================================================================================================== =========================== Func Debug($sMessage) if not $DEBUGGING then return _RichEdit_SetColor($EditField, $CLR_GRAY) _RichEdit_AddLine($EditField, $sMessage) ;GUICtrlSetData($EditField, $sMessage & @CRLF, 1) ;GUICtrlSetColor ($EditField, $CLR_GRAY) EndFunc ; ==================================================================================================== =========================== ; Scrive messaggi di Errore sul display ; ==================================================================================================== =========================== Func LogError($sMessage) ;$winError = StringStripWS(_WinAPI_GetLastErrorMessage(), 2) $sMessage &= " (" & StringStripWS(_WinAPI_GetLastErrorMessage(), 2) & ")" _RichEdit_SetColor($EditField, $CLR_RED) _RichEdit_AddLine($EditField, $sMessage) ;GUICtrlSetColor ($EditField, $CLR_GREEN) EndFunc ; ==================================================================================================== =========================== ; Scrive messaggi sul display ;; ==================================================================================================== =========================== Func LogMsg($sMessage) _RichEdit_SetColor($EditField, $CLR_BLACK) _RichEdit_AddLine($EditField, $sMessage) ;GUICtrlSetData($EditField, $sMessage & @CRLF, 1) ;GUICtrlSetColor ($EditField, $CLR_BLACK) EndFunc ; I don't know if this code is needed... It don't scroll and without my program already worked... Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) Local $iNewH, $iNewW, $iDltH, $iDltW, $iConH, $iConW ; Get the new GUI size $iNewW = _WinApi_LoWord ($ilParam) $iNewH = _WinApi_HiWord ($ilParam) ; Get the delta change in the GUI size $iDltW = $iNewW - $iGUIW $iDltH = $iNewH - $iGUIH ; Resize the control $iConW = _WinAPI_GetWindowWidth ($EditField) + $iDltW $iConH = _WinAPI_GetWindowHeight ($EditField) + $iDltH _WinAPI_SetWindowPos ($EditField, 0, 0, 0, $iConW, $iConH, BitOR($SWP_NOMOVE, $SWP_NOZORDER)) ; Update GUI size variables $iGUIW = $iNewW $iGUIH = $iNewH ; Make sure we let AutoIt receive the message too Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZEThanks for your help...fanoI Link to comment Share on other sites More sharing options...
fanoI Posted December 23, 2007 Share Posted December 23, 2007 (edited) The first problem is solved... but I don't know in that way it is I deleted text, cleaned the code, played with an old version of RichEdit and now the scrollbar appears... The point 2 instead is unresolved... I've searched on the forum and MSDN but "cursor" is mouse cursor I never find referring to the Text cursor (maybe is this not its name?)... I think will be beautiful that when RichEdit is in readonly mode the blinking | is hided... is this possible? fanoI Edited December 23, 2007 by fanoI 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