Originally posted by Myvar

Therefore I had to know how the Declaration of the Function has to look like. I need access to all my Membervariables used by my Application.
Declare the global function as a friend of the class.

Here another way, make that function, a member function of the class whose data members you need to access.

Either way, you have to manually edit the derived MFC yourself.

Original posted by CornedBee

Your question shows that you don't really know how to program C++, so you should not try to program MFC.

I felt that CornedBee is correct.