[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1357
Date       : Sun Jun 25 12:31:51 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   M /Trunk/XaraLX/Kernel/appprefs.cpp
   M /Trunk/XaraLX/Kernel/cameleps.cpp
   M /Trunk/XaraLX/Kernel/debugdlg.cpp
   M /Trunk/XaraLX/Kernel/opimgset.cpp
   M /Trunk/XaraLX/Kernel/optsprin.cpp
   M /Trunk/XaraLX/Kernel/psrndrgn.cpp
   M /Trunk/XaraLX/Kernel/view.cpp
   M /Trunk/XaraLX/wxOil/Makefile.am
   M /Trunk/XaraLX/wxOil/dibutil.cpp
   M /Trunk/XaraLX/wxOil/grndprnt.cpp
   M /Trunk/XaraLX/wxOil/grndrgn.cpp
   M /Trunk/XaraLX/wxOil/oilbitmap.cpp
   M /Trunk/XaraLX/wxOil/osrndrgn.cpp
   M /Trunk/XaraLX/wxOil/prdlgctl.cpp

More printing work


Diff:
Index: Trunk/XaraLX/Kernel/appprefs.cpp
===================================================================
--- Trunk/XaraLX/Kernel/appprefs.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/appprefs.cpp	(revision 1357)
@@ -1661,10 +1661,7 @@
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	ADD_OPTIONSTAB(PointersTab)		// Mouse
-PORTNOTE("other", "Disabled print general tab")
-#ifndef EXCLUDE_FROM_XARALX
 	ADD_OPTIONSTAB(PrintGeneralTab)	// Output
-#endif
 #endif //webster
 	ADD_OPTIONSTAB(PageTab)			// Page
 #ifdef PHOTOSHOPPLUGINS
@@ -1673,17 +1670,11 @@
 #endif
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
-PORTNOTE("other", "Disabled print layout tab")
-#ifndef EXCLUDE_FROM_XARALX
 	ADD_OPTIONSTAB(PrintLayoutTab)	// Print layout
-#endif
 	ADD_OPTIONSTAB(ScaleTab)		// Scaling
 #ifdef BUILD_SEPARATIONS
-PORTNOTE("other", "Disabled print separations tab")
-#ifndef EXCLUDE_FROM_XARALX
 	ADD_OPTIONSTAB(PrintSepsTab)	// Separation (Colour) 
 #endif
-#endif
 	ADD_OPTIONSTAB(TuneTab)			// Tune ups
 //	ADD_OPTIONSTAB(UndoTab)
 	ADD_OPTIONSTAB(UnitsTab)		// Units
Index: Trunk/XaraLX/Kernel/psrndrgn.cpp
===================================================================
--- Trunk/XaraLX/Kernel/psrndrgn.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/psrndrgn.cpp	(revision 1357)
@@ -170,7 +170,7 @@
 	// Flush the DC
 	pPSPrintDC->FlushDC();
 
-	pPSPrintDC->StartOSOutput();
+	pPSPrintDC->EndOSOutput();
 
 	// Karim 06/06/2000 - free the memory! (hope this doesn't blow up something else...)
 	// AB: Don't do this. RenderRegion's destructor deletes RenderDC
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 1356)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 1357)
@@ -76,7 +76,8 @@
 	ai_bmp.cpp ai_grad.cpp freeeps.cpp swffiltr.cpp swfrndr.cpp swfbitmp.cpp \
 	swfbuttn.cpp swffont.cpp swfplace.cpp swfrndr.cpp swfshape.cpp swfsprit.cpp \
 	swfexpdc.cpp swftext.cpp pmaskrgn.cpp printctl.cpp prnmkcom.cpp prnmks.cpp \
-	xsepsops.cpp xarprefs.cpp printing.cpp prntview.cpp psrndrgn.cpp
+	xsepsops.cpp xarprefs.cpp printing.cpp prntview.cpp psrndrgn.cpp opimgset.cpp \
+	optsprin.cpp
 
 
 AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/view.cpp
===================================================================
--- Trunk/XaraLX/Kernel/view.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/view.cpp	(revision 1357)
@@ -124,7 +124,7 @@
 #include "princomp.h"
 #include "printctl.h"
 //#include "prncamvw.h"
-//#include "prdlgctl.h"
+#include "prdlgctl.h"
 #include "cameleps.h"
 //#include "tim.h"
 #include "progress.h"
@@ -1656,8 +1656,6 @@
 
 ProgressDisplay::ProgressDisplay()
 {
-	PORTNOTETRACE("printing","Disabled CCPrintInfo");
-#ifndef EXCLUDE_FROM_XARALX
 	//	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 #ifndef STANDALONE
@@ -1666,7 +1664,6 @@
 	pPrintInfo = NULL;
 #endif
 #endif //webster
-#endif
 	DoProgressDisplay = FALSE;
 	IsPrinting = FALSE;
 	NumNodesRendered = 0;
@@ -1726,8 +1723,6 @@
 
 	// Work out whether to count just selected objects, or all of them.
 	BOOL CountAllObjects = TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && pPrintInfo != NULL)
@@ -1737,7 +1732,6 @@
 		CountAllObjects = (pPrCtrl->GetObjPrintRange() == PRINTRANGEOBJ_ALL);
 	}
 #endif //webster
-#endif
 	if (CountAllObjects)
 	{
 		// Count *all* objects
@@ -1808,8 +1802,6 @@
 	}
 
 	INT32 Range = FirstStageCount + SecondStageCount + ThirdStageCount;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting)
@@ -1829,7 +1821,6 @@
 	}
 	else
 #endif //wesbter
-#endif
 	{
 		// Start progress display (with no initial delay) for Camelot EPS export
 		String_64 ExportMsg(_R(IDT_EXPORTMSG_CAMEPS));
@@ -1870,21 +1861,16 @@
 	if (!DoProgressDisplay)
 		// No progress display needed.
 		return TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && (pPrintInfo != NULL) && (pPrintInfo->m_bContinuePrinting == FALSE))
 		// User has cancelled job
 		return FALSE;
 #endif //webster
-#endif
 	if ((NumNodesRendered * ProgressScaleFactor) > (LastProgressUpdate + ProgressInterval))
 	{
 		// Time to update the progress display.
 		LastProgressUpdate = NumNodesRendered * ProgressScaleFactor;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 		if (IsPrinting && pPrintInfo != NULL)
@@ -1898,8 +1884,7 @@
 		}
 		else
 #endif //webster
-#endif
-			return ContinueSlowJob(LastProgressUpdate);
+		return ContinueSlowJob(LastProgressUpdate);
 	}
 
 #endif
@@ -1931,15 +1916,12 @@
 	if (!DoProgressDisplay)
 		// No progress display needed.
 		return TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && pPrintInfo != NULL)
 		pPrintInfo->SetSliderSubRangePos(NumNodesRendered * ProgressScaleFactor);
 	else
 #endif //webster
-#endif
 		return ContinueSlowJob(NumNodesRendered * ProgressScaleFactor);
 
 #endif
@@ -1971,8 +1953,6 @@
 	if (!DoProgressDisplay)
 		// No progress display needed.
 		return TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && pPrintInfo != NULL)
@@ -1986,7 +1966,6 @@
 	}
 	else
 #endif //webster
-#endif
 		return ContinueSlowJob(NumNodesRendered * ProgressScaleFactor);
 
 #endif
@@ -2092,8 +2071,6 @@
 		BandOffset = BandSize;
 	INT32 ProgressPos = (NumNodesRendered * ProgressScaleFactor) + BandOffset;
 
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	// Update progress indicators
@@ -2108,7 +2085,6 @@
 	}
 	else
 #endif //webster
-#endif
 		return ContinueSlowJob(ProgressPos);
 
 #endif
@@ -2142,8 +2118,6 @@
 	NumNodesRendered += (BandSize / ProgressScaleFactor);
 	if (NumNodesRendered > (FirstStageCount + SecondStageCount))
 		NumNodesRendered = (FirstStageCount + SecondStageCount);
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && pPrintInfo != NULL)
@@ -2157,7 +2131,6 @@
 	}
 	else
 #endif //webster
-#endif
 		return ContinueSlowJob(NumNodesRendered * ProgressScaleFactor);
 #endif
 	// All ok
@@ -2197,8 +2170,6 @@
 	BOOL RenderAllObjects = TRUE;
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
-	PORTNOTETRACE("print","Disabled CCPrintInfo");
-#ifndef EXCLUDE_FROM_XARALX
 	if (pRender->IsPrinting())
 	{
 		CCPrintInfo *pPrintInfo = CCPrintInfo::GetCurrent();
@@ -2209,7 +2180,6 @@
 			RenderAllObjects = (pPrCtrl->GetObjPrintRange() == PRINTRANGEOBJ_ALL);
 		}
 	}
-#endif
 #endif //webster
 	// Render nodes into specified render region
 	while ((pNode!=NULL) && (pNode != pLastComplexNode))
@@ -2763,8 +2733,6 @@
 
 		// Work out whether we need to render all objects, or just the selected ones.
 		BOOL RenderAllObjects = TRUE;
-PORTNOTE("printing", "Disabled printing")
-#ifndef EXCLUDE_FROM_XARALX
 		CCPrintInfo *pPrintInfo = NULL;
 		if (Printing)
 		{
@@ -2776,12 +2744,11 @@
 			}
 		}
 
-		BOOL ReallyPrinting = Printing && (pPrintInfo != NULL);
+//		BOOL ReallyPrinting = Printing && (pPrintInfo != NULL);
 
 		// We going to analyse the document
 		if (pPrintInfo != NULL)
 			pPrintInfo->SetAnalysing();
-#endif
 
 		ScannerRenderCallback ScanCallback(this, RenderAllObjects, &Scanner);
 
@@ -2797,12 +2764,9 @@
 //		Scanner.DumpNodeRuns();
 #endif
 
-PORTNOTE("printing", "Disabled printing")
-#ifndef EXCLUDE_FROM_XARALX
 		// We going to print the document now
 		if (pPrintInfo != NULL)
 			pPrintInfo->SetPrinting();
-#endif
 
 		// Set up the matrix and clipping rect
 		pRender->SetMatrix(ViewTrans);
@@ -3530,8 +3494,6 @@
 
 	// Work out whether we need to render all objects, or just the selected ones.
 	BOOL RenderAllObjects = TRUE;
-PORTNOTE("other", "disabled CCPrintInfo");
-#ifndef EXCLUDE_FROM_XARALX
 #ifndef WEBSTER
 	CCPrintInfo *pPrintInfo = NULL;
 	if (!bIsOnScreen && pRender->IsPrinting())
@@ -3545,7 +3507,6 @@
 		}
 	}
 #endif //webster
-#endif
 	// Create and set up a new Scanning render region
 	ScanningRenderRegion Scanner(pRender->IsPrinting());
 
@@ -3593,14 +3554,11 @@
 		Scanner.SetHostRRCaps(Caps);
 
 		//	WEBSTER-ranbirr-13/11/96
-PORTNOTE("other", "disabled CCPrintInfo");
-#ifndef EXCLUDE_FROM_XARALX
 #ifndef WEBSTER
 		// We going to analyse the document
 		if (pPrintInfo != NULL)
 			pPrintInfo->SetAnalysing();
 #endif //webster
-#endif
 		// Find the first node to render
 //		pFirstInkNode = pSpread->FindFirstForUnclippedInkRender(&Scanner);
 //		Scanner.SetRenderState(pFirstInkNode);
@@ -3615,14 +3573,11 @@
 	}
 	
 	//	WEBSTER-ranbirr-13/11/96
-PORTNOTE("other", "disabled CCPrintInfo");
-#ifndef EXCLUDE_FROM_XARALX
 #ifndef WEBSTER
 	// We going to print the document now
 	if (pPrintInfo != NULL)
 		pPrintInfo->SetPrinting();
 #endif //webster
-#endif
 
 	// Ok, we now have a Scanning render region that has all the info we need to know in it.
 	// See if there were any complex shapes in the region
@@ -4164,8 +4119,6 @@
 	BOOL RenderAllObjects = TRUE;
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
-PORTNOTE("printing", "Disabled printing")
-#ifndef EXCLUDE_FROM_XARALX
 	if (pRender->IsPrinting())
 	{
 		CCPrintInfo *pPrintInfo = CCPrintInfo::GetCurrent();
@@ -4176,7 +4129,6 @@
 			RenderAllObjects = (pPrCtrl->GetObjPrintRange() == PRINTRANGEOBJ_ALL);
 		}
 	}
-#endif
 #endif //webster
 	// Render nodes into specified render region
 	while ((pNode!=NULL) && (pNode != pLastComplexNode))
@@ -4277,8 +4229,6 @@
 
 	// Work out whether to count just selected objects, or all of them.
 	BOOL CountAllObjects = TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if ((IsPrinting) && (pPrintInfo!=NULL))
@@ -4287,27 +4237,17 @@
 		CountAllObjects = (pPrCtrl->GetObjPrintRange() == PRINTRANGEOBJ_ALL);
 	}
 #endif //webster
-#endif
 
 	OptimalPrintRenderCallback MyCallback(pRender->GetRenderView(), pSpread, CountAllObjects, pScanner, FALSE, &TotalNodes, NULL, TRUE);
 	pRender->RenderTree(pSpread, FALSE, FALSE, &MyCallback);
 
 	TRACE( _T("TotalNodes = %d
"), TotalNodes);
 
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	// Set up the slider according to the printing flag
 	if (IsPrinting)
 	{
-//		if (pPrintInfo == NULL)
-//		{
-//			ERROR2RAW("No PrintInfo object found!");
-//			InformError();
-//			return;
-//		}
-
 		if (pPrintInfo != NULL)
 		{
 			// actually set the slider
@@ -4318,7 +4258,6 @@
 	}
 	else
 #endif //webster
-#endif
 	{
 		// Start progress display (with no initial delay) for Camelot EPS export
 		String_64 ExportMsg(_R(IDT_EXPORTMSG_CAMEPS));
@@ -4359,22 +4298,17 @@
 	if (!DoProgressDisplay)
 		// No progress display needed.
 		return TRUE;
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (IsPrinting && (pPrintInfo != NULL) && (pPrintInfo->m_bContinuePrinting == FALSE))
 		// User has cancelled job
 		return FALSE;
 #endif //webster
-#endif
 	if ((NumNodesRendered * ProgressScaleFactor) > (LastProgressUpdate + ProgressInterval))
 	{
 		// Time to update the progress display.
 		LastProgressUpdate = NumNodesRendered * ProgressScaleFactor;
 	//	WEBSTER-ranbirr-13/11/96
-PORTNOTE("printing","Disabled CCPrintInfo")
-#ifndef EXCLUDE_FROM_XARALX
 #ifndef WEBSTER
 		if (IsPrinting && pPrintInfo != NULL)
 		{
@@ -4387,7 +4321,6 @@
 		}
 		else
 #endif //webster
-#endif
 			return ContinueSlowJob(LastProgressUpdate);
 	}
 
Index: Trunk/XaraLX/Kernel/opimgset.cpp
===================================================================
--- Trunk/XaraLX/Kernel/opimgset.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/opimgset.cpp	(revision 1357)
@@ -101,7 +101,7 @@
 #include "camtypes.h"
 
 //#include "app.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-#include "mainfrm.h"
+#include "camframe.h"
 //#include "attrmgr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 //#include "barsdlgs.h"
 #include "colcontx.h"
@@ -114,7 +114,7 @@
 #include "opimgset.h"
 #include "progress.h"
 //#include "simon.h"			// for _R(IDS_NO_OBJECTS_SELECTED)
-#include "xaracms.h"
+//#include "xaracms.h"
 //#include "gerry.h"
 
 
@@ -368,7 +368,7 @@
 	{
 		String Token = OpDesc->Token;
 		INT32 WhichToggle = 0;
-		INT32 WhichSpot = 0;
+//		INT32 WhichSpot = 0;
 		INT32 TokenSpot = 0;
 		ColourPlateType TokenPlate = COLOURPLATE_NONE;
 		IndexedColour* pSpotColour = NULL;
@@ -417,9 +417,12 @@
 			// To restore normal view, we just remove any attached ColourPlate from the view
 			DocView::GetSelected()->SetColourPlate(NULL);
 			ColourManager::SelViewContextHasChanged();	// Redraw everything which is affected
-			CMainFrame* pMainFrame = GetMainFrame();
+PORTNOTE("printing", "Disabled SetPrinterColourStatus")
+#ifndef EXCLUDE_FROM_XARALX
+			CCamFrame* pMainFrame = CCamFrame::GetMainFrame();
 			if (pMainFrame)
 				pMainFrame->SetPrinterColourStatus(FALSE);
+#endif
 		}
 		else
 		{
@@ -429,10 +432,12 @@
 			// we get XaraCMS to cache its lookup table now. If no deep bitmaps are rendered,
 			// this is wasteful, but better than getting a several-second delay part-way
 			// through the next document redraw.
+PORTNOTE("printing", "Disabled SetPrinterColourStatus")
+#ifndef EXCLUDE_FROM_XARALX
 			Progress::Start();		// Fail to show an hourglass (this doesn't work for some reason)
 			DWORD *Dummy = GetApplication()->GetCMSManager()->GetPaperViewTable();
 			Progress::Stop();
-			CMainFrame* pMainFrame = GetMainFrame();
+			CCamFrame* pMainFrame = CCamFrame::GetMainFrame();
 			if (pMainFrame)
 			{
 				String_256 sPlateName;
@@ -462,6 +467,7 @@
 				
 				pMainFrame->SetPrinterColourStatus(TRUE, &sPlateName);
 			}
+#endif
 		}
 	}
 
@@ -862,7 +868,7 @@
 						FALSE,						// Smart duplicate operation
 						FALSE,						// NOT Clean operation
 						NULL,						// No vertical counterpart
-						NULL,						// String for one copy only error
+						0,							// String for one copy only error
 						GREY_WHEN_NO_SELECTION |	// Auto state flags
 						DONT_GREY_WHEN_SELECT_INSIDE
 					));
@@ -1019,7 +1025,7 @@
 						FALSE,						// No smart duplicate operation
 						FALSE,						// Not Clean operation
 						NULL,						// No vertical counterpart
-						NULL,						// String for one copy only error
+						0,							// String for one copy only error
 						GREY_WHEN_NO_SELECTION |	// Auto state flags
 						DONT_GREY_WHEN_SELECT_INSIDE
 					));
@@ -1178,7 +1184,7 @@
 						FALSE,						// Smart duplicate operation
 						FALSE,						// NOT Clean operation
 						NULL,						// No vertical counterpart
-						NULL,						// String for one copy only error
+						0,							// String for one copy only error
 						GREY_WHEN_NO_SELECTION |	// Auto state flags
 						DONT_GREY_WHEN_SELECT_INSIDE
 					));
Index: Trunk/XaraLX/Kernel/optsprin.cpp
===================================================================
--- Trunk/XaraLX/Kernel/optsprin.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/optsprin.cpp	(revision 1357)
@@ -135,11 +135,11 @@
 //#include "fillval.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "sglayer.h"
 #include "keypress.h"
-#include "printprg.h"
+//#include "printprg.h"
 #endif
 
 //#include "will2.h"
-#include "customlist.h"
+//#include "customlist.h"
 
 CC_IMPLEMENT_DYNAMIC(PrintBaseTab,  		OptionsTabs)
 CC_IMPLEMENT_DYNAMIC(PrintGeneralTab, 		PrintBaseTab)
@@ -166,6 +166,22 @@
 PrintControl PrintBaseTab::LocalPrintControl;
 Document *PrintBaseTab::pLastPrintControlDocument = NULL;
 
+static CGadgetID ScreenIDs[] =	// NULL terminated list of Screen control IDs
+{
+	//Screen types
+	_R(SCREEN_TYPE_BASE),
+	_R(IDS_SCRTYPE_SPOT1),
+	_R(IDS_SCRTYPE_SPOT2),
+	_R(IDS_SCRTYPE_TRIPLESPOT1),
+	_R(IDS_SCRTYPE_TRIPLESPOT2),
+	_R(IDS_SCRTYPE_ELLIPTICAL),
+	_R(IDS_SCRTYPE_LINE),
+	_R(IDS_SCRTYPE_CROSSHATCH),
+	_R(IDS_SCRTYPE_MEZZOTINT),
+	_R(IDS_SCRTYPE_SQUARE),
+	_R(IDS_SCRTYPE_DITHER),
+	0
+};
 
 
 /********************************************************************************************
@@ -332,7 +348,7 @@
 void PrintBaseTab::UpdateDocName()
 {
 	if (pPrefsDlg != NULL && TalkToPage())
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME),GetDocumentName());
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME),*GetDocumentName());
 }
 
 
@@ -775,6 +791,7 @@
 
 
 		case DIM_CANCEL:
+		{
 			// Vape the cached print control info
 			pLastPrintControlDocument = NULL;
 
@@ -783,6 +800,10 @@
 			PrintControl BlankPC;
 			LocalPrintControl = BlankPC;
 			break;
+		}
+
+		default:
+			break;
 	}
 
 	return TRUE;
@@ -895,93 +916,89 @@
 	{
 		case DIM_LFT_BN_CLICKED:
 			OptionsTabs::SetApplyNowState(TRUE);
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			// Print layers
+			else if (Msg->GadgetID == _R(IDC_ALLFOREGROUND))
 			{
-				// Print layers
-				case _R(IDC_ALLFOREGROUND):
-					LocalPrintControl.SetPrintLayers(PRINTLAYERS_ALLFOREGROUND);
-					break;
-				case _R(IDC_VISIBLEFOREGROUND):
-					LocalPrintControl.SetPrintLayers(PRINTLAYERS_VISIBLEFOREGROUND);
-					break;
+				LocalPrintControl.SetPrintLayers(PRINTLAYERS_ALLFOREGROUND);
+			}
+			else if (Msg->GadgetID == _R(IDC_VISIBLEFOREGROUND))
+			{
+				LocalPrintControl.SetPrintLayers(PRINTLAYERS_VISIBLEFOREGROUND);
+			}
+#if 0
+			// Job 10463: remove PS Level bits - default to Level 2
+			// Postscript language level
+			else if (Msg->GadgetID == _R(IDC_PSLEVELAUTO))
+			{
+				LocalPrintControl.SetPSLevel(PSLEVEL_AUTO);
+			}
+			else if (Msg->GadgetID == _R(IDC_PSLEVEL1))
+			{
+				LocalPrintControl.SetPSLevel(PSLEVEL_1);
+			}
+			else if (Msg->GadgetID == _R(IDC_PSLEVEL2))
+			{
+				LocalPrintControl.SetPSLevel(PSLEVEL_2);
+			}
+#endif
+			// Print method
+			else if (Msg->GadgetID == _R(IDC_PRINTMETHOD_NORMAL))
+			{
+				LocalPrintControl.SetPrintMethod(PRINTMETHOD_NORMAL);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_PRINTMETHOD_BITMAP))
+			{
+				LocalPrintControl.SetPrintMethod(PRINTMETHOD_BITMAP);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_PRINTMETHOD_AABITMAP))
+			{
+				LocalPrintControl.SetPrintMethod(PRINTMETHOD_AABITMAP);
+				ShowDetails();
+			}
 
-				/*
-				// Job 10463: remove PS Level bits - default to Level 2
-				// Postscript language level
-				case _R(IDC_PSLEVELAUTO):
-					LocalPrintControl.SetPSLevel(PSLEVEL_AUTO);
-					break;
-				case _R(IDC_PSLEVEL1):
-					LocalPrintControl.SetPSLevel(PSLEVEL_1);
-					break;
-				case _R(IDC_PSLEVEL2):
-					LocalPrintControl.SetPSLevel(PSLEVEL_2);
-					break;
-				*/
+			// Bitmap DPI
+			else if (Msg->GadgetID == _R(IDC_DPIAUTO))
+			{
+				LocalPrintControl.SetBitmapResMethod(BITMAPRES_AUTO);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_DPIMANUAL))
+			{
+				LocalPrintControl.SetBitmapResMethod(BITMAPRES_MANUAL);
+				ShowDetails();
+			}
+			// Text options
+			else if (Msg->GadgetID == _R(IDC_ALLTEXTASSHAPES))
+			{
+				PrintTextOptions pto = LocalPrintControl.GetTextOptions();
+				pto = (pto == PRINTTEXTOPTIONS_NORMAL) ? PRINTTEXTOPTIONS_ALLTEXTASSHAPES
+														: PRINTTEXTOPTIONS_NORMAL;
+				LocalPrintControl.SetTextOptions(pto);
+				ShowDetails();
+			}
 
-				// Print method
-				case _R(IDC_PRINTMETHOD_NORMAL):
-					LocalPrintControl.SetPrintMethod(PRINTMETHOD_NORMAL);
-					ShowDetails();
-					break;
-				case _R(IDC_PRINTMETHOD_BITMAP):
-					LocalPrintControl.SetPrintMethod(PRINTMETHOD_BITMAP);
-					ShowDetails();
-					break;
-				case _R(IDC_PRINTMETHOD_AABITMAP):
-					LocalPrintControl.SetPrintMethod(PRINTMETHOD_AABITMAP);
-					ShowDetails();
-					break;
-
-				// Bitmap DPI
-				case _R(IDC_DPIAUTO):
-					LocalPrintControl.SetBitmapResMethod(BITMAPRES_AUTO);
-					ShowDetails();
-					break;
-
-				case _R(IDC_DPIMANUAL):
-					LocalPrintControl.SetBitmapResMethod(BITMAPRES_MANUAL);
-					ShowDetails();
-					break;
-
-				// Text options
-				case _R(IDC_ALLTEXTASSHAPES):
-				{
-					PrintTextOptions pto = LocalPrintControl.GetTextOptions();
-					pto = (pto == PRINTTEXTOPTIONS_NORMAL) ? PRINTTEXTOPTIONS_ALLTEXTASSHAPES
-														   : PRINTTEXTOPTIONS_NORMAL;
-					LocalPrintControl.SetTextOptions(pto);
-					ShowDetails();
-					break;
-				}
-			}
 			break; 
 
 		case DIM_SELECTION_CHANGED:
 			OptionsTabs::SetApplyNowState(TRUE);
-			switch (Msg->GadgetID)
+			if (Msg->GadgetID == _R(IDC_FILLQUALLIST))
 			{
-				case _R(IDC_FILLQUALLIST):
-					{
-						WORD Index;
-						pPrefsDlg->GetValueIndex(_R(IDC_FILLQUALLIST),&Index); 
-						LocalPrintControl.SetFillQuality(PrintFillQuality(Index));
-						ShowDetails();
-					}
-					break;
+				WORD Index;
+				pPrefsDlg->GetValueIndex(_R(IDC_FILLQUALLIST),&Index); 
+				LocalPrintControl.SetFillQuality(PrintFillQuality(Index));
+				ShowDetails();
 			}
 			break;
 
 		case DIM_TEXT_CHANGED:
 			OptionsTabs::SetApplyNowState(TRUE);
-			switch (Msg->GadgetID)
+			if (Msg->GadgetID == _R(IDC_DPIEDIT))
 			{
-				case _R(IDC_DPIEDIT):
-					{
-						INT32 DPI = pPrefsDlg->GetLongGadgetValue(_R(IDC_DPIEDIT),0,0);
-						LocalPrintControl.SetDotsPerInch(DPI);
-					}
-					break;
+				INT32 DPI = pPrefsDlg->GetLongGadgetValue(_R(IDC_DPIEDIT),0,0);
+				LocalPrintControl.SetDotsPerInch(DPI);
 			}
 			break;
 
@@ -1018,6 +1035,7 @@
 
 	if (!TalkToPage())
 		return TRUE;	// Just return if TalkToPage() fails
+
 /*
 	//---
 	// RANGE CHECK ALL VALUES TO MAKE SURE THEY ARE SENSIBLE
@@ -1045,20 +1063,22 @@
 	pPrCtrl->SetPrintLayers((Result) ? PRINTLAYERS_ALLFOREGROUND : PRINTLAYERS_VISIBLEFOREGROUND);
 
 	CGadgetID PSGadgets[] = { _R(IDC_PSLEVELAUTO), _R(IDC_PSLEVEL1), _R(IDC_PSLEVEL2), NULL };
-	switch(pPrefsDlg->GetRadioGroupSelected(PSGadgets))
-	{
-		case _R(IDC_PSLEVELAUTO):	pPrCtrl->SetPSLevel(PSLEVEL_AUTO);	break;
-		case _R(IDC_PSLEVEL1):		pPrCtrl->SetPSLevel(PSLEVEL_1);		break;
-		case _R(IDC_PSLEVEL2):		pPrCtrl->SetPSLevel(PSLEVEL_2);		break;
-	}
+	ResourceID PSRadio = pPrefsDlg->GetRadioGroupSelected(PSGadgets);
+	if (PSRadio == _R(IDC_PSLEVELAUTO))
+		pPrCtrl->SetPSLevel(PSLEVEL_AUTO);
+	else if (PSRadio == _R(IDC_PSLEVEL1))
+		pPrCtrl->SetPSLevel(PSLEVEL_1);
+	else if (PSRadio == _R(IDC_PSLEVEL2))
+		pPrCtrl->SetPSLevel(PSLEVEL_2);
 
 	CGadgetID MethodGadgets[] = { _R(IDC_PRINTMETHOD_NORMAL), _R(IDC_PRINTMETHOD_BITMAP), _R(IDC_PRINTMETHOD_AABITMAP), NULL };
-	switch(pPrefsDlg->GetRadioGroupSelected(MethodGadgets))
-	{
-		case _R(IDC_PRINTMETHOD_NORMAL):	pPrCtrl->SetPrintMethod(PRINTMETHOD_NORMAL);	break;
-		case _R(IDC_PRINTMETHOD_BITMAP):	pPrCtrl->SetPrintMethod(PRINTMETHOD_BITMAP);	break;
-		case _R(IDC_PRINTMETHOD_AABITMAP):	pPrCtrl->SetPrintMethod(PRINTMETHOD_AABITMAP);	break;
-	}
+	ResourceID MethodRadio = GetRadioGroupSelected(MethodGadgets));
+	if (MethodRadio == _R(IDC_PRINTMETHOD_NORMAL))
+		pPrCtrl->SetPrintMethod(PRINTMETHOD_NORMAL);
+	else if (MethodRadio == _R(IDC_PRINTMETHOD_BITMAP))
+		pPrCtrl->SetPrintMethod(PRINTMETHOD_BITMAP);
+	else if (MethodRadio == _R(IDC_PRINTMETHOD_AABITMAP))
+		pPrCtrl->SetPrintMethod(PRINTMETHOD_AABITMAP);
 
 	CGadgetID DPIGadgets[] = { _R(IDC_DPIAUTO), _R(IDC_DPIMANUAL), NULL };
 	Result = (pPrefsDlg->GetRadioGroupSelected(DPIGadgets) == _R(IDC_DPIAUTO));
@@ -1127,7 +1147,7 @@
 	else
 		Str.Load(_R(IDS_K_OPTSPRIN_NORMAL));
 
-	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINTMETHOD_NORMAL),&Str);
+	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINTMETHOD_NORMAL),Str);
 
 	// Bitmap resolution
 	BitmapResMethod brm = LocalPrintControl.GetBitmapResMethod();
@@ -1139,7 +1159,7 @@
 	if (pm == PRINTMETHOD_NORMAL) 	Str.Load(_R(IDS_K_OPTSPRIN_TRANSRES));
 	if (pm == PRINTMETHOD_BITMAP) 	Str.Load(_R(IDS_K_OPTSPRIN_BITMAPRES));
 	if (pm == PRINTMETHOD_AABITMAP) Str.Load(_R(IDS_K_OPTSPRIN_AABITMAPRES));
-	pPrefsDlg->SetStringGadgetValue(_R(IDC_GROUP_DPI),&Str);
+	pPrefsDlg->SetStringGadgetValue(_R(IDC_GROUP_DPI),Str);
 
 	//  Fill quality group
 	pPrefsDlg->SetSelectedValueIndex(_R(IDC_FILLQUALLIST),INT32(LocalPrintControl.GetFillQuality()));
@@ -1301,46 +1321,50 @@
 		case DIM_LFT_BN_CLICKED:
 			OptionsTabs::SetApplyNowState(TRUE);
 
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			// Orientation
+			else if (Msg->GadgetID == _R(IDC_BTN_UPRIGHT))
 			{
-				// Orientation
-				case _R(IDC_BTN_UPRIGHT):
-					LocalPrintControl.SetPrintOrient(PRINTORIENTATION_UPRIGHT);
-					ShowDetails();
-					break;
-				case _R(IDC_BTN_SIDEWAYS):
-					LocalPrintControl.SetPrintOrient(PRINTORIENTATION_SIDEWAYS);
-					ShowDetails();
-					break;
-
-				// DPS buttons
-				case _R(IDC_DPS_INDIVIDUALPAGES):
-					LocalPrintControl.SetWholeSpread(FALSE);
-					ShowDetails();
-					break;
-				case _R(IDC_DPS_WHOLESPREAD):
-					LocalPrintControl.SetWholeSpread(TRUE);
-					ShowDetails();
-					break;
-
-				// Fit type
-				case _R(IDC_BESTFIT):
-					LocalPrintControl.SetFitType(PRINTFIT_BEST);
-					ShowDetails();
-					break;
-				case _R(IDC_CUSTOMFIT):
-					LocalPrintControl.SetFitType(PRINTFIT_CUSTOM);
-					ShowDetails();
-					break;
-				case _R(IDC_MULTIPLEFIT):
-					LocalPrintControl.SetFitType(PRINTFIT_MULTIPLE);
-					ShowDetails();
-					break;
-				case _R(IDC_BESTFITPAPER):
-					LocalPrintControl.SetFitType(PRINTFIT_BESTPAPER);
-					ShowDetails();
-					break;
+				LocalPrintControl.SetPrintOrient(PRINTORIENTATION_UPRIGHT);
+				ShowDetails();
 			}
+			else if (Msg->GadgetID == _R(IDC_BTN_SIDEWAYS))
+			{
+				LocalPrintControl.SetPrintOrient(PRINTORIENTATION_SIDEWAYS);
+				ShowDetails();
+			}
+			// DPS buttons
+			else if (Msg->GadgetID == _R(IDC_DPS_INDIVIDUALPAGES))
+			{
+				LocalPrintControl.SetWholeSpread(FALSE);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_DPS_WHOLESPREAD))
+			{
+				LocalPrintControl.SetWholeSpread(TRUE);
+				ShowDetails();
+			}
+			// Fit type
+			else if (Msg->GadgetID == _R(IDC_BESTFIT))
+			{
+				LocalPrintControl.SetFitType(PRINTFIT_BEST);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_CUSTOMFIT))
+			{
+				LocalPrintControl.SetFitType(PRINTFIT_CUSTOM);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_MULTIPLEFIT))
+			{
+				LocalPrintControl.SetFitType(PRINTFIT_MULTIPLE);
+				ShowDetails();
+			}
+			else if (Msg->GadgetID == _R(IDC_BESTFITPAPER))
+			{
+				LocalPrintControl.SetFitType(PRINTFIT_BESTPAPER);
+				ShowDetails();
+			}
 			break;
 
 		case DIM_SELECTION_CHANGED:
@@ -1352,72 +1376,72 @@
 
 			if (!IgnoreTextChangedMsgs)
 			{
-				switch (Msg->GadgetID)
+				if (FALSE) {}
+				// Scale ed field
+				else if (Msg->GadgetID == _R(IDC_SCALEEDIT))
 				{
-					// Scale ed field
-					case _R(IDC_SCALEEDIT):
-						{
-							double Scale = pPrefsDlg->GetDoubleGadgetValue(_R(IDC_SCALEEDIT),0,0);
-							// We need to range check the value before converting it to a Fixed 16
-							if (Scale > 32000.0) Scale = 32000.0;
-							if (Scale < 0)		 Scale = 0.0;
-							LocalPrintControl.SetScale(FIXED16(Scale));
-							ShowDetails(NULL,_R(IDC_SCALEEDIT));
-						}
-						break;
-
-					// Custom fit ed fields
-					case _R(IDC_TOPEDIT):
-						LocalPrintControl.SetTopMargin(pPrefsDlg->GetUnitGadgetValue(_R(IDC_TOPEDIT),CurrentPageUnits,0,0));
-						ShowDetails(NULL,_R(IDC_TOPEDIT));
-						break;
-					case _R(IDC_LEFTEDIT):
-						LocalPrintControl.SetLeftMargin(pPrefsDlg->GetUnitGadgetValue(_R(IDC_LEFTEDIT),CurrentPageUnits,0,0));
-						ShowDetails(NULL,_R(IDC_LEFTEDIT));
-						break;
-					case _R(IDC_WIDTHEDIT):
-						LocalPrintControl.SetWidth(pPrefsDlg->GetUnitGadgetValue(_R(IDC_WIDTHEDIT),CurrentPageUnits,0,0));
-						ShowDetails(NULL,_R(IDC_WIDTHEDIT));
-						break;
-					case _R(IDC_HEIGHTEDIT):
-						LocalPrintControl.SetHeight(pPrefsDlg->GetUnitGadgetValue(_R(IDC_HEIGHTEDIT),CurrentPageUnits,0,0));
-						ShowDetails(NULL,_R(IDC_HEIGHTEDIT));
-						break;
-
-					// Multiple fit ed fields
-					case _R(IDC_ROWSEDIT):
-						LocalPrintControl.SetRows(pPrefsDlg->GetLongGadgetValue(_R(IDC_ROWSEDIT),0,0));
-						ShowDetails(NULL,_R(IDC_ROWSEDIT));
-						break;
-					case _R(IDC_COLUMNSEDIT):
-						LocalPrintControl.SetColumns(pPrefsDlg->GetLongGadgetValue(_R(IDC_COLUMNSEDIT),0,0));
-						ShowDetails(NULL,_R(IDC_COLUMNSEDIT));
-						break;
-					case _R(IDC_GUTTEREDIT):
-						LocalPrintControl.SetGutter(pPrefsDlg->GetUnitGadgetValue(_R(IDC_GUTTEREDIT),CurrentPageUnits,0,0));
-						ShowDetails(NULL,_R(IDC_GUTTEREDIT));
-						break;
+					double Scale = pPrefsDlg->GetDoubleGadgetValue(_R(IDC_SCALEEDIT),0,0);
+					// We need to range check the value before converting it to a Fixed 16
+					if (Scale > 32000.0) Scale = 32000.0;
+					if (Scale < 0)		 Scale = 0.0;
+					LocalPrintControl.SetScale(FIXED16(Scale));
+					ShowDetails(NULL,_R(IDC_SCALEEDIT));
 				}
+				// Custom fit ed fields
+				else if (Msg->GadgetID == _R(IDC_TOPEDIT))
+				{
+					LocalPrintControl.SetTopMargin(pPrefsDlg->GetUnitGadgetValue(_R(IDC_TOPEDIT),CurrentPageUnits,0,0));
+					ShowDetails(NULL,_R(IDC_TOPEDIT));
+				}
+				else if (Msg->GadgetID == _R(IDC_LEFTEDIT))
+				{
+					LocalPrintControl.SetLeftMargin(pPrefsDlg->GetUnitGadgetValue(_R(IDC_LEFTEDIT),CurrentPageUnits,0,0));
+					ShowDetails(NULL,_R(IDC_LEFTEDIT));
+				}
+				else if (Msg->GadgetID == _R(IDC_WIDTHEDIT))
+				{
+					LocalPrintControl.SetWidth(pPrefsDlg->GetUnitGadgetValue(_R(IDC_WIDTHEDIT),CurrentPageUnits,0,0));
+					ShowDetails(NULL,_R(IDC_WIDTHEDIT));
+				}
+				else if (Msg->GadgetID == _R(IDC_HEIGHTEDIT))
+				{
+					LocalPrintControl.SetHeight(pPrefsDlg->GetUnitGadgetValue(_R(IDC_HEIGHTEDIT),CurrentPageUnits,0,0));
+					ShowDetails(NULL,_R(IDC_HEIGHTEDIT));
+				}
+				// Multiple fit ed fields
+				else if (Msg->GadgetID == _R(IDC_ROWSEDIT))
+				{
+					LocalPrintControl.SetRows(pPrefsDlg->GetLongGadgetValue(_R(IDC_ROWSEDIT),0,0));
+					ShowDetails(NULL,_R(IDC_ROWSEDIT));
+				}
+				else if (Msg->GadgetID == _R(IDC_COLUMNSEDIT))
+				{
+					LocalPrintControl.SetColumns(pPrefsDlg->GetLongGadgetValue(_R(IDC_COLUMNSEDIT),0,0));
+					ShowDetails(NULL,_R(IDC_COLUMNSEDIT));
+				}
+				else if (Msg->GadgetID == _R(IDC_GUTTEREDIT))
+				{
+					LocalPrintControl.SetGutter(pPrefsDlg->GetUnitGadgetValue(_R(IDC_GUTTEREDIT),CurrentPageUnits,0,0));
+					ShowDetails(NULL,_R(IDC_GUTTEREDIT));
+				}
 			}
 			break;
 
 		case DIM_KILL_FOCUS:
 			{
-				CGadgetID List[] = { 0, NULL };
-				switch (Msg->GadgetID)
+				CGadgetID List[] = { 0, 0 };
+				// Edit fields
+				if ((Msg->GadgetID == _R(IDC_SCALEEDIT)) ||
+					(Msg->GadgetID == _R(IDC_ROWSEDIT)) ||
+					(Msg->GadgetID == _R(IDC_COLUMNSEDIT)) ||
+					(Msg->GadgetID == _R(IDC_GUTTEREDIT)) ||
+					(Msg->GadgetID == _R(IDC_TOPEDIT)) ||
+					(Msg->GadgetID == _R(IDC_LEFTEDIT)) ||
+					(Msg->GadgetID == _R(IDC_WIDTHEDIT)) ||
+					(Msg->GadgetID == _R(IDC_HEIGHTEDIT)) )
 				{
-					// Edit fields
-					case _R(IDC_SCALEEDIT):
-					case _R(IDC_ROWSEDIT):
-					case _R(IDC_COLUMNSEDIT):
-					case _R(IDC_GUTTEREDIT):
-					case _R(IDC_TOPEDIT):
-					case _R(IDC_LEFTEDIT):
-					case _R(IDC_WIDTHEDIT):
-					case _R(IDC_HEIGHTEDIT):
-						List[0] = Msg->GadgetID;
-						ShowDetails(List,NULL);
-						break;
+					List[0] = Msg->GadgetID;
+					ShowDetails(List, 0);
 				}
 			}
 			break;
@@ -1504,13 +1528,14 @@
 	pPrCtrl->SetWholeSpread(Result);
 
 	CGadgetID FitGadgets[] = { _R(IDC_BESTFIT), _R(IDC_CUSTOMFIT), _R(IDC_MULTIPLEFIT), NULL };
-	switch(pPrefsDlg->GetRadioGroupSelected(FitGadgets))
-	{
-		case _R(IDC_BESTFIT):		pPrCtrl->SetFitType(PRINTFIT_BEST);		break;
-		case _R(IDC_CUSTOMFIT):		pPrCtrl->SetFitType(PRINTFIT_CUSTOM);	break;
-		case _R(IDC_MULTIPLEFIT):	pPrCtrl->SetFitType(PRINTFIT_MULTIPLE);	break;
-	}
-
+	ResourceID FitRadio = GetRadioGroupSelected(FitGadgets))
+	if (FitRadio == _R(IDC_BESTFIT))
+		pPrCtrl->SetFitType(PRINTFIT_BEST);
+	else if (FitRadio == _R(IDC_CUSTOMFIT))
+		pPrCtrl->SetFitType(PRINTFIT_CUSTOM);
+	else if (FitRadio == _R(IDC_MULTIPLEFIT))
+		pPrCtrl->SetFitType(PRINTFIT_MULTIPLE);
+	
 	double Scale = pPrefsDlg->GetDoubleGadgetValue(_R(IDC_SCALEEDIT),0,0);
 	// We need to range check the value before converting it to a Fixed 16
 	if (Scale > 32000.0) Scale = 32000.0;
@@ -1599,7 +1624,7 @@
 
 BOOL PrintLayoutTab::ShowDetails()
 {
-	return ShowDetails(NULL,NULL);
+	return ShowDetails(NULL, 0);
 }
 
 /******************************************************************************************
@@ -1632,7 +1657,7 @@
 										_R(IDC_BTN_UPRIGHT),_R(IDC_SCALEEDIT),_R(IDC_BESTFIT),
 										_R(IDC_TOPEDIT),_R(IDC_LEFTEDIT),_R(IDC_WIDTHEDIT),_R(IDC_HEIGHTEDIT),
 										_R(IDC_ROWSEDIT),_R(IDC_COLUMNSEDIT),_R(IDC_GUTTEREDIT),
-										NULL };
+										0 };
 
 	// If no gadget list is given, fall back to the list of all gadgets
 	if (pGadgetIDList == NULL)
@@ -1645,104 +1670,99 @@
 	String_256 Str;
 	String_256 Dash = "-";
 	
-	for (INT32 i=0;pGadgetIDList[i] != NULL;i++)
+	for (INT32 i=0; pGadgetIDList[i]; i++)
 	{
 		// Ignore the the exclude gadget
 		if (pGadgetIDList[i] == Exclude)
 			continue;
 
-		switch (pGadgetIDList[i])
+		if (FALSE) {}
+		else if (pGadgetIDList[i] == _R(IDC_LAYOUTINFO))
 		{
-			case _R(IDC_LAYOUTINFO):
-				// Display that print info
-				Str = LocalPrintControl.BuildPrintInfoStr();
-				pPrefsDlg->SetStringGadgetValue(_R(IDC_LAYOUTINFO),&Str);
-				break;
+			// Display that print info
+			Str = LocalPrintControl.BuildPrintInfoStr();
+			pPrefsDlg->SetStringGadgetValue(_R(IDC_LAYOUTINFO),Str);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_PAPERSIZEINFO))
+		{
+			// Display the paper size
+			Str = LocalPrintControl.BuildPaperSizeStr();
+			pPrefsDlg->SetStringGadgetValue(_R(IDC_PAPERSIZEINFO),Str);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_DPS_WHOLESPREAD))
+		{
+			// Reflect the Whole Spread flag
+			BOOL WholeSpread = LocalPrintControl.IsWholeSpread();
+			pPrefsDlg->SetBoolGadgetSelected(_R(IDC_DPS_WHOLESPREAD),WholeSpread);
+			pPrefsDlg->SetBoolGadgetSelected(_R(IDC_DPS_INDIVIDUALPAGES),!WholeSpread);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_BTN_UPRIGHT))
+		{
+			// Set the orientation bitmap buttons
+			BOOL Upright = (LocalPrintControl.GetPrintOrient() == PRINTORIENTATION_UPRIGHT);
+			pPrefsDlg->SetBoolGadgetSelected(_R(IDC_BTN_UPRIGHT),Upright);
+			pPrefsDlg->SetBoolGadgetSelected(_R(IDC_BTN_SIDEWAYS),!Upright);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_SCALEEDIT))	
+		{
+			// Set the scale factor field
+			FIXED16 Scale = LocalPrintControl.GetScale();
+			pPrefsDlg->SetDoubleGadgetValue(_R(IDC_SCALEEDIT),Scale.MakeDouble());
+		}
+		else if (pGadgetIDList[i] == _R(IDC_BESTFIT))
+		{
+			// The fit radio buttons
+			CGadgetID FitList[] = { _R(IDC_BESTFIT),_R(IDC_CUSTOMFIT),_R(IDC_MULTIPLEFIT),_R(IDC_BESTFITPAPER), 0 };
 
-			case _R(IDC_PAPERSIZEINFO):
-				// Display the paper size
-				Str = LocalPrintControl.BuildPaperSizeStr();
-				pPrefsDlg->SetStringGadgetValue(_R(IDC_PAPERSIZEINFO),&Str);
-				break;
-
-			case _R(IDC_DPS_WHOLESPREAD):
-				{
-					// Reflect the Whole Spread flag
-					BOOL WholeSpread = LocalPrintControl.IsWholeSpread();
-					pPrefsDlg->SetBoolGadgetSelected(_R(IDC_DPS_WHOLESPREAD),WholeSpread);
-					pPrefsDlg->SetBoolGadgetSelected(_R(IDC_DPS_INDIVIDUALPAGES),!WholeSpread);
-				}
-				break;
-
-			case _R(IDC_BTN_UPRIGHT):
-				{
-					// Set the orientation bitmap buttons
-					BOOL Upright = (LocalPrintControl.GetPrintOrient() == PRINTORIENTATION_UPRIGHT);
-					pPrefsDlg->SetBoolGadgetSelected(_R(IDC_BTN_UPRIGHT),Upright);
-					pPrefsDlg->SetBoolGadgetSelected(_R(IDC_BTN_SIDEWAYS),!Upright);
-				}
-				break;
-
-			case _R(IDC_SCALEEDIT):	
-				{
-					// Set the scale factor field
-					FIXED16 Scale = LocalPrintControl.GetScale();
-					pPrefsDlg->SetDoubleGadgetValue(_R(IDC_SCALEEDIT),Scale.MakeDouble());
-				}
-				break;
-
-			case _R(IDC_BESTFIT):
-				{
-					// The fit radio buttons
-					CGadgetID FitList[] = { _R(IDC_BESTFIT),_R(IDC_CUSTOMFIT),_R(IDC_MULTIPLEFIT),_R(IDC_BESTFITPAPER), NULL };
-
-					switch (LocalPrintControl.GetFitType())
-					{
-						case PRINTFIT_BEST:		pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_BESTFIT));		break;
-						case PRINTFIT_CUSTOM:	pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_CUSTOMFIT));	break;
-						case PRINTFIT_MULTIPLE:	pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_MULTIPLEFIT));	break;
-						case PRINTFIT_BESTPAPER:pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_BESTFITPAPER));	break;
-						default: ERROR2(FALSE,"Unknown print fit type");
-					}
-				}
-				break;
-
-			case _R(IDC_TOPEDIT):
-				// Custom fit editable values
-				if (ShowMargins)
-					pPrefsDlg->SetUnitGadgetValue(_R(IDC_TOPEDIT),	CurrentPageUnits, LocalPrintControl.GetTopMargin());
-				else
-					pPrefsDlg->SetStringGadgetValue(_R(IDC_TOPEDIT),&Dash);
-				break;
-			case _R(IDC_LEFTEDIT):
-				// Custom fit editable values
-				if (ShowMargins)
-					pPrefsDlg->SetUnitGadgetValue(_R(IDC_LEFTEDIT),	CurrentPageUnits, LocalPrintControl.GetLeftMargin());
-				else
-					pPrefsDlg->SetStringGadgetValue(_R(IDC_LEFTEDIT),&Dash);
-				break;
-
-			case _R(IDC_WIDTHEDIT):
-				pPrefsDlg->SetUnitGadgetValue(_R(IDC_WIDTHEDIT),CurrentPageUnits, LocalPrintControl.GetWidth());
-				break;
-			case _R(IDC_HEIGHTEDIT):
-				pPrefsDlg->SetUnitGadgetValue(_R(IDC_HEIGHTEDIT),CurrentPageUnits, LocalPrintControl.GetHeight());
-				break;
-
-			case _R(IDC_ROWSEDIT):
-				pPrefsDlg->SetLongGadgetValue(_R(IDC_ROWSEDIT),	LocalPrintControl.GetRows());
-				break;
-			case _R(IDC_COLUMNSEDIT):
-				pPrefsDlg->SetLongGadgetValue(_R(IDC_COLUMNSEDIT),LocalPrintControl.GetColumns());
-				break;
-			case _R(IDC_GUTTEREDIT):
-				pPrefsDlg->SetUnitGadgetValue(_R(IDC_GUTTEREDIT),CurrentPageUnits, LocalPrintControl.GetGutter());
-				break;
-
-			default:
-				ERROR3_PF(("Unknown gadget ID (%D)",pGadgetIDList));
-				break;
+			switch (LocalPrintControl.GetFitType())
+			{
+				case PRINTFIT_BEST:		pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_BESTFIT));		break;
+				case PRINTFIT_CUSTOM:	pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_CUSTOMFIT));	break;
+				case PRINTFIT_MULTIPLE:	pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_MULTIPLEFIT));	break;
+				case PRINTFIT_BESTPAPER:pPrefsDlg->SetRadioGroupSelected(FitList,_R(IDC_BESTFITPAPER));	break;
+				default: ERROR2(FALSE,"Unknown print fit type");
+			}
 		}
+		else if (pGadgetIDList[i] == _R(IDC_TOPEDIT))
+		{
+			// Custom fit editable values
+			if (ShowMargins)
+				pPrefsDlg->SetUnitGadgetValue(_R(IDC_TOPEDIT),	CurrentPageUnits, LocalPrintControl.GetTopMargin());
+			else
+				pPrefsDlg->SetStringGadgetValue(_R(IDC_TOPEDIT), Dash);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_LEFTEDIT))
+		{	
+			// Custom fit editable values
+			if (ShowMargins)
+				pPrefsDlg->SetUnitGadgetValue(_R(IDC_LEFTEDIT),	CurrentPageUnits, LocalPrintControl.GetLeftMargin());
+			else
+				pPrefsDlg->SetStringGadgetValue(_R(IDC_LEFTEDIT), Dash);
+		}
+		else if (pGadgetIDList[i] == _R(IDC_WIDTHEDIT))
+		{
+			pPrefsDlg->SetUnitGadgetValue(_R(IDC_WIDTHEDIT),CurrentPageUnits, LocalPrintControl.GetWidth());
+		}
+		else if (pGadgetIDList[i] == _R(IDC_HEIGHTEDIT))
+		{
+			pPrefsDlg->SetUnitGadgetValue(_R(IDC_HEIGHTEDIT),CurrentPageUnits, LocalPrintControl.GetHeight());
+		}
+		else if (pGadgetIDList[i] == _R(IDC_ROWSEDIT))
+		{
+			pPrefsDlg->SetLongGadgetValue(_R(IDC_ROWSEDIT),	LocalPrintControl.GetRows());
+		}
+		else if (pGadgetIDList[i] == _R(IDC_COLUMNSEDIT))
+		{
+			pPrefsDlg->SetLongGadgetValue(_R(IDC_COLUMNSEDIT),LocalPrintControl.GetColumns());
+		}
+		else if (pGadgetIDList[i] == _R(IDC_GUTTEREDIT))
+		{
+			pPrefsDlg->SetUnitGadgetValue(_R(IDC_GUTTEREDIT),CurrentPageUnits, LocalPrintControl.GetGutter());
+		}
+		else
+		{
+			ERROR3_PF(("Unknown gadget ID (%D)",pGadgetIDList));
+		}
 	}
 
 	BOOL ok = EnableControls();
@@ -1775,10 +1795,10 @@
 	if (!TalkToPage())
 		return(TRUE);
 
-	BOOL BestFit 	 = (LocalPrintControl.GetFitType() == PRINTFIT_BEST);
+//	BOOL BestFit 	 = (LocalPrintControl.GetFitType() == PRINTFIT_BEST);
 	BOOL CustomFit 	 = (LocalPrintControl.GetFitType() == PRINTFIT_CUSTOM);
 	BOOL MultipleFit = (LocalPrintControl.GetFitType() == PRINTFIT_MULTIPLE);
-	BOOL BestFitPaper= (LocalPrintControl.GetFitType() == PRINTFIT_BESTPAPER);
+//	BOOL BestFitPaper= (LocalPrintControl.GetFitType() == PRINTFIT_BESTPAPER);
 
 	// Controls available all the time
 	EnableControl(_R(IDC_BESTFIT),			TRUE);
@@ -1822,7 +1842,10 @@
 	EnableControl(_R(IDC_DPS_INDIVIDUALPAGES),	LocalPrintControl.IsDoublePageSpread());
 
 	// If in windows 95, hide the picture boxes as they don't slab in, and go against Win95 look & feel
+PORTNOTE("other", "Assume new windows UI")
+#ifndef EXCLUDE_FROM_XARALX
 	if (CCamApp::IsNewWindowsUI()) //IsWindows95())
+#endif
 	{
 		if (pPrefsDlg != NULL)
 		{
@@ -1852,6 +1875,8 @@
 
 void PrintLayoutTab::TestPrinting(PrintControl* pPrCtrl)
 {
+PORTNOTE("printing", "Disable PrintLayoutTab::TestPrinting")
+#ifndef EXCLUDE_FROM_XARALX
 	if (pPrCtrl != NULL && pPrCtrl->StartPrinting())
 	{
 		BOOL Aborted = FALSE;
@@ -1931,7 +1956,7 @@
 			if (!Aborted && pLayer != NULL && PatchInfo.pSpread != NULL)
 			{
 				TCHAR name[256];
-				_stprintf(name,"Page %d",PatchInfo.PaperNumber);
+				camSprintf(name,_T("Page %d"),PatchInfo.PaperNumber);
 				pLayer->SetLayerID(String_256(name));
 				pLayer->AttachNode(PatchInfo.pSpread,LASTCHILD);
 				pLayer->SetVisible(FALSE);
@@ -1949,6 +1974,7 @@
 		pPrCtrl->EndPrinting();
 		Document::GetCurrent()->ForceRedraw();
 	}
+#endif
 }
 
 void PrintLayoutTab::MakeRectangle(Layer* pLayer,DocRect Rect, StockColour Col)
@@ -1977,10 +2003,8 @@
 
 
 /************************************************************************************************
-*************************************************************************************************
 CLASS PrintSepsTab
  Adrian, 17/06/96
- /************************************************************************************************
 ************************************************************************************************/
 
 /************************************************************************************************
@@ -2070,94 +2094,88 @@
 
 
 		case DIM_LFT_BN_CLICKED:
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			// Separations checkbox
+			else if (Msg->GadgetID == _R(IDC_CHECKSEPARATIONS))
 			{
-				// Separations checkbox
-				case _R(IDC_CHECKSEPARATIONS):
-					{
-						BOOL DoSeparations = pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKSEPARATIONS));
-						pTypesetInfo->SetSeparations(DoSeparations);
+				BOOL DoSeparations = pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKSEPARATIONS));
+				pTypesetInfo->SetSeparations(DoSeparations);
 
-						// Toggle the OutputPrintersMarks state automatically
-						if (pTypesetInfo->OutputPrintersMarks() != DoSeparations)
-						{
-							pTypesetInfo->SetOutputPrintersMarks(DoSeparations);
+				// Toggle the OutputPrintersMarks state automatically
+				if (pTypesetInfo->OutputPrintersMarks() != DoSeparations)
+				{
+					pTypesetInfo->SetOutputPrintersMarks(DoSeparations);
 
-							// Make sure the print layout tab updates scale factors etc suitably
-							BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
-						}
+					// Make sure the print layout tab updates scale factors etc suitably
+					BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
+				}
 
-						// And let the imagesetting tab know that the seps state has changed
-						BROADCAST_TO_ALL(OptionsChangingMsg(OptionsChangingMsg::SEPARATIONSENABLED));
+				// And let the imagesetting tab know that the seps state has changed
+				BROADCAST_TO_ALL(OptionsChangingMsg(OptionsChangingMsg::SEPARATIONSENABLED));
 
-						// Adjust the shading of controls as appropriate, and make sure things like
-						// the page size are updated to take printers marks into account
-						PageSizeHasChanged();
-						OptionsTabs::SetApplyNowState(TRUE);
-					}
-					break;
+				// Adjust the shading of controls as appropriate, and make sure things like
+				// the page size are updated to take printers marks into account
+				PageSizeHasChanged();
+				OptionsTabs::SetApplyNowState(TRUE);
+			}
+			else if (Msg->GadgetID == _R(IDC_CHECKPROCESS))
+			{
+				// If the "print spot colours as process colours" option is changed,
+				// interactively update the plate list
+				IndexedColour::ForceSpotsToBeProcess(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPROCESS)));
+				ShowDetails();
+				OptionsTabs::SetApplyNowState(TRUE);
+			}
+			else if (Msg->GadgetID == _R(IDC_PRINTERDEFAULTS))
+			{
+				EnableControl(_R(IDC_COMBORESOLUTION),	FALSE);
+				EnableControl(_R(IDC_COMBOFREQUENCY),	FALSE);
+				EnableControl(_R(IDC_COMBOTYPE),		FALSE);
 
-				case _R(IDC_CHECKPROCESS):
-					{
-						// If the "print spot colours as process colours" option is changed,
-						// interactively update the plate list
-						IndexedColour::ForceSpotsToBeProcess(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPROCESS)));
-						ShowDetails();
-						OptionsTabs::SetApplyNowState(TRUE);
-					}
-					break;
-			
-				case _R(IDC_PRINTERDEFAULTS):
-					EnableControl(_R(IDC_COMBORESOLUTION),	FALSE);
-					EnableControl(_R(IDC_COMBOFREQUENCY),	FALSE);
-					EnableControl(_R(IDC_COMBOTYPE),		FALSE);
+				pTypesetInfo->SetScreening(FALSE);		// Disable screening
+				pTypesetInfo->ResetAllPlatesToDefaultScreens();
+				ShowDetails();							// Make sure colour plate list resets to defaults
 
-					pTypesetInfo->SetScreening(FALSE);		// Disable screening
-					pTypesetInfo->ResetAllPlatesToDefaultScreens();
-					ShowDetails();							// Make sure colour plate list resets to defaults
+				OptionsTabs::SetApplyNowState(TRUE);
+			}
+			else if (Msg->GadgetID == _R(IDC_CUSTOMSETTINGS))
+			{
+				EnableControl(_R(IDC_COMBORESOLUTION),	TRUE);
+				EnableControl(_R(IDC_COMBOFREQUENCY),	TRUE);
+				EnableControl(_R(IDC_COMBOTYPE),		TRUE);
 
-					OptionsTabs::SetApplyNowState(TRUE);
-					break;
+				pTypesetInfo->SetScreening(TRUE);
+				OptionsTabs::SetApplyNowState(TRUE);
+			}
+			else if (Msg->GadgetID == _R(IDC_PLATEPROPS))
+			{
+				if (pTypesetInfo->AreSeparating())
+				{
+					String_256 GreyReason;
+					OpState DlgState = SepsDlg::GetState(&GreyReason, NULL);
 
-				case _R(IDC_CUSTOMSETTINGS):
-					EnableControl(_R(IDC_COMBORESOLUTION),	TRUE);
-					EnableControl(_R(IDC_COMBOFREQUENCY),	TRUE);
-					EnableControl(_R(IDC_COMBOTYPE),		TRUE);
-
-					pTypesetInfo->SetScreening(TRUE);
-					OptionsTabs::SetApplyNowState(TRUE);
-					break;
-
-				case _R(IDC_PLATEPROPS):
-					if (pTypesetInfo->AreSeparating())
+					if (!DlgState.Greyed)
 					{
-						String_256 GreyReason;
-						OpState DlgState = SepsDlg::GetState(&GreyReason, NULL);
+						// Store away the current plate settings in our local print control
+						ReadCurrentPlateSettings(pTypesetInfo);
 
-						if (!DlgState.Greyed)
+						ColourPlate *pPlate = GetSelectedPlate();
+						if (pPlate != NULL)
 						{
-							// Store away the current plate settings in our local print control
-							ReadCurrentPlateSettings(pTypesetInfo);
-
-							ColourPlate *pPlate = GetSelectedPlate();
-							if (pPlate != NULL)
+							if (SepsDlg::InvokeDialog(pPlate, this))
 							{
-								if (SepsDlg::InvokeDialog(pPlate, this))
-								{
-									// The angle or frequency has been changed by the user, so make sure that
-									// screening is auto-enabled...
-									if (!pTypesetInfo->AreScreening())
-										pTypesetInfo->SetScreening(TRUE);
-								}
+								// The angle or frequency has been changed by the user, so make sure that
+								// screening is auto-enabled...
+								if (!pTypesetInfo->AreScreening())
+									pTypesetInfo->SetScreening(TRUE);
+							}
 
-								ShowDetails(); //update tab data - maybe it should check whether the dialog returned with OK or Cancel 
-								OptionsTabs::SetApplyNowState(TRUE);
-							}
+							ShowDetails(); //update tab data - maybe it should check whether the dialog returned with OK or Cancel 
+							OptionsTabs::SetApplyNowState(TRUE);
 						}
 					}
-					break;
+				}
 			}
-			break;
 
 		case DIM_TEXT_CHANGED:
 			// Enable the Apply button 
@@ -2165,94 +2183,88 @@
 			break;
 
 		case DIM_FOCUS_LOST:
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			else if (Msg->GadgetID == _R(IDC_COMBORESOLUTION))
 			{
-				case _R(IDC_COMBORESOLUTION):
-					pTypesetInfo->SetPrintResolution(pPrefsDlg->GetLongGadgetValue(_R(IDC_COMBORESOLUTION), 100, 10000));
-					break;
+				pTypesetInfo->SetPrintResolution(pPrefsDlg->GetLongGadgetValue(_R(IDC_COMBORESOLUTION), 100, 10000));
+			}
+			else if (Msg->GadgetID == _R(IDC_COMBOFREQUENCY))
+			{
+				BOOL valid = TRUE;
+				// Check that the value is within range, if not warn the user and fall back to a default value
+				
+				double NewVal = pPrefsDlg->GetDoubleGadgetValue(_R(IDC_COMBOFREQUENCY), 2, 1000, _R(IDS_INVALID_FREQUENCY), &valid);
+				if (valid) // update the default frequency
+				{
+					pTypesetInfo->SetScreening(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CUSTOMSETTINGS)));
+					if (pTypesetInfo->AreScreening())
+						pTypesetInfo->SetDefaultScreenFrequency(NewVal, TRUE);
+				}
 
-
-				case _R(IDC_COMBOFREQUENCY):
-					{
-						BOOL valid = TRUE;
-						// Check that the value is within range, if not warn the user and fall back to a default value
-						
-						double NewVal = pPrefsDlg->GetDoubleGadgetValue(_R(IDC_COMBOFREQUENCY), 2, 1000, _R(IDS_INVALID_FREQUENCY), &valid);
-						if (valid) // update the default frequency
-						{
-							pTypesetInfo->SetScreening(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CUSTOMSETTINGS)));
-							if (pTypesetInfo->AreScreening())
-								pTypesetInfo->SetDefaultScreenFrequency(NewVal, TRUE);
-						}
-
-						ShowDetails();
-					}
-					break;
+				ShowDetails();
 			}
 			break;
 
 		
 		case DIM_SELECTION_CHANGED:
-			switch(Msg->GadgetID)
+			if (FALSE) {}
+			else if (Msg->GadgetID == _R(IDC_COMBOFREQUENCY)) // make sure a change in the default frequency is reflected in the plate list
 			{
-				case _R(IDC_COMBOFREQUENCY): // make sure a change in the default frequency is reflected in the plate list
-					pTypesetInfo->SetScreening(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CUSTOMSETTINGS)));
-					if (pTypesetInfo->AreScreening())
-						pTypesetInfo->SetDefaultScreenFrequency(pPrefsDlg->GetDoubleGadgetValue(_R(IDC_COMBOFREQUENCY), 2, 1000), TRUE);
+				pTypesetInfo->SetScreening(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CUSTOMSETTINGS)));
+				if (pTypesetInfo->AreScreening())
+					pTypesetInfo->SetDefaultScreenFrequency(pPrefsDlg->GetDoubleGadgetValue(_R(IDC_COMBOFREQUENCY), 2, 1000), TRUE);
 
-					ShowDetails();
-					break;
-
-				case _R(IDC_COMBORESOLUTION):
-					pTypesetInfo->SetPrintResolution(pPrefsDlg->GetLongGadgetValue(_R(IDC_COMBORESOLUTION), 100, 10000));
-					break;
-
-				case _R(IDC_COMBOTYPE):
-					pTypesetInfo->SetScreenFunction((ScreenType) (pPrefsDlg->GetSelectedValueIndex(_R(IDC_COMBOTYPE)) + 1));
-					break;
-
-				case _R(IDC_LISTCOLOURS):
-					// Store away the current plate settings in our local print control
-					if (pTypesetInfo->AreSeparating())
-						ReadCurrentPlateSettings(pTypesetInfo);
-					break;
+				ShowDetails();
 			}
+			else if (Msg->GadgetID == _R(IDC_COMBORESOLUTION))
+			{
+				pTypesetInfo->SetPrintResolution(pPrefsDlg->GetLongGadgetValue(_R(IDC_COMBORESOLUTION), 100, 10000));
+			}
+			else if (Msg->GadgetID == _R(IDC_COMBOTYPE))
+			{
+				pTypesetInfo->SetScreenFunction((ScreenType) (pPrefsDlg->GetSelectedValueIndex(_R(IDC_COMBOTYPE)) + 1));
+			}
+			else if (Msg->GadgetID == _R(IDC_LISTCOLOURS))
+			{
+				// Store away the current plate settings in our local print control
+				if (pTypesetInfo->AreSeparating())
+					ReadCurrentPlateSettings(pTypesetInfo);
+			}			
 			OptionsTabs::SetApplyNowState(TRUE); // enable the Apply button
 			break;
 
 
 		case DIM_SELECTION_CHANGED_COMMIT:
 			OptionsTabs::SetApplyNowState(TRUE);
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			else if (Msg->GadgetID == _R(IDC_LISTCOLOURS))
 			{
-				case _R(IDC_LISTCOLOURS):
-					if (pTypesetInfo->AreSeparating())
+				if (pTypesetInfo->AreSeparating())
+				{
+					String_256 GreyReason;
+					OpState DlgState = SepsDlg::GetState(&GreyReason, NULL);
+
+					if (!DlgState.Greyed)
 					{
-						String_256 GreyReason;
-						OpState DlgState = SepsDlg::GetState(&GreyReason, NULL);
+						// Store away the current plate settings in our local print control
+						ReadCurrentPlateSettings(pTypesetInfo);
 
-						if (!DlgState.Greyed)
+						// And give the user a properties dialogue to edit in
+						ColourPlate *pPlate = GetSelectedPlate();
+						if (pPlate != NULL)
 						{
-							// Store away the current plate settings in our local print control
-							ReadCurrentPlateSettings(pTypesetInfo);
-
-							// And give the user a properties dialogue to edit in
-							ColourPlate *pPlate = GetSelectedPlate();
-							if (pPlate != NULL)
+							if (SepsDlg::InvokeDialog(pPlate, this))
 							{
-								if (SepsDlg::InvokeDialog(pPlate, this))
-								{
-									// The angle or frequency has been changed by the user, so make sure that
-									// screening is auto-enabled...
-									if (!pTypesetInfo->AreScreening())
-										pTypesetInfo->SetScreening(TRUE);
-								}
+								// The angle or frequency has been changed by the user, so make sure that
+								// screening is auto-enabled...
+								if (!pTypesetInfo->AreScreening())
+									pTypesetInfo->SetScreening(TRUE);
 							}
+						}
 
-							ShowDetails(); //update tab data - maybe it should check whether the dialog returned with OK or Cancel
-						}
+						ShowDetails(); //update tab data - maybe it should check whether the dialog returned with OK or Cancel
 					}
-					break;
+				}
 			}
 			break;
 
@@ -2289,13 +2301,15 @@
 
 		switch ( TheMsg->State )
 		{
-			case ColourChangingMsg::ColourState::COLOURUPDATED:
-			case ColourChangingMsg::ColourState::COLOURUPDATEDINVISIBLE:
-			case ColourChangingMsg::ColourState::LISTUPDATED:
+			case ColourChangingMsg::COLOURUPDATED:
+			case ColourChangingMsg::COLOURUPDATEDINVISIBLE:
+			case ColourChangingMsg::LISTUPDATED:
 				// Only handle these messages - others will be handled implicitly
 				// by the Document/View changing handlers.
 				ShowDetails();
 				break;
+			default:
+				break;
 		}
 	}
 
@@ -2439,6 +2453,8 @@
 	BOOL DoSeparations = pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKSEPARATIONS));
 	pTypesetInfo->SetSeparations(DoSeparations);
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// Read back the settings from the list view
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 	if (pListGadget)
@@ -2462,7 +2478,7 @@
 				String_256 Frequency;
 				pListGadget->GetItemString(Angle, j, 4);
 				pListGadget->GetItemString(Frequency, j, 5);
-				pPlate->SetScreenInfo(atof((TCHAR*) Angle) , atof((TCHAR*) Frequency));
+				pPlate->SetScreenInfo(camAtof((TCHAR*) Angle) , camAtof((TCHAR*) Frequency));
 
 				pPlate = pTypesetInfo->GetNextPlate(pPlate);
 			}
@@ -2472,6 +2488,7 @@
 	{
 		ERROR3("Failed to find list gadget");
 	}
+#endif
 }
 
 
@@ -2498,6 +2515,8 @@
 	{
 		TalkToPage();
 		// First retrieve the custom list control object and set the column widths
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 		ERROR2IF(!pListGadget, FALSE, "No list gadget");
 		pListGadget->SetColumnWidth(0, GetSystemMetrics(SM_CXMENUCHECK) + 4); // Check 1
@@ -2518,6 +2537,7 @@
 			pListGadget->SetSelectedItemIndex(0);
 
 		return(Result);
+#endif
 	}
 
 	return FALSE;
@@ -2544,11 +2564,13 @@
 {
 	if (TalkToPage())
 	{
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		// Delete the contents of the list
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 		if (pListGadget != NULL)
 				pListGadget->DeleteAllItems();		
-
+#endif
 		// Destroy the plate list to avoid all kinds of problems that might arise if it contained spot plates 
 		TypesetInfo *pTypesetInfo = LocalPrintControl.GetTypesetInfo();
 		ERROR2IF(pTypesetInfo == NULL, TRUE, "Can't find typesetting info structure");
@@ -2644,10 +2666,10 @@
 		return(FALSE);
 
 	// Set the new document name
-	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME), DocumentName);
+	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME), *DocumentName);
 
 	// And show the new details
-	ShowDetails(NULL, NULL);
+	ShowDetails(NULL, 0);
 	
 	return TRUE;
 }
@@ -2671,7 +2693,7 @@
 
 BOOL PrintSepsTab::ShowDetails()
 {
-	return ShowDetails(NULL,NULL);
+	return ShowDetails(NULL,0);
 }
 
 
@@ -2701,10 +2723,12 @@
 
 	if (IsAllGreyed() || pDocument == NULL)	// Don't try to fill in anything when the window is shaded
 	{
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 		if (pListGadget != NULL)
 			pListGadget->DeleteAllItems();
-
+#endif
 		EnableControls();
 		return(TRUE);
 	}
@@ -2743,7 +2767,7 @@
 			Selected = i;
 
 		Temp._MakeMsg(TEXT("#1%ld"), Resolution[i]);
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBORESOLUTION), &Temp, FALSE, i);
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBORESOLUTION), Temp, FALSE, i);
 		i++;
 	}
 // As usual, this call causes dreadful gadget flicker
@@ -2754,7 +2778,7 @@
 	else
 	{
 		Temp._MakeMsg(TEXT("#1%ld"), tpInfo->GetPrintResolution());
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBORESOLUTION), &Temp, FALSE, -1);
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBORESOLUTION),Temp, FALSE, -1);
 	}
 
 	//Set up the screen frequency list (just a default value at this stage)  
@@ -2782,7 +2806,7 @@
 			Selected = i;
 
 		Temp._MakeMsg(TEXT("#1%ld"), Frequency[i]);
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOFREQUENCY), &Temp, FALSE, i);
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOFREQUENCY), Temp, FALSE, i);
 		i++;
 	}
 // As usual, this call causes dreadful gadget flicker
@@ -2796,22 +2820,26 @@
 //		ConvertDoubleToMinString(tpInfo->GetDefaultScreenFrequency(), &Temp);
 		INT32 IntFreq = (INT32) floor(tpInfo->GetDefaultScreenFrequency());
 		Temp._MakeMsg(TEXT("#1%d"), IntFreq);
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOFREQUENCY), &Temp, FALSE, -1);
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOFREQUENCY), Temp, FALSE, -1);
 	}
 
 	//Set up the screen types list
 	pPrefsDlg->DeleteAllValues(_R(IDC_COMBOTYPE));
-	for (i = 0; i < NO_OF_SCREENS_SUPPORTED; i++)
+
+	for (i = 0; ScreenIDs[i]; i++)
 	{
-		String_256 screenType((UINT32) SCREEN_TYPE_BASE + i);
-		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOTYPE), &screenType, FALSE, i);
+		String_256 screenType(ScreenIDs[i]);
+		pPrefsDlg->SetStringGadgetValue(_R(IDC_COMBOTYPE), screenType, FALSE, i);
 	}
+
 	pPrefsDlg->SetSelectedValueIndex(_R(IDC_COMBOTYPE), ((INT32)tpInfo->GetScreenFunction()) - 1);
 
 	// Set the "Print colour separations" checkbox
 	pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKSEPARATIONS), tpInfo->AreSeparating());
 
 	// Set up the separations list box
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 	ERROR2IF(pListGadget == NULL, FALSE, "No list gadget?!");
 
@@ -2820,12 +2848,13 @@
 	if (SelectedItem < 0)
 		SelectedItem = 0;
 
+	// Clear the gadget out and rebuild it for the (new) plate list
+	pListGadget->DeleteAllItems();
+#endif
+
 	// Set the "print spot colours as process colours" flag appropriately
 	pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKPROCESS), IndexedColour::AreSpotsForcedToProcess());
 
-	// Clear the gadget out and rebuild it for the (new) plate list
-	pListGadget->DeleteAllItems();
-
 	// Call CreatePlateList to ensure that the list of printing plates is set up
 	// This will just update the list (if necessary) if it has been previously created
 	ok = tpInfo->CreatePlateList();
@@ -2877,9 +2906,9 @@
 //			plateAngle.MakeMsg(_R(IDS_DEGREES), Angle);
 //			String_256 DegreeFormat(_R(IDS_DEGREES));			
 			//_stprintf((TCHAR *)plateAngle, (TCHAR *)DegreeFormat, Angle);
-//			_stprintf((TCHAR *)plateAngle,"%.*f°", precision,  Angle);
+//			_stprintf((TCHAR *)plateAngle,"%.*f", precision,  Angle);
 			Convert::DoubleToString(Angle, (StringBase *) &plateAngle, AnglePrecision);
-			plateAngle += TEXT("°");		// Let's give the internationalisation boys a heart attack
+			plateAngle += TEXT("");		// Let's give the internationalisation boys a heart attack
 
 //			plateFrequency.MakeMsg(_R(IDS_LPI_FLOAT), Frequency);			
 //			String_256 FreqFormat(_R(IDS_LPI_FLOAT));
@@ -2896,6 +2925,8 @@
 			PColourRGBT RGB;
 			cc->ConvertColour(&PlateCol, (ColourPacked *) &RGB);
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 			ok = pListGadget->AddColourListItem(plateDescription, RGB.Red, RGB.Green, RGB.Blue,
 												pPlate->GetType() == COLOURPLATE_SPOT);
 			ERROR3IF(!ok, "Failed to add item to list");
@@ -2909,7 +2940,7 @@
 
 			pListGadget->SetSwitchState(!pPlate->IsDisabled(), i, 0);
 			pListGadget->SetSwitchState(pPlate->Overprints(), i, 1);
-
+#endif
 			pPlate = tpInfo->GetNextPlate(pPlate);
 		}
 		else
@@ -2920,8 +2951,11 @@
 	// Shade/unshade the controls as appropriate
 	EnableControls();
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// And re-select the previously selected (or first) item in the plate list
 	pListGadget->SetSelectedItemIndex(SelectedItem);
+#endif
 
 	return TRUE;
 }
@@ -3006,8 +3040,11 @@
 		return(NULL);
 
 	ERROR2IF(pPrefsDlg == NULL,FALSE,"Error in PrintSepsTab::GetSelectedPlate() : unexpected null pointer");
+
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	ColourPlate* pPlate = NULL;
-	
+
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_LISTCOLOURS));
 	if (pListGadget)
 	{
@@ -3028,6 +3065,7 @@
 	}
 	else
 		ERROR3("Cannot find list gadget");
+#endif
 
 	return(NULL); // return NULL if no plate is selected
 }
@@ -3118,17 +3156,17 @@
 	String_256 plateDescr;
 	plateDescr.MakeMsg(_R(IDS_SEPPROPERTIES), (TCHAR *) Temp);
 
-	SetStringGadgetValue(_R(IDC_PLATECAPTION), &plateDescr);
+	SetStringGadgetValue(_R(IDC_PLATECAPTION), plateDescr);
 
 	//Screen frequency  
 	String_256 frequency;
-	_stprintf((TCHAR*) frequency, "%1.4f", float(pColourPlate->GetScreenFrequency()));
-	SetStringGadgetValue(_R(IDC_EDITFREQUENCY), &frequency, TRUE);
+	camSprintf((TCHAR*) frequency, _T("%1.4f"), double(pColourPlate->GetScreenFrequency()));
+	SetStringGadgetValue(_R(IDC_EDITFREQUENCY), frequency, TRUE);
 
 	//Screen angle  
 	String_256 angle;
-	_stprintf((TCHAR*) angle, "%1.4f", float(pColourPlate->GetScreenAngle()));
-	SetStringGadgetValue(_R(IDC_EDITANGLE), &angle, TRUE);
+	camSprintf((TCHAR*) angle, _T("%1.4f"), double(pColourPlate->GetScreenAngle()));
+	SetStringGadgetValue(_R(IDC_EDITANGLE), angle, TRUE);
 
 	//'Print this ink' checkbox
 	SetBoolGadgetSelected(_R(IDC_CHECKPRINT), !pColourPlate->IsDisabled());
@@ -3229,6 +3267,8 @@
 				else if (Msg->GadgetID == _R(IDC_CHECKOVERPRINT))
 					pLocalColourPlate->SetOverprint(GetBoolGadgetSelected(_R(IDC_CHECKOVERPRINT)));
 			}
+		default:
+			break;
 
 	}
 	// Always call the base class, or things like help buttons won't work
@@ -3453,33 +3493,29 @@
 				TypesetInfo *tpInfo = LocalPrintControl.GetTypesetInfo();
 				ERROR2IF(tpInfo == NULL, TRUE, "No typesetInfo?!");
 
-				switch (Msg->GadgetID)
+				if (FALSE) {}
+				else if (Msg->GadgetID == _R(IDC_CHECKPMARKS))
 				{
-					case _R(IDC_CHECKPMARKS):
-						{
-							tpInfo->SetOutputPrintersMarks(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPMARKS)));
+					tpInfo->SetOutputPrintersMarks(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPMARKS)));
 
-							// Make sure the print layout tab updates scale factors etc suitably
-							BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
+					// Make sure the print layout tab updates scale factors etc suitably
+					BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
 
-							// And shade/unshade the controls as appropriate
-							EnableControls();
-						}
-						break;
-
-					case _R(IDC_CHECKOPBLACK):
-						tpInfo->SetOverprintBlack(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKOPBLACK)));
-						break;
-
-					case _R(IDC_CHECKNEGATIVE):
-						tpInfo->SetPhotoNegative(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE)));
-						break;
-
-					case _R(IDC_CHECKREFLECT):
-						tpInfo->SetEmulsionDown(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKREFLECT)));
-						break;
+					// And shade/unshade the controls as appropriate
+					EnableControls();
 				}
-
+				else if (Msg->GadgetID == _R(IDC_CHECKOPBLACK))
+				{
+					tpInfo->SetOverprintBlack(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKOPBLACK)));
+				}
+				else if (Msg->GadgetID == _R(IDC_CHECKNEGATIVE))
+				{
+					tpInfo->SetPhotoNegative(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE)));
+				}
+				else if (Msg->GadgetID == _R(IDC_CHECKREFLECT))
+				{
+					tpInfo->SetEmulsionDown(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKREFLECT)));
+				}
 				OptionsTabs::SetApplyNowState(TRUE);
 			}
 			break;
@@ -3525,9 +3561,12 @@
 		pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE), FALSE);
 		pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKOPBLACK), FALSE);
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 		if (pListGadget != NULL)
 			pListGadget->DeleteAllItems();
+#endif
 
 		EnableControl((CGadgetID) _R(IDC_PRINT_DOCNAME), FALSE);
 		EnableControl((CGadgetID) _R(IDC_ISTATIC1), FALSE);
@@ -3598,16 +3637,21 @@
 
 	OptionsTabs::SetApplyNowState(TRUE);
 
+	INT32 SelIndex = 0;
+
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 	if (!pListGadget)
 		return;
 
-	INT32 SelIndex = pListGadget->GetSelectedItemIndex();
+	SelIndex = pListGadget->GetSelectedItemIndex();
 	if (SelIndex < 0)		// No selected item?!
 		return;
 
 	if (!pListGadget->GetSwitchState(SelIndex, 0))
 		return;				// Selected Item is disabled, so no problem
+#endif
 
 	PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
 	if (pMarksMan == NULL)
@@ -3652,8 +3696,11 @@
 		if (Index != SelIndex)
 		{
 			ThisMark = pMarkItem->GetPrintMark();
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 			if (ThisMark != NULL && ThisMark->GetType() == TypeToKill)		// Kill all other marks of this type
 				pListGadget->SetSwitchState(FALSE, Index, 0);
+#endif
 		}
 
 		pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
@@ -3696,6 +3743,8 @@
 				// state whenever it is changed
 				ShowDetails();
 				break;
+			default:
+				break;
 		}
 	}
 
@@ -3732,6 +3781,8 @@
 	TypesetInfo* tpInfo = /*GetPrintControl()->*/LocalPrintControl.GetTypesetInfo();
 	ERROR2IF(tpInfo == NULL,FALSE,"Error in PrintImagesetterTab::CommitSection() : unexpected null pointer");
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// Get a pointer to the print marks list
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 	if (pListGadget)
@@ -3777,6 +3828,7 @@
 	{
 		ERROR3("Failed to find list gadget");
 	}
