Re: [Dev-C++] How to display a text on the fly ?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Abhijit S. <mu...@gm...> - 2002-11-10 08:34:48
|
Greets, Phil. > This window is a "read only" area for the user, i.e. I > do not want the user to be able to enter any text in > it. Use the ES_READONLY style flag. > The displayed datas (alphanums) are coming from an > other process , char by char. > I want to display the datas as soon as they are coming > in, w/o loosing the ones yet displayed (auto-scroll). > The input volume of datas can be of any length (more > than one visible window) and the user should be able > to save the whole datas into a file on disk at any > moment (but then the data input is stopped). > Is there any other way (more efficient) than using > SetWindowText every time I have an input (which occurs > 2-3 times per second) ? This is the only way I know. One more thing you can do is save the input data into a temporary buffer and update it only when the buffer is full, after which you can reset the buffer. This reduces the frequency and number of calls to SetWindowText(). When you want the text later, call GetWindowText(). > Alternate way I tried w/o success : writing the datas > on the fly in a file opened as "SHARE" by my soft. > Opening it agn for reading (to do a global > SetWindowText) does not help and the reading is done > only when the writing channel is closed. What's the > hint to really have a shared access to the file within > the same process ? There's no point opening the file for sharing in the same process. You can as well create a RAM buffer, which will be faster and more efficient. If you still want to use a file, you can try calling FlushFileBuffers(). ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |