News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to update a line in EditBox

Started by elmo, October 20, 2010, 06:38:07 AM

Previous topic - Next topic

elmo

Example:
I create 1 Button, 1 EditBox.

I type something in the EditBox   (4 lines below):

create combo1
create button1
create label1
create toolbar1

Then, I click that Button.
I hope I can change the line who contain "button1" to become "edit button1"
So, in the editbox, it will become:

create combo1
edit button1
create label1
create toolbar1

could you help me to solve this problem?
Thank you
Fritz Gamaliel
be the king of accounting programmer world!


elmo

hi jj2007
that's an easy case.
What if the condition like this:

I type in the TextBox

create combo1
mov combo1,eax
create button1
mov button1,eax
create label1
mov label1,eax
create toolbar1
mov toolbar1,eax

I want to change the line that have button1 to become "edit button1".
If I use EM_REPLACESEL, it will replace 2 lines, so it will be:


create combo1
mov combo1,eax
edit button1       ;change in here
edit button1       ;change in here
create label1
mov label1,eax
create toolbar1
mov toolbar1,eax

I don't want it happen. I want only change that TextBox to become like this:

create combo1
mov combo1,eax
edit button1       ;change only in here
mov button1,eax
create label1
mov label1,eax
create toolbar1
mov toolbar1,eax

could you help me to solve this problem and show me the code example?
Thank you
Fritz Gamaliel
be the king of accounting programmer world!

jj2007

As the name says, EM_REPLACESEL replaces the selection. Find out how to set the selection.