error C2352: 'CUserinfo3App::WriteCancelled' : illegal call of non-static member function
WriteCancelled is a non-static member function. You cannot call it this way: 'CUserinfo3App::WriteCancelled()'. You have to call it on an object like 'myObject.WriteCancelled();'. Only static member functions can be called without an object.
I'm not sure if the functions you called are static. However, loosing the CUserinfo3App:: specifier could help, as this would work for both versions. Don't ever mess with the compilers files. Leave AFXWIN.H as it is.
If CancelText is defined elsewhere, this should work:
PHP Code:
void CUserinfo3App::WriteCancelled()
{
SetRegistryKey("SomeCompany") ; error here
WriteProfileString ("LastResult", "Operation", "Cancelled By User") ;
MessageBox( NULL, CancelText, "FYI", MB_OK);
}