You can fix this (sort of) by making a single call to CWinApp::SetRegistryKey. This call takes a single string argument that specifies your company name. The best place to call this is in InitInstance.
Once you make this call, any calls you make to CWinApp's GetProfileInt, GetProfileString, WriteProfileInt, or WriteProfileString function will work with the registry.
The calls always write under the HKEY_CURRENT_USER\Software\CompanyName\AppName key (which isn't always what you want). The calls will create a subkey for each INI file section and value you reference.
If you want to write somewhere else (like HKEY_LOCAL_MACHINE\Software), too bad. You'll have to use the registry yourself.