Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

multithreading in MDI

Posted on 1998-03-31
1
Medium Priority
?
463 Views
Last Modified: 2010-05-18
I want to realize multithread in MDI,in which each thread
have a doc/view architecture,just like the primary thread,
how can I make it?
0
Comment
Question by:iamtiger
1 Comment
 

Accepted Solution

by:
footloose earned 400 total points
ID: 1183969
I am assuming you want to create a thread each time File/New is clicked.

Override OnInitInstance of the view class, and after regular initialization, have it call theApp.NewThreadFunction( someParams ). Use someParams to tie this view to the thread which will be created soon.

In theApp.NewThreadFunction(), create the thread and pass the information from someParams so that the thread can communicate with its view.

be careful about passing window handles between threads.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question