display text in the edit box during the excution of program 
Author Message
 display text in the edit box during the excution of program

I am working on a communication program, and I want to see
the status displayed for every step.

ex.
step 1 - try to connect
step 2 - try to send
step 3-  try to receive

I want to display a text box to show results of step1, 2,
3

So I created a edit text field on a dialog box.
and  I used UpdataData(0) during each step, trying to show
the status,  but it only showing the step 3.

Any clue of how to implement what I want?

Thanks!



Mon, 17 Oct 2005 20:58:51 GMT  
 display text in the edit box during the excution of program
Another simple way is to use SetWindowText:

pEdit->SetWindowText(_T("WhatEverTextYouWantToDisplay")); // You can get
pEdit using GetDlgItem().

--
Ajay Kalra [MVP - VC++]


Quote:
> I am working on a communication program, and I want to see
> the status displayed for every step.

> ex.
> step 1 - try to connect
> step 2 - try to send
> step 3-  try to receive

> I want to display a text box to show results of step1, 2,
> 3

> So I created a edit text field on a dialog box.
> and  I used UpdataData(0) during each step, trying to show
> the status,  but it only showing the step 3.

> Any clue of how to implement what I want?

> Thanks!



Mon, 17 Oct 2005 21:57:26 GMT  
 display text in the edit box during the excution of program
The problem is only display the last text displayed.
I want it to refresh so I can see all of them.
Thanks!
Quote:
>-----Original Message-----
>Another simple way is to use SetWindowText:

>pEdit->SetWindowText(_T

("WhatEverTextYouWantToDisplay")); // You can get
Quote:
>pEdit using GetDlgItem().

>--
>Ajay Kalra [MVP - VC++]



>> I am working on a communication program, and I want to
see
>> the status displayed for every step.

>> ex.
>> step 1 - try to connect
>> step 2 - try to send
>> step 3-  try to receive

>> I want to display a text box to show results of step1,
2,
>> 3

>> So I created a edit text field on a dialog box.
>> and  I used UpdataData(0) during each step, trying to
show
>> the status,  but it only showing the step 3.

>> Any clue of how to implement what I want?

>> Thanks!

>.



Mon, 17 Oct 2005 22:14:38 GMT  
 display text in the edit box during the excution of program
If I understand correctly, you want it to show "Connect", "Send", and then
"Receive" in succession. Its very likely that the whole thing is so quick
that all this happens, but you just dont notice it. If this is the case, you
may want to show a log instead, something like a listbox would be more
appropriate.

--
Ajay Kalra [MVP - VC++]


Quote:
> The problem is only display the last text displayed.
> I want it to refresh so I can see all of them.
> Thanks!
> >-----Original Message-----
> >Another simple way is to use SetWindowText:

> >pEdit->SetWindowText(_T
> ("WhatEverTextYouWantToDisplay")); // You can get
> >pEdit using GetDlgItem().

> >--
> >Ajay Kalra [MVP - VC++]



> >> I am working on a communication program, and I want to
> see
> >> the status displayed for every step.

> >> ex.
> >> step 1 - try to connect
> >> step 2 - try to send
> >> step 3-  try to receive

> >> I want to display a text box to show results of step1,
> 2,
> >> 3

> >> So I created a edit text field on a dialog box.
> >> and  I used UpdataData(0) during each step, trying to
> show
> >> the status,  but it only showing the step 3.

> >> Any clue of how to implement what I want?

> >> Thanks!

> >.



Mon, 17 Oct 2005 22:22:05 GMT  
 display text in the edit box during the excution of program

Quote:

> I am working on a communication program, and I want to see
> the status displayed for every step.

> ex.
> step 1 - try to connect
> step 2 - try to send
> step 3-  try to receive

> I want to display a text box to show results of step1, 2,
> 3

> So I created a edit text field on a dialog box.
> and  I used UpdataData(0) during each step, trying to show
> the status,  but it only showing the step 3.

> Any clue of how to implement what I want?

> Thanks!

Do you return to MFC after the UpdateData?  If you don't then the screen
will not refresh.  If you are doing all these communication steps
without ever returning to MFC (which means you are blocking the GUI)
then your design approach is wrong for a Windows program.  But if you
call the text box's UpdateWindow() after UpdateData() the text box
object will refresh immediately, during the UpdateWindow() call.

--
Scott McPhillips [VC++ MVP]



Tue, 18 Oct 2005 00:42:22 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Displaying text in an Edit Box

2. Displaying text in Edit Box

3. Display text in edit box at runtime

4. Problems displaying text in edit box

5. Display text in edit boxes

6. Wrapping text in text box or edit box

7. Set text to a edit box of another program

8. Set text to a edit box of another program

9. Displaying Integers in an Edit Box or List Box

10. list box text to edit box

11. press enter in an edit box and make it happen in an other edit box too

12. *** Edit box *** Edit Box *****

 

 
Powered by phpBB® Forum Software