void CMemoryPrefPage::HandleOK() { Control.MainMemFactor = bound( Control.MainMemFactor, 10, 100 ); FrameSettings( Control.RamDisk, Control.MainMemMin, Control.MainMemFactor); CPPPropertyPage::HandleOK(); }
void LoadAllPreferences(BOOL fMemOnly) /************************************************************************/ { LPSTR lp; int i, English, Didot; STRING tmp; if (fMemOnly) // memory related info only { // Memory Group Preferences GetDefStr( Control.RamDisk, Control.ProgHome ); FixPath( Lowercase( Control.RamDisk ) ); GetDefInt( Control.MainMemMin, 1024 ); GetDefInt( Control.MainMemFactor, 100 ); if ( Control.MainMemFactor < 10 ) Control.MainMemFactor = 10; if ( Control.MainMemFactor > 100 ) Control.MainMemFactor = 100; GetDefInt( Control.LineArtAsGray, NO ); FrameSettings( Control.RamDisk, Control.MainMemMin, Control.MainMemFactor); // Get Gamma settings GetDefFix( BltSettings.RGamma, 1 ); GetDefFix( BltSettings.GGamma, 1 ); GetDefFix( BltSettings.BGamma, 1 ); return; } AstralCursor( IDC_WAIT ); if ( !szPreferenceFile[0] ) { if ( !AstralStr( IDS_INIFILE, &lp ) ) lp = PRIVATE_INI; lstrcpy( szPreferenceFile, lp ); GetIniPath( szPreferenceFile ); } // Recall List Control.RecallCount = 0; for ( i=0; i<MAX_RECALL; i++ ) { GetDefaultString( itoa(i,tmp,10), "", Control.RecallImage[i], sizeof(Control.RecallImage[i]) ); if ( *Control.RecallImage[i] ) Control.RecallCount++; } // Undo Group Preferences GetDefInt( Control.NoUndo, FALSE ); GetDefInt( Control.UseApply, NO ); GetDefInt( Control.UndoObjects, NO ); GetDefInt( Control.UndoMasks, NO ); // Miscellaneous Group Preferences #ifdef _MAC lstrcpy(Control.PouchPath, ":files:"); #else GetDefStr( Control.PouchPath, Control.ProgHome ); if ( Control.PouchPath[1] != ':' ) { lstrcpy( tmp, Control.ProgHome ); lstrcat( tmp, Control.PouchPath ); lstrcpy( Control.PouchPath, tmp ); } FixPath( Lowercase( Control.PouchPath ) ); #endif // _MAC GetDefInt( Control.UseWacom, 0 ); GetDefInt( Control.MaskTint, 0 ); // Red GetDefInt( Control.IndependentSettings, YES ); GetDefInt( Control.bNoTheme, NO ); #ifdef USEWAVEMIX GetDefInt( Control.bUseWaveMix, YES ); #endif // USEWAVEMIX GetPrivateProfileString( "Drivers", "Wave", "none", tmp, sizeof(STRING), "system.ini"); // if they have no wave driver or the speaker.drv installed, disable // using the wavemix.dll #ifdef USEWAVEMIX if ( (! lstrcmpi( tmp, "none")) || (! lstrcmpi( tmp, "Speaker.drv")) || (! lstrcmpi( tmp, "")) ) Control.bUseWaveMix = NO; #endif // USEWAVEMIX GetDefInt( Control.iAdventBrush, BRUSH_SIZE_MEDIUM ); GetDefInt( Control.iMaxAnimations, 10 ); GetDefInt( Control.iScrnSaverTime, 2 ); IntermissionSetTimeout ((DWORD)Control.iScrnSaverTime * 60000); // Units Group Preferences English = GetProfileInt( "intl", "iMeasure", 1 ); // 1 = English if ( GetDefInt( Didot, -1 ) >= 0 ) // If Didot is overridden... Control.Points = ( !Didot ? 723 : 676 ); else Control.Points = ( English ? 723 : 676 ); GetDefInt( Control.Units, !English ); Control.Units += IDC_PREF_UNITINCHES; GetDefFix( Control.ScreenWidth, 9 ); GetDefInt( View.UseRulers, NO ); GetDefInt( Control.DisplayPixelValue, NO ); // Object Group Preferences GetDefInt( Control.MultipleObjects, YES ); GetDefInt( Control.UseMaskAndObjects, YES ); // New Dialog GetDefInt( Control.NewDepth, 3 ); GetDefInt( Control.NewWidth, 480 ); GetDefInt( Control.NewHeight, 360 ); GetDefInt( Control.NewResolution, 50 ); // Monitor Gamma Dialog GetDefInt( Control.GammaLock, NO ); // Save file options GetDefInt( Save.bSaveMask, NO ); GetDefInt( Save.OKtoSavePath, NO ); GetDefInt( Save.Compressed, YES ); // Clipboard settings GetDefInt( Control.DoPicture, NO ); GetDefInt( Control.DoBitmap, YES ); // Miscellaneous GetDefInt( Control.ScreenColor, NO ); GetDefRGB( Control.rgbBackground, "0,0,0" ); GetDefInt( Control.xImage, 4 ); GetDefInt( Control.yImage, 4 ); GetDefInt( Control.Hints, YES ); GetDefInt( Control.Save24BitWallpaper, FALSE); GetDefInt( Control.UseObjectMarquee, NO ); // Extended Names GetDefStr( Names.ColorMap, "" ); GetDefStr( Names.Special, "" ); GetDefStr( Names.Mask, "" ); GetDefStr( Names.Printer, "" ); GetDefStr( Names.PrintStyle, "" ); GetDefStr( Names.Clipboard, "" ); GetDefStr( Names.CustomBrush, "" ); // Print Style LoadPrintStyle( Names.PrintStyle ); // Print Dialog GetDefInt( Page.Type, 1 ); Page.Type += IDC_PRINTER_IS_MONO; GetDefInt( Page.PrintNumeric, NO ); GetDefInt( Page.OutputType, 0 ); Page.OutputType += IDC_PRINT_GRAY; GetDefInt( Page.ScatterPrint, NO ); GetDefInt( Page.Centered, YES ); GetDefFix( Page.OffsetX, 0 ); GetDefFix( Page.OffsetY, 0 ); GetDefInt( Page.SepFlags, 0 ); GetDefInt( Page.TrimMarks, NO ); GetDefInt( Page.RegMarks, NO ); GetDefInt( Page.Labels, NO ); GetDefInt( Page.StepScale, NO ); GetDefInt( Page.Negative, NO ); GetDefInt( Page.EmulsionDown, NO ); GetDefInt( Page.BinaryPS, NO ); // Binary Postscript GetDefInt( Page.BinaryEPS, NO ); // Binary Encapsulated Postscript GetDefInt( Page.UsePrinterScreening, YES ); // Size Dialog GetDefInt( Edit.SmartSize, NO ); // Convert settings GetDefInt( Convert.MiniType, 0); Convert.MiniType += IDC_MINI256; GetDefInt( Convert.fOptimize, YES ); GetDefInt( Convert.fScatter, NO ); GetDefInt( Convert.fDither, NO ); // Selector Tool // Mask Transformer Tool GetDefInt( Mask.TransformImage, 1 ); Mask.TransformImage = Mask.TransformImage + IDC_COPYIMAGE; // Object Transformer Tool GetDefInt( Mask.iTransformModes, SHAPE_DEFAULT ); GetDefInt( Mask.PasteQuality, NO ); GetDefInt( Mask.TransMode, 0 ); Mask.TransMode += IDC_TRANSMODEFIRST; GetDefInt( Mask.TransformOpacity, 255 ); Mask.TransformOpacity = bound( Mask.TransformOpacity, 0, 255 ); GetDefMergeMode( Mask.TransformMergeMode, (int)MM_NORMAL ); // Paint Tools HandleBrushSettings( IDC_PAINT, NO ); HandleBrushSettings( IDC_CRAYON, NO ); HandleBrushSettings( IDC_MARKER, NO ); HandleBrushSettings( IDC_LINES, NO ); HandleBrushSettings( IDC_SHAPES, NO ); HandleBrushSettings( IDC_ERASER, NO ); // Gradient Tool GetDefInt( Vignette.Gradient, 0 ); Vignette.Gradient += IDC_VIGLINEAR; GetDefInt( Vignette.RepeatCount, 1 ); GetDefInt( Vignette.SoftTransition, YES ); GetDefInt( Vignette.VigColorModel, 0); GetDefInt( Vignette.VigOpacity, 255 ); GetDefMergeMode( Vignette.VigMergeMode, (int)MM_NORMAL ); GetDefInt( Vignette.Midpoint, 128 ); // Texture Fill Tool GetDefStr( Texture.TextureName, "" ); GetDefInt( Texture.fHorzFlip, NO ); GetDefInt( Texture.fVertFlip, NO ); GetDefInt( Texture.TextureOpacity, 255 ); GetDefMergeMode( Texture.TextureMergeMode, (int)MM_NORMAL ); // Tint Fill Tool GetDefInt( Fill.FillOpacity, 255 ); GetDefMergeMode( Fill.FillMergeMode, (int)MM_NORMAL ); // Magic Fill Tool GetDefInt( Fill.FloodRange, 2 ); GetDefInt( Fill.idFillColorModel, 0); GetDefInt( Fill.FloodOpacity, 255 ); GetDefMergeMode( Fill.FloodMergeMode, (int)MM_NORMAL ); // Custom View Tool GetDefInt( View.ZoomOut, NO ); GetDefInt( View.ZoomWindow, NO ); GetDefInt( View.ZoomDefaultSize, 0x6000); GetDefInt( View.FullScreen, NO ); // Text Tool GetDefInt( Text.nFont, 0 ); GetDefInt( Text.Size, 48 ); GetDefInt( Text.Italic, NO ); GetDefInt( Text.Underline, NO ); GetDefInt( Text.Strikeout, NO ); GetDefInt( Text.Weight, NO ); GetDefInt( Text.AntiAlias, NO ); GetDefInt( Text.AutoFill, YES ); GetDefMergeMode( Text.TextMergeMode, (int)MM_NORMAL ); GetDefInt( Text.TextOpacity, 255 ); // Load Common Tool Settings GetDefInt( Common.Opacity, 255 ); GetDefMergeMode( Common.MergeMode, (int)MM_NORMAL ); GetDefInt( Common.BrushSize, 15 ); SetCommonSettings(); Shields( ON ); LoadFileLocations(); AstralCursor( NULL ); }