Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Xp Icons Pin
Kannan Kalyanaraman3-Dec-02 18:34
Kannan Kalyanaraman3-Dec-02 18:34 
GeneralCWnd* in a Splitter View . Pin
Anonymous3-Dec-02 17:25
Anonymous3-Dec-02 17:25 
GeneralRe: CWnd* in a Splitter View . Pin
jhwurmbach3-Dec-02 21:30
jhwurmbach3-Dec-02 21:30 
GeneralProblem from reading Excel Pin
dragonline5253-Dec-02 16:46
dragonline5253-Dec-02 16:46 
GeneralCustom window resize problem... Pin
Neha3-Dec-02 16:06
Neha3-Dec-02 16:06 
GeneralRe: Custom window resize problem... Pin
Maximilien4-Dec-02 3:05
Maximilien4-Dec-02 3:05 
GeneralMultithreaded Single Document Multiple View Architecture Pin
Rand Al'thor3-Dec-02 15:40
Rand Al'thor3-Dec-02 15:40 
GeneralRe: Multithreaded Single Document Multiple View Architecture Pin
Rand Al'thor4-Dec-02 9:23
Rand Al'thor4-Dec-02 9:23 
Okay,

No replies.. either nobody have any idea, or my post is just plain silly.
REgardless, I've been corresponding with Michal Mecinski, the author of a really good article about MSDI applications, which can be found at http://www.codeguru.com/doc_view/msdi.html[^].

This is what he's got to say about my problem:

Hello,

I've been searching the MSDN for some info and din't find much about multithreaded doc/view applications. The only solution I found was to go trough the MFC source code and experiment with various solutions.
The application you described sounds more complicated to me. I guess the whole document and view classes would have to be completely rewritten.
But I have a different idea. You may create a worker thread for each view, that draws the line plot on a bitmap in memory. The view would need to send a message to the working thread whenever the data is updated. You can copy the data for each thread or let the threads access the data in the document directly (using a semaphore of course). The working thread should actually have two bitmaps - one being displayed in the view (simple BitBlt) and one being drawn by the worker thread. After the plot is drawn you switch the bitmaps and post a message to the view to redraw itself. I think this is much simpler than using multiple UI threads. I used such solution once in an application that was drawing fractals and it worked perfectly. I hope this might help.

Regards,
Michal Mecinski

Any comments, folks?

Cool | :cool:



Two Rivers!
GeneralMFC Static vs. Shared Library -- resources not found Pin
Wes Jones3-Dec-02 15:23
Wes Jones3-Dec-02 15:23 
GeneralRe: MFC Static vs. Shared Library -- resources not found Pin
Swinefeaster30-Dec-02 11:39
Swinefeaster30-Dec-02 11:39 
GeneralSQL and Visual C++ Pin
MFC is the Best3-Dec-02 13:44
MFC is the Best3-Dec-02 13:44 
GeneralRe: SQL and Visual C++ Pin
lemonzc19493-Dec-02 14:06
lemonzc19493-Dec-02 14:06 
GeneralRe: SQL and Visual C++ Pin
MFC is the Best3-Dec-02 22:42
MFC is the Best3-Dec-02 22:42 
GeneralRe: SQL and Visual C++ Pin
lemonzc19493-Dec-02 22:58
lemonzc19493-Dec-02 22:58 
QuestionStop default handling of space bar in property sheet? Pin
IGx893-Dec-02 13:40
IGx893-Dec-02 13:40 
AnswerRe: Stop default handling of space bar in property sheet? Pin
Rand Al'thor3-Dec-02 17:17
Rand Al'thor3-Dec-02 17:17 
GeneralRe: Stop default handling of space bar in property sheet? Pin
IGx894-Dec-02 6:23
IGx894-Dec-02 6:23 
GeneralRe: Stop default handling of space bar in property sheet? Pin
Sean_Yang6-Dec-02 9:48
Sean_Yang6-Dec-02 9:48 
GeneralRe: Stop default handling of space bar in property sheet? Pin
Anonymous6-Dec-02 11:16
Anonymous6-Dec-02 11:16 
GeneralToolbar Resizing Pin
Steven M Hunt3-Dec-02 13:30
Steven M Hunt3-Dec-02 13:30 
GeneralRe: Toolbar Resizing Pin
Jeff J3-Dec-02 18:04
Jeff J3-Dec-02 18:04 
GeneralRe: Toolbar Resizing Pin
Steven M Hunt4-Dec-02 4:44
Steven M Hunt4-Dec-02 4:44 
GeneralRe: Toolbar Resizing Pin
Jeff J4-Dec-02 10:36
Jeff J4-Dec-02 10:36 
GeneralRe: Toolbar Resizing Pin
Rand Al'thor4-Dec-02 12:35
Rand Al'thor4-Dec-02 12:35 
GeneralRe: Toolbar Resizing Pin
Steven M Hunt4-Dec-02 16:00
Steven M Hunt4-Dec-02 16:00 

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.