News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Riched

Started by ragdog, February 03, 2015, 09:51:44 PM

Previous topic - Next topic

ragdog

Hello

I use a Riched control in my project but i search a function to overwrite my text in the the control

example:

I have a text  "123456789"

Now need i a overwrite function

I set the cursel to the "123456789" and add a new text 1777777

But my control make 177777723456789 it move the text after 1 to right

I found only this but he has the same problem to found a solution.
http://www.asmcommunity.net/forums/topic/?id=25290

example a hexeditor the Acsii column make it

Have any an idea how i can make it with a Riched

hutch--

You need to select the text first.

ragdog

How i can make it with EM_GETSEL or EM_EXGETSEL?

jj2007

EM_EXSETSEL

stx   SETTEXTEX <ST_DEFAULT or ST_SELECTION or ST_KEEPUNDO, CP_ACP>   ; flags, codepage

      invoke SendMessage, hAux, EM_EXSETSEL, 0, addr chrg      ; set selection
      invoke SendMessage, hAux, EM_SETTEXTEX, addr stx, edi      ; and replace with new text