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:
It seems you are confusing classes with instances (that is the same as confusing types with variables) local and global scope and linkage.
Assuming the declaration you provided are at file scope (that is, not enclosed in some other braces) one is a pointer to a ClassOne object. It exist at global level (the pointer!) and have only local visibility (local in respect to the cpp file that "sees" it, that are all the cpp files that include the h file - in other words, static has very few sense in h files)
ClassOne::one does not exist, since one is global, and not a part of ClassOne (hence the compiler doesn't know what to do), and than, this is meaningless since you are not inside a member function body.
At this point we cannot correct, since we cannot figure out what you where trying to do.