Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to add an Pointer with string Pin
Cedric Moonen25-Sep-07 3:35
Cedric Moonen25-Sep-07 3:35 
GeneralRe: How to add an Pointer with string Pin
toxcct25-Sep-07 3:39
toxcct25-Sep-07 3:39 
AnswerRe: How to add an Pointer with string Pin
Cedric Moonen25-Sep-07 3:34
Cedric Moonen25-Sep-07 3:34 
Questiondynamically reading data?? Pin
srvsah25-Sep-07 3:06
srvsah25-Sep-07 3:06 
AnswerRe: dynamically reading data?? Pin
toxcct25-Sep-07 3:24
toxcct25-Sep-07 3:24 
AnswerRe: dynamically reading data?? Pin
KarstenK25-Sep-07 3:28
mveKarstenK25-Sep-07 3:28 
GeneralRe: dynamically reading data?? Pin
srvsah26-Sep-07 2:25
srvsah26-Sep-07 2:25 
AnswerRe: dynamically reading data?? Pin
Matthew Faithfull25-Sep-07 3:38
Matthew Faithfull25-Sep-07 3:38 
It sounds like what you want is live display of file contents in real time. Technically that is impossible but in practice if you back off your requirements a little you may be able to get it to work.
There are two basic approaches:-
1 A loop which reads the file, displays the contents and pauses for a short time then goes round again. Depending on the size of the file and complexity of the display you may be able to get several updates per second or an update every few seconds. Either way your processor usage is liekly to be 90%+ and unhappiness may result.
2 Read the file once and display it. Then register for File Change Notifications from the operating system and when you get one that relates to the file you're interested in re-read and re-display it. This is more code and less portable but probably a better way to go.

If data integrity is an issue you're going to need to lock the file while reading it, unlock it when you're finished and perhaps carefully synchronise your usage. Other tricks like reading large blocks at a time from the file that match the native file block sizes, temporarily boosting the priority of the reader thread etc could be used to improve the overall effectiveness but in the end this is not a job which fits comfortably with the machine architectures we have inherited from the days of batch processing and single threaded operation.

Nothing is exactly what it seems but everything with seems can be unpicked.

AnswerRe: dynamically reading data?? Pin
Hamid_RT25-Sep-07 19:33
Hamid_RT25-Sep-07 19:33 
QuestionCString max character length Pin
GDavy25-Sep-07 3:02
GDavy25-Sep-07 3:02 
AnswerRe: CString max character length Pin
toxcct25-Sep-07 3:22
toxcct25-Sep-07 3:22 
GeneralRe: CString max character length Pin
Matthew Faithfull25-Sep-07 3:24
Matthew Faithfull25-Sep-07 3:24 
GeneralRe: CString max character length Pin
toxcct25-Sep-07 3:26
toxcct25-Sep-07 3:26 
GeneralRe: CString max character length Pin
Matthew Faithfull25-Sep-07 4:14
Matthew Faithfull25-Sep-07 4:14 
GeneralRe: CString max character length Pin
GDavy25-Sep-07 4:13
GDavy25-Sep-07 4:13 
GeneralRe: CString max character length Pin
Mark Salsbery25-Sep-07 7:39
Mark Salsbery25-Sep-07 7:39 
GeneralRe: CString max character length Pin
David Crow25-Sep-07 4:40
David Crow25-Sep-07 4:40 
JokeRe: CString max character length Pin
Matthew Faithfull25-Sep-07 4:42
Matthew Faithfull25-Sep-07 4:42 
AnswerRe: CString max character length Pin
KarstenK25-Sep-07 3:25
mveKarstenK25-Sep-07 3:25 
AnswerRe: CString max character length Pin
Hamid_RT25-Sep-07 19:31
Hamid_RT25-Sep-07 19:31 
Questionwindows vista & explorer Pin
mitok25-Sep-07 2:23
mitok25-Sep-07 2:23 
QuestionExceptions being thrown Pin
Waldermort25-Sep-07 0:38
Waldermort25-Sep-07 0:38 
AnswerRe: Exceptions being thrown Pin
DevMentor.org25-Sep-07 1:02
DevMentor.org25-Sep-07 1:02 
AnswerRe: Exceptions being thrown Pin
Waldermort25-Sep-07 2:20
Waldermort25-Sep-07 2:20 
GeneralRe: Exceptions being thrown Pin
DevMentor.org25-Sep-07 6:50
DevMentor.org25-Sep-07 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.