TRegistry * Reg=new TRegistry;
Reg - & gt; RootKey=HKEY_CURRENT_CONFIG;
Reg - & gt; OpenKey (" Software \ \ Fonts ", true);
if (! Reg - & gt; ValueExists (" MM "))
{
Reg - & gt; WriteInteger (" MM ", 12);
}
The else
{
Reg - & gt; WriteInteger (" MM ", 6);
}
Modify the registry error:
Project MDIAPP. Exe raised exception class ERegistry Exceptionwith message 'Failed to set data for "MM".
CodePudding user response:
With administrator privileges to run the program normal?CodePudding user response: