By touch I mean manipulating any UI related element.
Eugen Podsypalnikov wrote:
it is working
Did you test it ? If it works, you are lucky. But it is any way an extremly bad practice. I suggest you read the section "Worker threads and the GUI II: Don't touch the GUI" in the article I mentioned earlier to have a bit more information.
newCCtrlDrawContext(new CClientDC(&m_cwndStatic), // first par
cStaticRect)); // second par
Try the following :
0. Repair the state of your project (see your starting post)
1. Place the new context class at the top of your cpp, after the include block
2. Modify your OnClick function
3. Modify your ThreadLoop function