+#endif
 
 	// Set the general imagesetting flags
 	tpInfo->SetOverprintBlack(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKOPBLACK)));
@@ -3820,11 +3872,14 @@
 		if (!TalkToPage())
 			return TRUE;
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		// Set up the printer marks list
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 		ERROR2IF(!pListGadget, FALSE, "No list gadget");
 		pListGadget->SetColumnWidth(0, GetSystemMetrics(SM_CXMENUCHECK) + 2); // Check box
 		pListGadget->SetColumnWidth(1, 20); // bitmap
+#endif
 
 		// Fill in all the controls, and enable/disable as appropriate
 		UpdateSection(OptionsTabs::GetDocumentName());
@@ -3857,7 +3912,7 @@
 		return(FALSE);
 
 	// Set the docuemnt name
-	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME), DocumentName);
+	pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME), *DocumentName);
 
 	// And set up all the other controls
 	ShowDetails();
@@ -3886,10 +3941,12 @@
 {
 	if (IsAllGreyed() || pDocument == NULL)		// Don't try to fill in anything when the window is shaded
 	{
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 		if (pListGadget != NULL)
 			pListGadget->DeleteAllItems();
-
+#endif
 		EnableControls();
 		return(TRUE);
 	}
@@ -3909,10 +3966,13 @@
 	// Set the global "output printers marks" checkbox state
 	pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKPMARKS), tpInfo->OutputPrintersMarks());
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// And set up the marks list
 	CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
 	if (!pListGadget)
 		return(FALSE);
+#endif
 
 	PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
 	ERROR3IF(pMarksMan == NULL, "No print mark manager?");
@@ -3923,8 +3983,11 @@
 
 	PrintMarkItem* pMarkItem = pMarksMan->PMMCache.GetFirstMark();
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// Vape and re-build the marks list
 	pListGadget->DeleteAllItems();
+#endif
 
 	while (pDocument && pMarkItem)
 	{
@@ -3932,6 +3995,12 @@
 		// Get the handle of this print mark item
 		UINT32 handle = pMarkItem->GetHandle();
 		// Get the bitmap ID for this type of mark
+
+PORTNOTE("other", "While CCustomList, mark 2 variables as used to avoid warnings")
+		// Mark the above as used
+		CAM_USE(pMarksComp);
+		CAM_USE(handle);
+
 		ERROR2IF(!pMarkItem->GetPrintMark(), FALSE, "Illegal NULL pointer");
 
 		UINT32 ImageID = _R(IDB_PRINTMARK_UNKNOWNMK);
@@ -3945,20 +4014,28 @@
 			case MarkType_Crop:			ImageID = _R(IDB_PRINTMARK_CROPMK);			GreyedID = _R(IDB_PRINTMARK_GREYED_CROPMK);			break;
 			case MarkType_GreyBar:		ImageID = _R(IDB_PRINTMARK_GRAYBARMK);		GreyedID = _R(IDB_PRINTMARK_GRAYBARMK);			break;
 			case MarkType_ColourBar:	ImageID = _R(IDB_PRINTMARK_COLOURBARMK);	GreyedID = _R(IDB_PRINTMARK_GREYED_COLOURBARMK);		break;
+			default:
+				break;
 		}
 
 		String_256 markDescription(pMarkItem->GetPrintMark()->GetMarkMenuText());
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 		pListGadget->AddItem(markDescription, ImageID, GreyedID);
 
 		if (pMarksComp)
-			pListGadget->SetSwitchState((BOOL) pMarksComp->FindMark(handle), (pListGadget->GetItemCount() - 1), 0);
+			pListGadget->SetSwitchState(NULL != pMarksComp->FindMark(handle), (pListGadget->GetItemCount() - 1), 0);
+#endif
 
 		// find the next print mark item
 		pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
 	}
 
+PORTNOTE("other", "Disabled CCustomList")
+#ifndef EXCLUDE_FROM_XARALX
 	// And make the first item in the list selected
 	pListGadget->SetSelectedItemIndex(0);
+#endif
 
 	EnableControls();
 
Index: Trunk/XaraLX/Kernel/cameleps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/cameleps.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/cameleps.cpp	(revision 1357)
@@ -139,7 +139,7 @@
 //#include "dibutil.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "native.h"			// The new designed native filter, used for v2
 #include "nativeps.h"		// The old style EPS native filter, used in v1.1
-//#include "psdc.h"
+#include "psdc.h"
 #include "osrndrgn.h"
 //#include "prdlgctl.h"
 #include "progress.h"
@@ -5355,10 +5355,7 @@
 
 	DocCoord DCOrigin = pDC->GetOrigin();
 
-PORTNOTE ("other", "Disabled postscript printing transform")
-#ifndef EXCLUDE_FROM_XARALX
 	if (IsCamelotEPS)
-#endif
 	{
 		dWidth *= UnitSize;
 		dHeight *= UnitSize;
@@ -5369,10 +5366,9 @@
 		e[0] = ((double) (Coords[3].x - DCOrigin.x)) / UnitSize;
 		f[0] = ((double) (Coords[3].y - DCOrigin.y)) / UnitSize;
 	}
-PORTNOTE ("other", "Disabled postscript printing transform")
-#ifndef EXCLUDE_FROM_XARALX
 	else
 	{
+		ERROR3IF(!pDC->IsKindOf(CC_RUNTIME_CLASS(PSPrintDC)), "KernelDC is not a PSPrintDC - how did that happen?");
 		// Printing to PostScript - convert to Window co-ordinates, using the DC.
 		PSPrintDC *pPSDC = (PSPrintDC *) pDC;
 
@@ -5387,7 +5383,6 @@
 		e[0] = (double) PSCoords[3].x;
 		f[0] = (double) PSCoords[3].y;
 	}
-#endif
 
 	// Calculate the inverse of the above.
 	double Det = a[0] * d[0] - b[0] * c[0];
Index: Trunk/XaraLX/Kernel/debugdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/debugdlg.cpp	(revision 1356)
+++ Trunk/XaraLX/Kernel/debugdlg.cpp	(revision 1357)
@@ -1094,8 +1094,6 @@
 					}
 					break;
 
-PORTNOTE("Separations", "Removed use of SetNewColourPlate")
-#ifndef EXCLUDE_FROM_XARALX
 				case 1:  SetNewColourPlate(COLOURPLATE_COMPOSITE,0,0); break;
 				case 2:  SetNewColourPlate(COLOURPLATE_CYAN,	 0,0); break;
 				case 3:  SetNewColourPlate(COLOURPLATE_MAGENTA,	 0,0); break;
@@ -1135,7 +1133,6 @@
 						}
 					}
 					break;
-#endif
 
 				default:
 					ERROR3("Unknown debug command");
@@ -1165,8 +1162,6 @@
 		case 2:		// Mike's misc controls -------------------------------------------------
 			switch (CommandIndex)
 			{
-PORTNOTE("PrintMarks", "Removed use of PrintMarksMan")
-#ifndef EXCLUDE_FROM_XARALX
 				case 0:
 				{
 					// We need to execute this one after the dialogue has closed.
@@ -1195,7 +1190,6 @@
 					
 				}
 				break;
-#endif
 
 				case 2:
 				{
Index: Trunk/XaraLX/wxOil/oilbitmap.cpp
===================================================================
--- Trunk/XaraLX/wxOil/oilbitmap.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/oilbitmap.cpp	(revision 1357)
@@ -122,8 +122,8 @@
 //#include "andy.h"
 //#include "extfilts.h"	// Accusoft filters (load that bitmap!)
 //#include "fixmem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-//#include "prdlgctl.h"
-//#include "printctl.h"
+#include "prdlgctl.h"
+#include "printctl.h"
 //#include "richard2.h"
 //#include "view.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "colcontx.h"
@@ -1763,8 +1763,6 @@
 			{
 
 #ifndef STANDALONE
-PORTNOTE("printing", "Disabled printing")
-#ifndef EXCLUDE_FROM_XARALX
 				// Get the print info for this job.
 				CCPrintInfo *pInfo = CCPrintInfo::GetCurrent();
 				if (pInfo != NULL)
@@ -1775,10 +1773,6 @@
 						UseLevel2 = TRUE;
 				}
 #else
-				UseLevel2 = TRUE;
-#endif // EXCLUDE_FROM_XARALX
-
-#else
 	ERROR2(FALSE,"CWxBitmap::ExportBitmapData trying to print on Viewer version!");
 #endif
 			}
@@ -2014,8 +2008,6 @@
 #ifndef WEBSTER
 		if (pRegion->IsPrinting())
 		{
-PORTNOTE("printing", "Disabled printing")
-#ifndef EXCLUDE_FROM_XARALX
 			// Get the print info for this job.
 			CCPrintInfo *pInfo = CCPrintInfo::GetCurrent();
 			if (pInfo != NULL)
@@ -2023,9 +2015,6 @@
 				PrintControl *pPrCtrl = pInfo->GetPrintControl();
 				UseLevel2 = (pPrCtrl->GetPSLevel() == PSLEVEL_2);
 			}
-#else
-			UseLevel2 = TRUE;
-#endif
 		}
 		else
 #endif //webster
@@ -2325,7 +2314,7 @@
 			break;
 	}
 
-PORTNOTE("printing", "Disabled XaraCMS")
+PORTNOTE("cms", "Disabled XaraCMS")
 #ifndef EXCLUDE_FROM_XARALX
 	BOOL PrintRGBBlackAsKey = XaraCMS::PrintRGBBlackAsKey;
 #else
@@ -2456,7 +2445,7 @@
 			break;
 	}
 
-PORTNOTE("printing", "Disabled XaraCMS")
+PORTNOTE("cms", "Disabled XaraCMS")
 #ifndef EXCLUDE_FROM_XARALX
 	BOOL PrintRGBBlackAsKey = XaraCMS::PrintRGBBlackAsKey;
 #else
@@ -2629,7 +2618,7 @@
 			break;
 	}
 
-PORTNOTE("printing", "Disabled XaraCMS")
+PORTNOTE("cms", "Disabled XaraCMS")
 #ifndef EXCLUDE_FROM_XARALX
 	BOOL PrintRGBBlackAsKey = XaraCMS::PrintRGBBlackAsKey;
 #else
Index: Trunk/XaraLX/wxOil/Makefile.am
===================================================================
--- Trunk/XaraLX/wxOil/Makefile.am	(revision 1356)
+++ Trunk/XaraLX/wxOil/Makefile.am	(revision 1357)
@@ -36,7 +36,7 @@
 	fontbase.cpp ftfonts.cpp textfuns.cpp dragbmp.cpp xpoilflt.cpp xmlutils.cpp \
 	camprocess.cpp dropdown.cpp coldrop.cpp fontdrop.cpp bfxalu.cpp bfxpixop.cpp \
 	binreloc.c exceptio.cpp colpick.cpp dragpick.cpp sgldrag.cpp cctime.cpp \
-	lddirect.cpp prncamvw.cpp prdlgctl.cpp psdc.cpp \
+	lddirect.cpp prncamvw.cpp prdlgctl.cpp psdc.cpp grndprnt.cpp \
 	resources.cpp
 
 # Keep resources.cpp on a separate line as it is odd
Index: Trunk/XaraLX/wxOil/dibutil.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dibutil.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/dibutil.cpp	(revision 1357)
@@ -839,7 +839,6 @@
 
 		if (!PlotDownwards) DestY -= ThisSlice;
 
-	PORTNOTETRACE("other","GRenderRegion::GetRecommendedPalette - removed printing code");
 		if( Hint == CONVHINT_PRINTER )
 		{ 
 			// printers have to do it this way else they don't half-tone correctly
Index: Trunk/XaraLX/wxOil/prdlgctl.cpp
===================================================================
--- Trunk/XaraLX/wxOil/prdlgctl.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/prdlgctl.cpp	(revision 1357)
@@ -1473,6 +1473,8 @@
 	return hDC;
 }
 
+#endif // EXCLUDE_FROM_XARALX
+
 /********************************************************************************************
 
 >	static BOOL CCPrintDialog::IsPostscript()
@@ -1488,10 +1490,18 @@
 
 BOOL CCPrintDialog::IsPostscript()
 {
+PORTNOTE("printing", "Make printer always appear to be postscript")
+#ifndef EXCLUDE_FROM_XARALX
 	GetPrinterSettings();
 	return PrPostscript;
+#else
+	return TRUE;
+#endif
 }
 
+PORTNOTE("printing", "disabled lots of printer dialog code")
+#ifndef EXCLUDE_FROM_XARALX
+
 /********************************************************************************************
 
 >	static BOOL CCPrintDialog::LookUpPaperSize(UINT32 PaperSizeID,wxSize* pPaperSize)
Index: Trunk/XaraLX/wxOil/grndprnt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndprnt.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/grndprnt.cpp	(revision 1357)
@@ -111,7 +111,7 @@
 #include "fixmem.h"
 #include "osrndrgn.h"
 #include "view.h"
-#include "wbitmap.h"
+#include "oilbitmap.h"
 
 CC_IMPLEMENT_DYNAMIC(GRenderPrint, GRenderDIB)
 
@@ -186,7 +186,7 @@
 
 	// we need a white background, which on non-palette devices (all we can cope
 	// with currently) is 0xFF a lot.
-	memset( lpBits, 0xFF, lpBitmapInfo->bmiHeader.biSizeImage );
+	memset( pBits, 0xFF, pBitmapInfo->bmiHeader.biSizeImage );
 
 	// If we're colour separating then we want to DISABLE separations for the entire
 	// rendering-to-a-bitmap process, and we will then colour separate the resultant
@@ -284,12 +284,12 @@
 	// Free up the bitmap here, as the call to FreeLPBits in the
 	// GRenderDIB will not call the correct version (the virtual-ness will be
 	// broken as it is called from a destructor
-	if (lpBitmapInfo!=NULL)
+	if (pBitmapInfo!=NULL)
 	{
-//		FreeLPBits( lpBitmapInfo, lpBits );
+//		FreeLPBits( pBitmapInfo, pBits );
 		FreeOffscreenState();
-		lpBitmapInfo = NULL;
-		lpBits = NULL;
+		pBitmapInfo = NULL;
+		pBits = NULL;
 	}
 }
 
@@ -326,7 +326,10 @@
 	// GDI16 generates an error for it (invalid value 4)
 	// Note2: The MFC version of this function looks like the 16-bit API call,
 	// so we call the API directly here.
+PORTNOTE("printing", "Don't SetStretchBltMode")
+#ifndef EXCLUDE_FROM_XARALX
 	::SetStretchBltMode(RenderDC->m_hDC, HALFTONE);
+#endif
 
 	return TRUE;
 }
@@ -346,19 +349,19 @@
 
 BOOL GRenderPrint::DisplayBits(LPBITMAPINFO lpDisplayBitmapInfo, LPBYTE lpDisplayBits)
 {
-	INT32 BitmapWidth = lpBitmapInfo->bmiHeader.biWidth;
-	INT32 BitmapHeight = lpBitmapInfo->bmiHeader.biHeight;
+	INT32 BitmapWidth = pBitmapInfo->bmiHeader.biWidth;
+	INT32 BitmapHeight = pBitmapInfo->bmiHeader.biHeight;
 
 	if (RenderView != NULL && RenderView->GetColourPlate() != NULL && 
 		!RenderView->GetColourPlate()->IsDisabled())
 	{
 		// We currently can't handle anything less than 8bpp bitmaps here, as we
 		// write the output data to our bitmap in 8bpp format.
-		ERROR2IF(BitmapDepth < 8, FALSE, "Unexpectedly low BPP in GRenderPrint::DisplayBits");
+		ERROR2IF(uBitmapDepth < 8, FALSE, "Unexpectedly low BPP in GRenderPrint::DisplayBits");
 
 		// We're colour separating. We must separate the entire bitmap down to
 		// an 8bpp greyscale format
-		WinBitmap Bitmap(lpBitmapInfo, lpBits);
+		CWxBitmap Bitmap(pBitmapInfo, pBits);
 
 		// We are doing a colour separation - find the separation tables
 		BYTE *SepTables = NULL;
@@ -393,7 +396,7 @@
 			return(FALSE);
 		}
 
-		BYTE *pOutputBuffer = lpBits;				// We'll overwrite our bitmap with the separated data
+		BYTE *pOutputBuffer = pBits;				// We'll overwrite our bitmap with the separated data
 		for (INT32 y = 0; y < PixelHeight; y++)
 		{
 			// Get this scanline as a 32bpp generic structure
@@ -405,27 +408,27 @@
 
 		// Make sure that the new 8bpp bitmap has a greyscale palette on it - if it was not 8bpp,
 		// then we must realloc the header info to get enough room in it for a 256 colour palette.
-		if (lpBitmapInfo->bmiHeader.biBitCount != 8)
+		if (pBitmapInfo->bmiHeader.biBitCount != 8)
 		{
-			FreeDIB(lpBitmapInfo, NULL, NULL, FALSE);								// Free the info (ONLY)
-			lpBitmapInfo = AllocDIB(PixelWidth, PixelHeight, 8, NULL, NULL, FALSE);	// Realloc the info
+			FreeDIB(pBitmapInfo, NULL, NULL, FALSE);								// Free the info (ONLY)
+			pBitmapInfo = AllocDIB(PixelWidth, PixelHeight, 8, NULL, NULL, FALSE);	// Realloc the info
 		}
 
 		// And fill in the palette to a greyscale
 		for (INT32 i = 0; i < 256; i++)
 		{
-			lpBitmapInfo->bmiColors[i].rgbRed = 
-				lpBitmapInfo->bmiColors[i].rgbGreen = 
-					lpBitmapInfo->bmiColors[i].rgbBlue = i;
+			pBitmapInfo->bmiColors[i].rgbRed = 
+				pBitmapInfo->bmiColors[i].rgbGreen = 
+					pBitmapInfo->bmiColors[i].rgbBlue = i;
 
-			lpBitmapInfo->bmiColors[i].rgbReserved = 0;
+			pBitmapInfo->bmiColors[i].rgbReserved = 0;
 		}
 
 		// Free our separation tables and temporary scanline
 		CCFree(SepTables);
 		CCFree(TempScanline);
 
-		// Finally, poke the WinBitmap we created so that it doesn't delete OUR
+		// Finally, poke the CWxBitmap we created so that it doesn't delete OUR
 		// bitmap info and bytes (which we only lent it) when it is deleted
 		Bitmap.BMInfo  = NULL;
 		Bitmap.BMBytes = NULL;
@@ -434,31 +437,31 @@
 	{
 		// Not colour separating, but if it's a 32bpp bitmap, we need to convert to something 
 		// that StretchDIBits (below) can understand
-		if (BitmapDepth == 32)
+		if (uBitmapDepth == 32)
 		{
 			// Can't plot 32bpp bitmaps to GDI as 16-bit GDI doesn't understand them,
 			// so we convert to 24bpp bitmap in-situ and render that...
 
 			// How many bytes to a source scanline?
-			const INT32 ScanlineBytes = DIBUtil::ScanlineSize(BitmapWidth, BitmapDepth );
+			const INT32 ScanlineBytes = DIBUtil::ScanlineSize(BitmapWidth, uBitmapDepth );
 
 			// How many bytes to a destination scanline
 			const INT32 DestlineBytes = DIBUtil::ScanlineSize(BitmapWidth, 24);
 
 			// Now convert the bitmap in-situ
-			LPBYTE OriginalBuffer  = lpBits;
-			LPBYTE ConvertedBuffer = lpBits;
+			LPBYTE OriginalBuffer  = pBits;
+			LPBYTE ConvertedBuffer = pBits;
 
 			for (INT32 i = 0; i < BitmapHeight; i++)
 			{
 				DIBUtil::Convert32to24(BitmapWidth, OriginalBuffer, ConvertedBuffer);
-				OriginalBuffer += ScanlineBytes;
-				ConvertedBuffer += DestlineBytes;
+				OriginalBuffer += (UINT_PTR) ScanlineBytes;
+				ConvertedBuffer += (UINT_PTR) DestlineBytes;
 			}
 
 			// Update bitmap info to show it is now a 24bpp bitmap...
-			lpBitmapInfo->bmiHeader.biBitCount  = 24;
-			lpBitmapInfo->bmiHeader.biSizeImage = DestlineBytes * BitmapHeight;
+			pBitmapInfo->bmiHeader.biBitCount  = 24;
+			pBitmapInfo->bmiHeader.biSizeImage = DestlineBytes * BitmapHeight;
 		}
 	}
 
@@ -466,17 +469,22 @@
 	//RenderDC->GetClipBox(&clip);
 	clip = OSRenderRegion::DocRectToWin(RenderView, RenderMatrix, CurrentClipRect, 0, 0, 0, 0);
 
+PORTNOTE("printing", "Attempt to use StaticPlotBitmap instead of StretchDIBits")
+#ifndef EXCLUDE_FROM_XARALX
 	INT32 Scanlines = StretchDIBits(RenderDC->m_hDC,
 								  clip.left, clip.top,
 								  clip.Width(), clip.Height(),
 								  0, 0,
 								  BitmapWidth, BitmapHeight,
-								  lpBits,
-								  lpBitmapInfo,
+								  pBits,
+								  pBitmapInfo,
 								  DIB_RGB_COLORS,
 								  SRCCOPY);
 
 	ERROR3IF(Scanlines == GDI_ERROR, "No scanlines copied in GRenderPrint::DisplayBits()!");
+#else
+	GRenderRegion::StaticPlotBitmap(RenderDC, DIB_RGB_COLORS, pBitmapInfo, pBits, clip.x, clip.y, clip.width, clip.height, NULL, 0, 0);
+#endif
 
 	return TRUE;
 }
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1357)
@@ -153,7 +153,7 @@
 //#endif
 
 //#include "grnddib.h"
-//GAT #include "grndprnt.h"
+#include "grndprnt.h"
 #include "grndrgn.h"
 //GAT #include "grndwing.h"
 //#include "gversion.h"
@@ -5846,8 +5846,6 @@
 		}
 		else if ((rType==RENDERTYPE_PRINTER) || (rType==RENDERTYPE_PRINTER_PS))
 		{
-PORTNOTE("printing", "Disabled GRenderPrint")
-#ifndef EXCLUDE_FROM_XARALX
 			// Always use 24 bit for printers, which means 32bit because Gavin can't do
 			// 24-bit bitmaps.
 			UINT32 BitmapDepth = 32;
@@ -5869,10 +5867,6 @@
 
 			return new GRenderPrint(ClipRegion, ConvertMatrix, ViewScale, 
 									BitmapDepth, PrintDPI);
-#else
-			ERROR3("Can't create a GRenderPrint because we haven't ported it yet");
-			return NULL;
-#endif
 		}
 	}
 
Index: Trunk/XaraLX/wxOil/osrndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/osrndrgn.cpp	(revision 1356)
+++ Trunk/XaraLX/wxOil/osrndrgn.cpp	(revision 1357)
@@ -389,12 +389,10 @@
 	}
 	else if ((rType == RENDERTYPE_PRINTER) || (rType == RENDERTYPE_PRINTER_PS))
 	{
-		PORTNOTETRACE("other","OSRenderRegion::Create - printing disabled");
-#if !defined(EXCLUDE_FROM_XARALX)
 #ifndef STANDALONE
 		// Work out what kind of printer region to get - find document's print control info.
 		Document *pDoc = pView->GetDoc();
-		ERROR3IF(pDoc == NULL, "No document attached to view when printing!")
+		ERROR3IF(pDoc == NULL, "No document attached to view when printing!");
 		if (pDoc != NULL)
 		{
 			// Get print information for this document.
@@ -425,7 +423,6 @@
 			return new PrintPSRenderRegion(ClipRect, ConvertMatrix, ViewScale);
 		}
 #endif
-#endif
 		// If we get here, then we should use normal OS rendering.
 //		TRACE(_T("Creating PRINTER region (%d, %d) - (%d, %d)  OSRenderRegion
"), ClipRect.lo.x, ClipRect.lo.y, ClipRect.hi.x, ClipRect.hi.y);
 		return new OSRenderRegion(ClipRect, ConvertMatrix, ViewScale);


Xara