I'm using GetProfileInt to get key values from the registry. When the location exists, the code works, but when it does not, it returns 0 (and initializes the registry key to 0).
Why doesn't this work?
Code:
SetRegistryKey(_T("MyKey"));
int def = 0x1FFF;
def = GetProfileInt(_T("Subkey"), _T("KeyWithVal"), def);