Пример #1
0
void CPluginPrefPage::OnSave()
{
	HandleOK();
	PutDefaultString( PluginPath1_Str, Control.PluginPath1 );
	PutDefaultString( PluginPath2_Str, Control.PluginPath2 );
	PutDefaultInt( UsePlugins_Str, Control.UsePlugins );
}
Пример #2
0
void SaveRecallList()
/***********************************************************************/
{
BYTE tmp[10];
int i;

for (i = 0; i < MAX_RECALL; ++i)
	{
	if (i >= Control.RecallCount)
			PutDefaultString( itoa(i,(char*)tmp,10), "" );
	else	PutDefaultString( itoa(i,(char*)tmp,10), Control.RecallImage[i] );
	}
}
Пример #3
0
BOOL PutDefaultInt( LPSTR lpKeyName, int nDefault )
/************************************************************************/
{
char tmp[40];

return( PutDefaultString( lpKeyName, itoa(nDefault,tmp,10) ) );
}
Пример #4
0
void CMemoryPrefPage::OnSave()
{
	HandleOK();
	PutDefaultString( RamDisk_Str, Control.RamDisk );
	PutDefaultInt( MainMemMin_Str, Control.MainMemMin );
	PutDefaultInt( MainMemFactor_Str, Control.MainMemFactor );
	PutDefaultInt( LineArtAsGray_Str, Control.LineArtAsGray );
}
Пример #5
0
void CUnitsPrefPage::OnSave()
{
	char t[50];

	HandleOK();
	PutDefaultInt( Units_Str, Control.Units - IDC_PREF_UNITINCHES );
	PutDefaultInt( UseRulers_Str, View.UseRulers );
	PutDefaultInt( DisplayPixelValue_Str, Control.DisplayPixelValue );
	PutDefaultString(ScreenWidth_Str,FixedAscii(Control.ScreenWidth,t,-1));
}
Пример #6
0
BOOL SetFileLocation(
/************************************************************************/
WORD 	idFileType,
LPSTR 	lpPath)
{
FNAME szFileName, szExtension;

if ( !LookupExtension( idFileType, szExtension ) )
	return( NO );

/* Whatever disk and directory the user changed to, */
/* store it away so we come back to the same place next time */
lstrcpy( szFileName, lpPath );
stripfile( szFileName );
FixPath( szFileName );
lstrcat( szFileName, szExtension );
if ( Save.OKtoSavePath )
	PutDefaultString( szExtension, szFileName );
lstrcat( szExtension, "temp" );
PutDefaultString( szExtension, szFileName );
return( TRUE );
}
Пример #7
0
void CMiscPrefPage::OnSave()
{
	HandleOK();
	PictPubApp.WriteLocalProfileFileName( PouchPath_Str, Control.PouchPath );
	PutDefaultInt( UseTablet_Str, Control.UseTablet );
	PutDefaultString( StartMacro_Str, Names.StartMacro );
	PutDefaultInt( MaskTint_Str, Control.MaskTint );
	PutDefaultInt( IndependentSettings_Str, Control.IndependentSettings );
	PutDefaultInt( PasteAtRealSize_Str, Mask.PasteAtRealSize );
	PutDefaultInt( UseGrayScaleIcons_Str, Control.UseGrayScaleIcons);
	PutDefaultInt( DisableAutoScroll_Str, Control.DisableAutoScroll);
	PutDefaultInt( ColorManagerEnabled_Str, Control.CMSEnabled );
	PutDefaultInt( DisableDither_Str, Vignette.DisableDither);
	PutDefaultInt( DefaultFileType_Str, Control.DefaultFileType-IDN_FIRSTFILETYPE);
}
Пример #8
0
void LoadFileLocations()
/************************************************************************/
{
FNAME szFileName, szExtension;
int i;
static int items[] =
{ IDN_ART, IDN_TIFF, IDN_BMP,
  IDN_BGMAP, IDN_CALMAP, IDN_TEXTURE, IDN_STYLE,
  IDN_CLIPBOARD, IDN_MASK, IDN_CUSTOM, IDN_PALETTE };

for ( i=0; i<sizeof(items)/sizeof(int); i++ )
	{
	if ( !LookupExtension( items[i], szExtension ) )
		continue;
	GetDefaultString( szExtension, "", szFileName, sizeof(FNAME) );
	lstrcat( szExtension, "temp" );
	PutDefaultString( szExtension, szFileName );
	}
}
Пример #9
0
static void HandleBrushSettings( int idTool, BOOL fPut )
/************************************************************************/
{
LPSTR lp;
BRUSHSETTINGS FAR *Br;
STRING str;
STRING tmp;
LPSTR pName;
int brush;

if ( fPut )
	return; // DON'T WRITE INTO THE INI JUST YET

switch ( idTool )
    {
    case IDC_PAINT:
	pName = "Paint";
	break;
    case IDC_CRAYON:
	pName = "Crayon";
	break;
    case IDC_MARKER:
	pName = "Marker";
	break;
    case IDC_LINES:
	pName = "Lines";
	break;
    case IDC_SHAPES:
	pName = "Shapes";
	break;
    case IDC_ERASER:
	pName = "Eraser";
	break;
    default:
	return;
    }

/* set basic portion of property name */
lstrcpy( str, pName );
lp = str + lstrlen( str);

if ( fPut )
	SaveRetouchBrush( idTool );

/* set basic portion of property name */
lstrcpy( str, pName );
lp = str + lstrlen( str);
brush = GetBrushIndex( idTool );
Br = &lpBrushSettings[brush];

lstrcpy( lp, "BrushShape");
if (fPut)
	PutDefaultString( str, itoa( Br->BrushShape - IDC_BRUSHCIRCLE, tmp, 10));
else
	Br->BrushShape = GetDefaultInt( str, 0 ) + IDC_BRUSHCIRCLE;
lstrcpy( lp, "BrushSize");
if (fPut)
	PutDefaultString( str, itoa( Br->BrushSize, tmp, 10));
else
	Br->BrushSize = GetDefaultInt( str, 15 );
lstrcpy( lp, "Opacity");
if (fPut)
	PutDefaultString( str, itoa( Br->Opacity, tmp, 10));
else
	Br->Opacity = GetDefaultInt( str, 255 );
lstrcpy( lp, "Pressure");
if (fPut)
	PutDefaultString( str, itoa( Br->Pressure, tmp, 10));
else
	Br->Pressure = GetDefaultInt( str, 64 );
lstrcpy( lp, "MergeMode");
if (fPut)
	PutDefaultString( str, itoa( Br->MergeMode, tmp, 10));
else
	Br->MergeMode = (MERGE_MODE)GetDefaultInt( str, (int)MM_NORMAL );
lstrcpy( lp, "Feather");
if (fPut)
	PutDefaultString( str, itoa( Br->Feather, tmp, 10));
else
	Br->Feather = GetDefaultInt( str, 100 );
lstrcpy( lp, "StyleName" );
if ( fPut )
	PutDefaultString( str, Retouch.StyleName );
else
	GetDefaultString( str, "", Retouch.StyleName, sizeof(FNAME) );
}