press enter in an edit box and make it happen in an other edit box too 
Author Message
 press enter in an edit box and make it happen in an other edit box too

Quote:
>> I have tvo Edit Boxes, where the first of them has the
>> Styles: "Multiline" and "Want return" (ES_MULTILINE and
>> ES_WANTRETURN) and it works perfect.
>> In the other edit box i have the same styles "Multiline"
>> and "Want return" but i also have the style "Read-only"
>> (ES_READONLY)

>> Then when the user types in the first edit box and press
>> Enter, the box change row as it should. I also want the
>> other edit box to change row at the same time then.
>you have to support IDOK message or command WM_KEYDOWN

>Regards, SunFire

Yes, but where and how should I write this code?
/Sofia


Mon, 10 Jan 2005 11:08:58 GMT  
 press enter in an edit box and make it happen in an other edit box too

Quote:
> >> I have tvo Edit Boxes, where the first of them has the
> >> Styles: "Multiline" and "Want return" (ES_MULTILINE and
> >> ES_WANTRETURN) and it works perfect.
> >> In the other edit box i have the same styles "Multiline"
> >> and "Want return" but i also have the style "Read-only"
> >> (ES_READONLY)

> >> Then when the user types in the first edit box and press
> >> Enter, the box change row as it should. I also want the
> >> other edit box to change row at the same time then.

> >you have to support IDOK message or command WM_KEYDOWN

> >Regards, SunFire

> Yes, but where and how should I write this code?
> /Sofia

Sofia,
        What does it mean to you for the read-only edit box to "change
row"?  Since it's read-only, it doesn't have an insertion point.  So
what are you wanting to change in the RO edit box?


Mon, 10 Jan 2005 12:35:37 GMT  
 press enter in an edit box and make it happen in an other edit box too
Scot

I think what she means is she wants the readonly edit box to reflect any
changes in the first editbox. I guess what she needs to do is to handle
WM_KEYDOWN in the first edit box and keep changing the RO edit box to
reflect the changes

Nish



Mon, 10 Jan 2005 12:46:05 GMT  
 press enter in an edit box and make it happen in an other edit box too
Yes thats right Nish!

Scot, I send you an email where you can se the application
and see how I mean.

/Sofia

Quote:
>-----Original Message-----
>Maybe she wants the mirroring to be done only on Enter
being pressed. So
>instead of a key-by-key update, she wants a line-by-line
update.

>Nish :-)

>> Hmmm.  Well, if that's so, then why is she just asking
about Enter, and
>> not all keystrokes?

>.



Mon, 10 Jan 2005 13:18:55 GMT  
 press enter in an edit box and make it happen in an other edit box too
Maybe she wants the mirroring to be done only on Enter being pressed. So
instead of a key-by-key update, she wants a line-by-line update.

Nish :-)

Quote:

> Hmmm.  Well, if that's so, then why is she just asking about Enter, and
> not all keystrokes?



Mon, 10 Jan 2005 13:02:21 GMT  
 press enter in an edit box and make it happen in an other edit box too

Quote:
> I think what she means is she wants the readonly edit box to reflect any
> changes in the first editbox. I guess what she needs to do is to handle
> WM_KEYDOWN in the first edit box and keep changing the RO edit box to
> reflect the changes

Hmmm.  Well, if that's so, then why is she just asking about Enter, and
not all keystrokes?


Mon, 10 Jan 2005 12:58:13 GMT  
 press enter in an edit box and make it happen in an other edit box too
catch WM_KEYDOWN or WM_KEYUP check if the key that was pressed is VK_RETURN,
if so,
txt2.SetWindowText(txt1.GetWindowText());

is that what you wanted?

Daniel Silberberg



Yes thats right Nish!

Scot, I send you an email where you can se the application
and see how I mean.

/Sofia

Quote:
>-----Original Message-----
>Maybe she wants the mirroring to be done only on Enter
being pressed. So
>instead of a key-by-key update, she wants a line-by-line
update.

>Nish :-)

>> Hmmm.  Well, if that's so, then why is she just asking
about Enter, and
>> not all keystrokes?

>.



Mon, 10 Jan 2005 17:34:26 GMT  
 press enter in an edit box and make it happen in an other edit box too
Hi

I wasnt able to send that mail i promised to that adress
you typed here.

The program you see in the attached file is a calculator.
The calculator in windows doesnt has those functions as
my principal asks for, so thats why I do this.

You see two Edit Boxes, the first is where you type the
numbers and the second is where you see the answer. You
dont need to press Enter to see the answer.
But if you press Enter, the first Edit box where you typed
in, changes row and you save the numbers you wrote on the
last row and now you can type other numbers in this second
row.

Here I also want the other Edit box, where you see the
answer, to change row. Then I can save the last answer in
the same way I saved the last numbers.

Any sense?

Is this possible?

Thank you
//Sofia   Sweden



Mon, 10 Jan 2005 17:48:12 GMT  
 press enter in an edit box and make it happen in an other edit box too

Quote:
> I wasn=B4t able to send that mail i promised to that adress=20
> you typed here.

The e-mail address I have posted here has an extra "spamhater" added
within it that is not part of my true address.  That is to thwart most
automated "spambot" programs that collect e-mail addresses from
newsgroup posts.

Quote:
> The program you see in the attached file is a calculator.=20
> The calculator in windows doesn=B4t has those functions as=20
> my principal asks for, so that=B4s why I do this.

I don't see an attached file.  But that's good, because it's generally
not accepted to post attachments to newsgroups like these.  You may send
your source directly to me, as long as you don't expect me to spend too
much time working on it.

Quote:
> You see two Edit Boxes, the first is where you type the=20
> numbers and the second is where you see the answer. You=20
> don=B4t need to press Enter to see the answer.
> But if you press Enter, the first Edit box where you typed=20
> in, changes row and you save the numbers you wrote on the=20
> last row and now you can type other numbers in this second=20
> row.

> Here I also want the other Edit box, where you see the=20
> answer, to change row. Then I can save the last answer in=20
> the same way I saved the last numbers.

OK, so it seems that what Nish guessed is NOT correct.  You do not want
both edit boxes to show the same values.  In fact, as others have
suggested, it should not be difficult to handle the specific WM_KEYDOWN
for VK_RETURN, then simply modify the text to be placed in the RO edit
by calling SetWindowText.


Tue, 11 Jan 2005 10:04:44 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Press enter in edit box?

2. Pressing ENTER in an edit box

3. Enter pressed in an edit box

4. *** Edit box *** Edit Box *****

5. **** Edit box *** Edit box ***

6. press Enter in a Edit box and make it happen in another box at the same time

7. EDIT BOX Problem with Long values, and others ....

8. Handling the User Pressing Return in Edit box

9. Processing TAB and ENTER (RETURN) from edit box in dialog

10. ENTER in EDIT box

11. ENTER in EDIT box

12. <ENTER>-key and edit box

 

 
Powered by phpBB® Forum Software