Thanks for the advice but that does not work either.
I tryed both methods you suggested and I get the same error again.
If i try to call CWinApp:SetRegistryKey("SomeCompany")
I get
C2352: 'CWinApp::WriteProfileStringA' : illegal call of non-static member function
I think this problem is something to do with the base class CWinApp.
What I am trying to achive is when a user cancels the dialog box it writes some info to the registry.. It seemed to me that SetRegistryKey was only available in classes derived from CWinApp and that only one class can be dirived from CWinApp.
Because CUserinfo3App is dirived fro CWinApp this seems like the logical place to insert this function.. Thats were I am now..
I could just use the winapi reg funtions to do this but I am trying to get to grips with MFC.
If I have got the wrong end of the stick please let me know..
Thx
P..