Is it possible to provide these two messages in your Edit Control ?

Regards,
akyprian
Posted on 2003-02-11 06:14:14 by akyprian
Hi akyprian

Yes it is possible, but why do you need these messages. Seem useless to me.

KetilO
Posted on 2003-02-11 07:31:43 by KetilO
The reason i need these messages is because i want to provide undo and redo lists like in MSOffice. By the way, a second thought, instead of these messages, why don't you provide pointers to the lists via a differerent message , for example, REM_GETUNDOLIST and REM_GETREDOLIST.

Regards,

akyprian
Posted on 2003-02-11 09:42:53 by akyprian
Hi akyprian

You don't need a message for that.


;Get pointer to EDIT struct
invoke GetWindowLong,hEdit,0
;Get pointer to undo/redo memory
mov ebx,[eax].EDIT.hUndo
;Get relative undo/redo pointer
mov ecx,[eax].EDIT.rpUndo


You can now walk the undo/redo memory

KetilO
Posted on 2003-02-11 12:48:59 by KetilO
Thanks once again,

Regards, akyprian
Posted on 2003-02-11 13:03:20 by akyprian
KetiIo,

invoke GetWindowLong,hEditor,0
;Get pointer to undo/redo memory
mov edi,.EDIT.hUndo
;Get relative undo/redo pointer
mov edx,.EDIT.rpUndo
mov eax,.RAUNDO.rpPrev
.if edx
mov edx,eax
XOR eax,eax
mov al,.RAUNDO.fun
.If al==1

.ElseIf
.
.
Sorry for asking again, can you please help with the nessecary modifications in the code above so that ALL undo functions are enumarated ?
Posted on 2003-02-11 16:18:52 by akyprian
Hi

In RAEdit.inc you find this equates:

UNDO_INSERT equ 1 ;Char was typed and inserted
UNDO_OVERWRITE equ 2 ;Char was typed and overwrite
UNDO_DELETE equ 3 ;Char was deleted using Delete
UNDO_BACKDELETE equ 4 ;Char was deleted using backspace
UNDO_INSERTBLOCK equ 5 ;Block was inserted
UNDO_DELETEBLOCK equ 6 ;Block was deleted

KetilO
Posted on 2003-02-12 01:49:18 by KetilO
KetiIo,

I know this. This is NOT what I want. In the code I posted i find the function name of the LAST undo action. I need to have a loop to enumerate ALL the UNDO functions one after the other.
Posted on 2003-02-12 02:26:46 by akyprian
Hi



;Get pointer to EDIT struct
invoke GetWindowLong,hEdit,0
;Get pointer to undo/redo memory
mov ebx,[eax].EDIT.hUndo
.while [ebx].RAUNDO.cb
mov al,[ebx].RAUNDO.fun
.if al==1
.elseif al==2
.
.
.endif
add ebx,[ebx].RAUNDO.cb
add ebx.sizeof RAUNDO
.endw


KetilO
Posted on 2003-02-12 03:25:17 by KetilO
Thanks again
Posted on 2003-02-12 03:55:20 by akyprian