Hi KetilO,
How to know that the caret position is in the comment area.
For example: if the caret is in the comment area, when I type some charactors, the charactors is in comment color and italic. How to know the charactor font is italic and in comment color.

I request this because the IDE has to disable some function (eg AutoCorrect & IntelliSense) in comment area.

Thanks
Posted on 2004-07-21 09:17:44 by QS_Ong
Hi QS_Ong



REM_ISCHARPOS equ REM_BASE+46 ;wParam=CP, lParam=0, returns 1 if comment block, 2 if comment, 3 if string


KetilO
Posted on 2004-07-21 15:47:57 by KetilO
Hi KetilO, how can I know if a RAEdit control has got the input focus. Thanx!
Posted on 2004-07-24 09:32:38 by optimus
Hi optimus

Use GetFocus and then GetParent and check the returned handle.

KetilO
Posted on 2004-07-24 17:10:10 by KetilO
Will it be possible for RAEdit to integrate support for struct member name pop-up? It would be very great help if this comes true.
Posted on 2004-08-26 20:08:17 by optimus
Hi Optimus

RAEdit is a general code edit control. This means that things that are very dependant on language syntax will not be handled by RAEdit.

KetilO
Posted on 2004-08-30 06:00:25 by KetilO
Hi KetilO,

A serious bug on my Win98SE machine.

EDIT:

EM_LINELENGTH return value is wrong if character position is rather big. If I am not mistaken if it is greater 32767

A workaround is to use EM_GETLINE and get the return value but this is so slooooooooooooooow for my needs.

Can you fix this please?

Regards,

Antonis
Posted on 2004-09-26 18:18:45 by akyprian
Hi KetilO,
A bug in RAEdit:
text = ". . . . . . . . .
. . . ABC. . . .
. . . . . . . . ."

SendMessage(hREd,EM_EXGETSEL,0,#cr);
SendMessage(hREd,REM_ISCHARPOS,cr.cpMin,0);

When the caret is in the ABC, REM_ISCHARPOS should return 3 (in string), but it return 0.

Regards.
Posted on 2004-10-15 09:47:18 by QS_Ong
Hi akyprian

Can't find anything wrong here. It works on my Win98SE box.

Sometimes Win95, 98 or me strips off hi word from parameters. Try calling the wndproc without using SendMessage.

KetilO
Posted on 2004-10-20 04:27:20 by KetilO
Hi QS_Ong

You are right, it will return 0 since the analysis is line based.

KetilO
Posted on 2004-10-20 04:30:24 by KetilO
Hi KetilO,
Are you going to change this so that it return 3 :?:

Regards.
Posted on 2004-10-24 05:46:09 by QS_Ong
Hi KetilO,
In RAEdit, is there a way to delete whole line?
Or how to send message to RAEdit to hilight whole so that I can use EM_REPLACESEL to delete current line.

Regard
Posted on 2005-10-31 22:22:04 by QS_Ong
Hi QS_Ong

Theese are the commands taken from the advedit addin:

;Copy all
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
mov    chrgtmp.cpMin,0
mov    chrgtmp.cpMax,-1
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrgtmp
invoke SendMessage,ebx,WM_COPY,0,0
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg

;Copy current line
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_LINEFROMCHAR,chrg.cpMin,0
push    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
mov    chrgtmp.cpMin,eax
pop    eax
inc    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
.if eax==chrgtmp.cpMin
    mov    eax,-1
.endif
mov    chrgtmp.cpMax,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrgtmp
invoke SendMessage,ebx,WM_COPY,0,0
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg
invoke SendMessage,ebx,EM_SCROLLCARET,0,0

;Delete current line
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_LINEFROMCHAR,chrg.cpMin,0
push    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
mov    chrg.cpMin,eax
pop    eax
inc    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
.if eax==chrg.cpMin
    mov    eax,-1
.endif
mov    chrg.cpMax,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg
mov    buffer,0
invoke SendMessage,ebx,EM_REPLACESEL,TRUE,addr buffer

;Select current line
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_LINEFROMCHAR,chrg.cpMin,0
push    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
mov    chrg.cpMin,eax
pop    eax
inc    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
.if eax==chrg.cpMin
    mov    eax,-1
.endif
mov    chrg.cpMax,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg

;Delete to start of line
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_LINEFROMCHAR,chrg.cpMin,0
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
mov    chrg.cpMin,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg
mov    buffer,0
invoke SendMessage,ebx,EM_REPLACESEL,TRUE,addr buffer

;Delete to end of line
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_LINEFROMCHAR,chrg.cpMin,0
push    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
mov    chrgtmp.cpMin,eax
pop    eax
inc    eax
invoke SendMessage,ebx,EM_LINEINDEX,eax,0
.if eax==chrgtmp.cpMin
    mov    eax,-1
.else
    dec    eax
.endif
mov    chrgtmp.cpMax,eax
mov    eax,chrg.cpMin
mov    chrgtmp.cpMin,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrgtmp
mov    buffer,0
invoke SendMessage,ebx,EM_REPLACESEL,TRUE,addr buffer

;Delete to start of word
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_FINDWORDBREAK,WB_MOVEWORDLEFT,chrg.cpMin
.if eax && eax==chrg.cpMin
    dec    eax
.endif
mov    chrg.cpMin,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg
mov    buffer,0
invoke SendMessage,ebx,EM_REPLACESEL,TRUE,addr buffer

;Delete to end of word
invoke SendMessage,ebx,EM_EXGETSEL,0,addr chrg
invoke SendMessage,ebx,EM_FINDWORDBREAK,WB_MOVEWORDRIGHT,chrg.cpMin
.if eax==chrg.cpMin
    inc    eax
.endif
mov    chrg.cpMax,eax
invoke SendMessage,ebx,EM_EXSETSEL,0,addr chrg
mov    buffer,0
invoke SendMessage,ebx,EM_REPLACESEL,TRUE,addr buffer


KetilO
Posted on 2005-11-01 02:26:57 by KetilO
Hi KetilO,
When I open 2 new files, I can't switch to the other window by clicking on the tab button.
If I press enter and move the cursor up one line then I can switch to the other window by clicking on the tab button.

If I delete below line then everything go ok.
Line 259 in file C--IDE.c--
SendMessage(hREd,REM_SETHILITELINE,CurrentLine,1);

Please help. :cry: :cry:

Regards
QS Ong
Attachments:
Posted on 2006-06-01 10:46:18 by QS_Ong
Hi Ketil...
I'm very interested for your RAEdit control becose i need syntax highlite
control for my Aurel Basic.
ABasic is written in Creative Basic and how i can load raedit.dll in .
Do i must use classic LoadLibrary api for work or i need something else.
And where i can find VB example with raedit.dll.
Thanks advance..
aurel
Posted on 2009-06-04 00:12:29 by aurelASM
Here are some VB6 examples.

KetilO
Posted on 2009-11-09 07:48:26 by KetilO
Hello KetilO

I have found your RAEdit control and would like to use it in a upcoming project, I want to know if it is still under development and will there be any future updates, I don't want to build the project and have the editor become defunct with a few new releases of windows
Posted on 2011-12-22 13:44:41 by RizlaUK
So sorry , but I can't support you anymore.
I seriously suggest you set up a SVN or something.
When you decide you really are serious, talk to me again.
Goodbye radasm, thanks but I can't carry that across platforms.
Posted on 2011-12-23 02:25:12 by Homer
RA has become a joke at the feet of libs like CEGUI and I won't suggest it as a good build environment for anyone except pc users, small and shrinking.
Posted on 2011-12-23 02:27:57 by Homer
check it out - fart shoes!
Posted on 2011-12-23 02:28:56 by Homer