RaEdit.dll - how set font ?

Started by aurelVZM, June 05, 2009, 06:39:11 PM

Previous topic - Next topic

aurelVZM

Hi all...
I'm new here and new in assemblers.
Also i'm in first place basic programmer but i really like asemblers .
I'm author of Aurel Basic - small basic like interpreter written in Creative Basic.
Creative Basic can load external dll-s.
My code editor currentlyy dont have syntax coloring and i decide that i try use
RaEdit.dll control for this job.Control is realy small and good.
I also try scintilla which is very complex and big.
So i try load raedit.dll with classic win api Loadlibrary which work ok
and also create control on window with CreateWindowEx.
And control is loaded and placed.
I only have example from VB which i use as starting point.
I also try change system font to Courier New with Sendmessage but dont work properly
becose i do something wrong(i think)
I do it on this way:
SendMessage (w1,REM_SETFONT,6,"Courier New",RaID) 
Any help will be aprecieted?
What i do wrong?
And one more question.
How i must set (adjust) Raedit which will be showed as all xp richedit types ,i mean like
FBedit with xp scrollbars?

Thanks advance
aurel...

aurelVZM

Hi again...
I succsesfuly change control font but without REM_SETFONT.
This constant just dont respond I dont know why.
So i decide use winapi CreateFontA and standard win constant WM_SETFONT and
this way work.
'create font for RaEdit control
fsize=16
cfont=CreateFontA(fsize,0,0,0,400,0,0,0,1,0,0,0,2,"Courier New")
SendMessage(w1,WM_SETFONT,cfont,0,RaID)

Now i want change backcolor of control which is currently light yellow to white.
But how i can do this becose REM_SETCOLOR dont work?
Is there any way with win api?

UtillMasm

...
xxx dont work
...
done, you have successfuly cheat yourself.
:wink

aurelVZM

Heh :wink
You right , but is there someone who can explain to me
how work this raedit constants?

KetilO

Hi aurelVZM

Included is a FreeBASIC example.

KetilO

[attachment deleted by admin]

aurelVZM

Thanks Ketil on example.
I'm sorry but i must tell that raedit constants dont work with Creative Basic. :red
But good thing - work with Emergance basic well. :bg

Aurel

aurelVZM

Hi Keti...
Maby is my question boring but i must ask.
Why RaEdit.dll is not selfregistering like scilexer.dll?
l

KetilO

Hi aurelVZM

scilexer.dll is probably an ActiveX component.
RAEdit.dll is a windows dll and must be loaded.

KetilO