Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SystemParametersInfo Pin
Yulianto.5-Nov-04 18:23
Yulianto.5-Nov-04 18:23 
Generaltry/catch throw to ifstream error Pin
dbslon25-Nov-04 12:07
dbslon25-Nov-04 12:07 
GeneralRe: try/catch throw to ifstream error Pin
Andrew Walker5-Nov-04 14:29
Andrew Walker5-Nov-04 14:29 
Generalhelp:can't use mktyplib Pin
happycpp5-Nov-04 11:44
happycpp5-Nov-04 11:44 
Generalanothere thread call UpdateAllViews() Pin
LeeeNN5-Nov-04 11:05
LeeeNN5-Nov-04 11:05 
GeneralRe: anothere thread call UpdateAllViews() Pin
John R. Shaw5-Nov-04 12:17
John R. Shaw5-Nov-04 12:17 
GeneralRe: anothere thread call UpdateAllViews() Pin
LeeeNN5-Nov-04 12:35
LeeeNN5-Nov-04 12:35 
GeneralRe: anothere thread call UpdateAllViews() Pin
John R. Shaw5-Nov-04 14:04
John R. Shaw5-Nov-04 14:04 
Type "thread safe class" in the index section of the MSDN library window, the information should be baried in there some where.

The OnTimer() function is the tricky part, for the method I was thinking about. You would only need to receive timer messages in one of your views, which would probably call one of your document function to make a copy of the udated data (before posting the update-all function). The problem is that if you close that view you would stop receiving the timer messages.

If the application only displays views of this particular data (and nothing else), then you could use an OnTimer() function in your main window and update the first document (of the specified type) you find from there.

Of cource with this last method you could store the data globaly and ignore the actual document class all together. (just using multi-doc to simplify the creation of multiple views)

Using a multi-doc interface in this fashion seems like a bit of a cludge, but it can work.

There is also the possiblity of creating a hidden view of the data that receives the OnTimer() messages (That is created just when the first visable view is created). You would have to close this view after the last visable view was closed.

Keep in mind that you may not even need to gather the data in a seperate thread, because unless you are recording each change for future use or study you only need it to update the views and (depending on the amount of data, and number of views) it may take longer than 50ms to do that.

Well if nothing else I hope I have stimulated your imagination with other possiblities.

Taa! Taa!

INTP
GeneralRe: anothere thread call UpdateAllViews() Pin
Neville Franks6-Nov-04 0:09
Neville Franks6-Nov-04 0:09 
GeneralRe: anothere thread call UpdateAllViews() Pin
LeeeNN8-Nov-04 6:29
LeeeNN8-Nov-04 6:29 
GeneralLinking In Help File Pin
Grahamfff5-Nov-04 10:45
Grahamfff5-Nov-04 10:45 
GeneralDeleting a character in a text file Pin
Nikhil Wason5-Nov-04 9:29
Nikhil Wason5-Nov-04 9:29 
GeneralRe: Deleting a character in a text file Pin
John R. Shaw5-Nov-04 9:50
John R. Shaw5-Nov-04 9:50 
Questioncan i find out free disk space on a computer on network??? Pin
venadder5-Nov-04 8:35
venadder5-Nov-04 8:35 
GeneralDrawing in a Dialog Pin
sir kaber5-Nov-04 7:47
sir kaber5-Nov-04 7:47 
GeneralRe: Drawing in a Dialog Pin
John R. Shaw5-Nov-04 9:30
John R. Shaw5-Nov-04 9:30 
GeneralRe: Drawing in a Dialog Pin
Anonymous5-Nov-04 11:36
Anonymous5-Nov-04 11:36 
GeneralRe: Drawing in a Dialog Pin
John R. Shaw5-Nov-04 12:34
John R. Shaw5-Nov-04 12:34 
GeneralListView_SortItems Pin
Anonymous5-Nov-04 7:03
Anonymous5-Nov-04 7:03 
General(help) Unicode and text files Pin
necroleak5-Nov-04 6:47
sussnecroleak5-Nov-04 6:47 
GeneralRe: (help) Unicode and text files Pin
peterchen5-Nov-04 23:56
peterchen5-Nov-04 23:56 
GeneralRemoving signature from a dll Pin
wrykyn5-Nov-04 6:03
wrykyn5-Nov-04 6:03 
GeneralOwner Drawn Button Pin
Timothy Grabrian5-Nov-04 5:47
professionalTimothy Grabrian5-Nov-04 5:47 
GeneralRe: Owner Drawn Button Pin
Antony M Kancidrowski5-Nov-04 6:12
Antony M Kancidrowski5-Nov-04 6:12 
GeneralRe: Owner Drawn Button Pin
Timothy Grabrian5-Nov-04 7:12
professionalTimothy Grabrian5-Nov-04 7:12 

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.