[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-09 05:22:49
|
Hello all,
An other newbie question.
I have a window (text area) created as follow :
g_hRead = CreateWindowEx(WS_EX_CLIENTEDGE,"EDIT" ,
"INPUT",
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
WS_HSCROLL | ES_MULTILINE
| ES_AUTOVSCROLL | ES_AUTOHSCROLL |
WS_CAPTION,
0, 200, 500,
425,hMainWindow,(HMENU)IDC_MAIN_INPUT,
GetModuleHandle(NULL),NULL);
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.
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) ?
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 ?
OS used: Win2000 + Dev-C++ 4.9.6.7, Win32GUI compiled
as C++
Thanks for helping.
Phil.
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
|