troubleshooting Question

MFC: calling SetRegistryKey and LoadStdProfileSettings outside of CMyApp

Avatar of sternocera
sternocera asked on
System ProgrammingMicrosoft DevelopmentEditors IDEs
3 Comments1 Solution1753 ViewsLast Modified:
I wish to store some form data to the registry so that it can be retrieved later. I see that my wizard generated app includes this code:
      SetRegistryKey(_T("my app name"));
      LoadStdProfileSettings(4);
Since the object that I've instantiated where the form data is stored happens before this, I guess I have to move this into that class( If I expect to be able to store my form data in the registry the very first time the program is run, before these functions have ever been called on the user's computer). What header file should I include to be able to do this? They're defined in afxwin.h, but including this still creates an identifier not found error.

Thanks a lot,
Sternocera
ASKER CERTIFIED SOLUTION
AndyAinscow
Freelance programmer / Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros