Jump to content

rich edit control (another?) - text format, color, links ...


Recommended Posts

Posted (edited)

thx valery, it works

what i don't understand is that it doesn't work in AutoitPad....

grrrr

BTW, i say it again but, tables is really awesome. It could be en entire UDF on its own.

edit :

you use readfile instead of _Winapi_readfile. It's not the method of using streamin because for too large file it's really slow.

Edited 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]
Posted

btw. If you replace this line in file "RichEdit - exemple_912.au3"

$Input = GUICtrlCreateInput("", 30, $Height-120, 450, 30)

$RichEdit = _GuiCtrl_RichEdit_Create($Main_GUI, 30, 170, 450, 350)

to

$RichEdit = _GuiCtrl_RichEdit_Create($Main_GUI, 30, 170, 450, 250)

$Input = _GuiCtrl_RichEdit_Create($Main_GUI, 30, $Height-220, 450, 130)

then can see internal Drag&Drop working between $RichEdit and $Input controls, too.

================================================

Under XP+SP1 you can use new options of RichEdit50W.

ie

http://www.codeproject.com/KB/edit/CRichEd...aspx?print=true

(build-in Unicode <-> ANSI conversion, popup menu an so on)

The point of world view

Posted (edited)

Thank you very much Valery, it works! :) jujujuju

(I thought that you changed something more than that)

btw. richedit50w is not a classname "declared" in Msftedit.dll?

-

$RichEdit = _GuiCtrl_RichEdit_Create($Main_GUI, 30, 170, 450, 250)

$Input = _GuiCtrl_RichEdit_Create($Main_GUI, 30, $Height-220, 450, 130)

are two rich edit controls. But it's also interessant to copy-paste between two

"different" apps (like here x Open office). For example you can set double underlined font

and here you wan't see it but copy it to Open office and it's really double underlined.

But MSDN sais it.

The "strange" thing is, that MSDN sais that REC v. previous to 3

aligns left instead of justify. But I saw that v3 and higher too.

PS Is it good to put it in the first post? (without dllcallback.au3 info or script changed)?

ps2 to arcker - good to know, i didn't know about _winapi-readfile.

Edited by grham
Posted

YEAAAhh

finally it works

it was really, really simple

the problem is that _winapi_readfile superseed the real function.

so i make the correct dllcall.

you can test the modification here

AutoItPad

-- 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]
Posted

hmm, what am i doing wrong when, when im trying to change the font of some text the font of all the text in the edit changes??

[font="Impact"]Never fear, I is here.[/font]

Posted

  Alek said:

hmm, what am i doing wrong when, when im trying to change the font of some text the font of all the text in the edit changes??

What is exactly what you change? Color, size, fontname .....?

and how do you change it?

Posted

  grham said:

What is exactly what you change? Color, size, fontname .....?

and how do you change it?

i want to change the font and size of the font.

i used

_RichEdit_SetFont($Edit, -1, -1, -1, "Times New Roman", 8)
_RichEdit_AddText($Edit, "test1, ")
_RichEdit_SetFont($Edit, -1, -1, -1, "Times New Roman", 18, 0)
_RichEdit_AddText($Edit, "test2")

[font="Impact"]Never fear, I is here.[/font]

Posted (edited)

  Alek said:

i want to change the font and size of the font.

i used

_RichEdit_SetFont($Edit, -1, -1, -1, "Times New Roman", 8)
_RichEdit_AddText($Edit, "test1, ")
_RichEdit_SetFont($Edit, -1, -1, -1, "Times New Roman", 18, 0)
_RichEdit_AddText($Edit, "test2")
just don't put the final 0 (i know it's not documented, because I used

it instead of writing 4 lines to change the font)

Expl.: 1. par. 4 numbers (0,1) in this order: bold, italic, underline, strikeout

or -1 = no changes

2. par. font color (or -1 = no changes)

3. par. font background color (or -1 = no changes)

4. par. font name

5. par. font size

6. par. optional: 1 (default - selection), 0 whole control

Edited by grham
Posted

  grham said:

just don't put the final 0 (i know it's not documented, because I used

it instead of writing 4 lines to change the font)

Expl.: 1. par. 4 numbers (0,1) in this order: bold, italic, underline, strikeout

or -1 = no changes

2. par. font color (or -1 = no changes)

3. par. font background color (or -1 = no changes)

4. par. font name

5. par. font size

6. par. optional: 1 (default - selection), 0 whole control

tanks, that was the problem :)

[font="Impact"]Never fear, I is here.[/font]

Posted

OMG, OMFG, SCROLLBARS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:):D:D

Ty, ty

  • 6 years later...
Posted

Can't get this to run:

rich_editInclude_RichEdit_912.au3 (41) : ==> Variable used without being declared.:
Global Const $EM_AUTOURLDETECT = $WM_USER + 91
Global Const $EM_AUTOURLDETECT = ^ ERROR
  • Moderators
Posted

drego,

Read my reply here and please do not necro-post in every RichEdit thread on the forum - the same probem will probably exist for all of them. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...