Re: [Dev-C++] How to display a text on the fly ?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Phil <tsy...@ya...> - 2002-11-10 19:22:56
|
Hello Abhijit, Many thanks for your answer. >Use the ES_READONLY style flag. Yep, Well, in fact with the WS_CAPTION, it is OK also to be "read only", which gives me also a text-bar. But tnx for the info. As for the displayed datas, I need them to be displayed as soon as they are received. So I have to call SetWindowText() for each received data. Well, I can save 50% of the calls, the user will hardly see the difference in getting each info / 0.5 second or 2 infos/second ;o) Now, using WriteFile() and SetWindowsText(), I have noticed something strange abt the '\n', which is saved as "non-displayable" by WriteFile. If I write my file via WriteFile, then the text file loaded to my text area (via SetWindowsText) does not include the "CR" as wanted but a "non-displayable" char. Same behaviour when I display my buffer directly to the text area via SetWindowsText(). When I write my text file (same buffer) via the usual fprintf()/fputs(), then the '\n' is OK and SetWindowsText displays it the way I want. I can not find out the good option/flag to get '\n' as a "good" CR :o( Well, anyway tnx again for your help, very useful and appreciated indeed ! Phil. PS: As I am a subscriber to this list (!), I get your answer via the list _too_ ;o) FWIW & no hurt. __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 |