Multi Threads (Visual C++, MFC)
Posted on 1998-09-04
I built an MDI application with Visual C++ 5 (automatically with "MFC appWizard - EXE").
The View Class draws itself to the child window through the CDC pDC variable in View::OnDraw, to the device context in the usual way.
I'd like to do the drawing in a separate thread, to create a new 'drawing' thread. (In my application the drawing is a long task). This is a very common thing to do.
I encountered severe problems doing that. Many critical errors were created.
note: I work with WinNT.
Please answer as clear as possible and give an example, because I had many problems with this issue.