Beispiel #1
0
BOOL CMiscPrefPage::OnInitDialog() 
{
	HWND	hDlg = GetSafeHwnd();

  	CPPPropertyPage::OnInitDialog();
	::SetDlgItemText(  hDlg, IDC_PREF_POUCH, Control.PouchPath );
	CheckComboItem(  hDlg, IDC_PREF_TABLET, IDC_PREF_TABLETUNUSED, IDC_PREF_TABLETBOTH, Control.UseTablet+IDC_PREF_TABLETUNUSED );
   	if (::GetDlgItem(hDlg, IDC_PREF_STARTMACRO))
		InitExtNameN( hDlg, IDC_PREF_STARTMACRO, IDC_FILENAME, Names.StartMacro, IDN_MACRO, IDS_NONE, NO );
	CheckComboItem(  hDlg, IDC_PREF_MASKTINT, IDC_PREF_MASKTINT1, IDC_PREF_MASKTINT6, Control.MaskTint + IDC_PREF_MASKTINT1);
	::CheckDlgButton( hDlg, IDC_PREF_TOOLSETTINGS, Control.IndependentSettings);
	::CheckDlgButton( hDlg, IDC_CMS_ENABLED, Control.CMSEnabled);
	::CheckDlgButton( hDlg, IDC_PREF_PASTEATREALSIZE, Mask.PasteAtRealSize);
	::CheckDlgButton( hDlg, IDC_PREF_USEGRAYSCALEICONS, Control.UseGrayScaleIcons);
	::CheckDlgButton( hDlg, IDC_PREF_DISABLEAUTOSCROLL, Control.DisableAutoScroll);
	::CheckDlgButton( hDlg, IDC_PREF_DISABLEDITHER, Vignette.DisableDither);
    if( Control.Retail )
    {
	    TableCheckComboItem(hDlg, IDC_PREF_FILETYPE, FileType_Table,
				    sizeof(FileType_Table)/sizeof(ITEMID),
				    LocalFileType(Control.DefaultFileType),
				    FALSE);
    }
    else
    {
	    TableCheckComboItem(hDlg, IDC_PREF_FILETYPE, FileType_TableOEM,
				    sizeof(FileType_TableOEM)/sizeof(ITEMID),
				    LocalFileType(Control.DefaultFileType),
				    FALSE);
    }
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Beispiel #2
0
LOCAL BOOL SetupMacro(LPQUEUEITEM lpQueueItem)
/***********************************************************************/
{
	LPCMDPKT		lpCmdPkt;
	FNAME		   	szFileName;

	lpCmdPkt = CreatePacket(IDS_CMD_LOADFILE, &lpQueueItem->parms, TRUE);
	if (!lpCmdPkt)
		goto MemError;
	ListAddHead(&lpQueueItem->PacketList, lpCmdPkt);

	// create the new filename
	// add a save command to the end if necessary
	if (Macro.BatchSave == IDC_SAVETOORIGINAL)
		lstrcpy(szFileName, lpQueueItem->szFileName);
	else
	if (Macro.BatchSave == IDC_SAVETODIR)
	{
		lstrcpy(szFileName, Macro.BatchDir);
		lstrcat(szFileName, filename(lpQueueItem->szFileName));
	}
	else
	if (Macro.BatchSave == IDC_SAVETOALBUM)
	{
		lstrcpy(szFileName, Browser.AlbumFileDir);
		lstrcat(szFileName, filename(lpQueueItem->szFileName));
	}

	// if we are changing the file type, then change the extension
	if (Macro.fBatchChangeType &&
		(Macro.BatchSave == IDC_SAVETODIR || Macro.BatchSave == IDC_SAVETOALBUM))
	{
		STRING szExt;

		LookupExtension(LocalFileType(Macro.BatchFileType), szExt);
		stripext(szFileName);
		lstrcat(szFileName, szExt);
	}

	// check to make sure we are not saving to PCD and overwrite warning
	if (Macro.BatchSave != IDC_NOSAVE)
	{
		if (!CheckPCDSave(szFileName))
			return(FALSE);
		if (Macro.BatchSave != IDC_SAVETOORIGINAL)
		{
			if (FileExists(szFileName))
			{
				if (AstralOKCancel (IDS_OVERWRITEIMAGE, (LPTSTR)szFileName) != IDOK)
					return(FALSE);
			}
		}

	}

	if (Macro.BatchSave == IDC_SAVETOALBUM)
	{
		// get a path name from the browser
		SAVETOALBUM_PARMS parms;

		lstrcpy(parms.szAlbum, Macro.BatchAlbum);
		lstrcpy(parms.szFileName, szFileName);
	  	parms.idFileType = 	GetPPFileType(parms.szFileName);
		parms.idDataType = 0;
		parms.EPSOptions = EPSOptions;
		parms.TIFFOptions = TIFFOptions;
		parms.TGAOptions = TGAOptions;
		parms.JPEGOptions = JPEGOptions;
		parms.PPFFOptions = PPFFOptions;
		parms.AVIOptions = AVIOptions;

		// create a command list for the load command
		lpCmdPkt = CreatePacket(IDS_CMD_SAVETOALBUM, &parms, TRUE);
		if (!lpCmdPkt)
			goto MemError;
		ListAddTail(&lpQueueItem->PacketList, lpCmdPkt);
	}
	else
	if (Macro.BatchSave != IDC_NOSAVE)
	{
		SAVEFILE_PARMS parms;

		lstrcpy(parms.szFileName, szFileName);
		parms.idFileType = 	GetPPFileType(parms.szFileName);
		parms.idDataType = 0;
		parms.EPSOptions = EPSOptions;
		parms.TIFFOptions = TIFFOptions;
		parms.TGAOptions = TGAOptions;
		parms.JPEGOptions = JPEGOptions;
		parms.PPFFOptions = PPFFOptions;
		parms.AVIOptions = AVIOptions;

		// create a command list for the load command
		lpCmdPkt = CreatePacket(IDS_CMD_SAVEFILE, &parms, TRUE);
		if (!lpCmdPkt)
			goto MemError;
		ListAddTail(&lpQueueItem->PacketList, lpCmdPkt);
	}
	if (Macro.fBatchClose)
	{
		CMD_PARMS parms;

		// create a command list for the load command
		lpCmdPkt = CreatePacket(IDS_CMD_CLOSE, &parms, TRUE);
		if (!lpCmdPkt)
			goto MemError;
		ListAddTail(&lpQueueItem->PacketList, lpCmdPkt);
	}
	return(TRUE);

MemError:
	Message(IDS_EMEMALLOC);
	return(FALSE);
}