Hello!

I worked on Syntax-HL for my new editor.
It is a very early version and only NEW, SAVE, OPEN and of course syntax-hl - features are includet yet.

Check out label, string, number, opcode, comment and some more highlights...

It would ne nice if you can give me some feedback about bugs or anything you like.



HAND
:)
Posted on 2002-03-15 11:31:54 by Rennsemmel
Hi Rennsemmel

Very nice looking.
It does GPF on Win98SE just by typeing aaa.
Guess there is a bug in your HL routine.

Keep up your work.

KetilO
Posted on 2002-03-15 13:56:33 by KetilO
Rennsemmel: works great on xp here. overall, i like the layout and general design, but i would really like an option to change colors of the background and text and highlighting. i'm sure you probably already thought of that, but just thought i'd throw it out there anyway. keep up the good work!
Posted on 2002-03-16 10:54:59 by mc`
Hi
Unfortunately it crashes on my win95, when I open an asm file.
Check it on windows 9x
But the design is nice
Posted on 2002-03-16 13:00:16 by Duker
Hello

Thank you all for the reply!

First: I develope the editor under Win2k and it works fine there. It seems that there is a sh-bug under Win9x, i'll try to fix it.

@mc:Of course it'll get that option to change colors.
(BackGround, ForeGround, BeamColor, LineColor, Label, Coment, Number, Opcodes, String)


CU
Posted on 2002-03-16 15:02:26 by Rennsemmel
very nice looking editor. im hoping this will be better than Asm Editor. in the future i hope to see buttons in your toolbar that can be customized to fit my needs. also i would like to see something similar to asmedit, when there are assembly errors, those particular rows that contain the errors will be highlighted or pointed to some how.

also i wanted to know how you did the numbering bar. i did a handle spy and it appears to be all one richedit control. so how did u do this? i was tring to do something very similar except i was using 2 richedit controls and tring to sycronize them.

do you plan on releasing the source at all when your done? just wondering.
Posted on 2002-03-23 00:49:08 by smurf
Hi Rennsemmel,

looks really neat.
Keep up the good work.

:alright:
Posted on 2002-03-23 07:31:52 by PiT
@smurf:

The numbering bar is a very easy to code.
As you already found out I used only one RichEdit to create it.
First I created the space with EM_SETMARGINS to draw the numbering bar there. Then I subclassed the RichEdit and used WM_PAINT to act on the paint-event. Now you can draw whatever you like in the richedit. I used the API "GetClientRect" to find out the size of the RE, "FillRect" to draw a rectangle on the left and right side and "DrawText" to draw the line index.
Of course you should also update your RE if the notify "SELCHANGE" occurs.

Here is the source code I use (Tasm32):

CreateBeam PROC
Call GetClientRect, hEdit, offset rct

Mov dword ptr , 0
Mov dword ptr , 0
Push BeamWidth
Pop dword ptr
Dec dword ptr
Push rct.rcBottom
Pop dword ptr
Call CreateSolidBrush, ec.ecBeam
Mov DDummy, eax
Call FillRect, hEditDC, offset Buffer, eax

Mov eax, BeamWidth
Dec eax
Mov dword ptr , eax
Inc dword ptr
Call CreateSolidBrush, ec.ecLine
Push eax
Call FillRect, hEditDC, offset Buffer, eax

Inc dword ptr
Add dword ptr , 6
Call CreateSolidBrush, ec.ecBack
Call FillRect, hEditDC, offset Buffer, eax

Mov eax, rct.rcRight
Sub eax, 0Ah
Mov dword ptr , eax
Inc eax
Mov dword ptr , eax
Pop ecx
Call FillRect, hEditDC, offset Buffer, ecx
Inc dword ptr
Push rct.rcRight
Pop dword ptr
Call FillRect, hEditDC, offset Buffer, DDummy

Call SendMessageA, hEdit, EM_EXGETSEL, 0, offset charg
Call SendMessageA, hEdit, EM_POSFROMCHAR, charg.cpMin, 0
Shr eax, 16
Cmp ax, 1000000000000000b
Jae @@CreateBeam_END
Mov rct.rcTop, eax
Add eax, FontLogicalHeight
Mov rct.rcBottom, eax
Mov rct.rcLeft, 0
Mov eax, BeamWidth
Dec eax
Mov rct.rcRight, eax

Call CreateSolidBrush, ec.ecHLBeam
Call FillRect, hEditDC, offset rct, eax
Call SendMessageA, hEdit, EM_EXLINEFROMCHAR, 0, -1
Inc eax
Call Int2Str, eax, offset Buffer+1
Call SelectObject, HEditDC, hEditFont
Call SetTextColor, hEditDC, ec.ecLI
Call SetBkColor, hEditDC, ec.ecHLBeam
Call DrawTextA, hEditDC, offset Buffer+1, -1, offset rct, DT_CENTER
@@CreateBeam_END:
Ret
CreateBeam ENDP

dunno if it is useful for you..but who cares :)

Have a nice day!
Posted on 2002-03-25 06:40:09 by Rennsemmel