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
Your problems are:
- "this" is only valid inside class member methods.
- You do not need to have "ClassOne::" infront of "one" unless it is a static member of the class (it is declared within the scope of the class).
If "one" is a static member, this a.cpp would be as follows: