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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 959
Date       : Fri May  5 12:41:13 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   M /Trunk/XaraLX/Kernel/aprps.cpp
   M /Trunk/XaraLX/Kernel/bmpsdlg.cpp
   M /Trunk/XaraLX/Kernel/dialogop.cpp
   M /Trunk/XaraLX/Kernel/dialogop.h
   M /Trunk/XaraLX/Kernel/frameops.cpp
   M /Trunk/XaraLX/Kernel/frameops.h
   M /Trunk/XaraLX/Kernel/main2.cpp
   M /Trunk/XaraLX/Kernel/prevwdlg.cpp
   M /Trunk/XaraLX/Kernel/prevwdlg.h
   M /Trunk/XaraLX/Kernel/sgbitmap.cpp
   M /Trunk/XaraLX/Scripts/rc2xml.pl
   M /Trunk/XaraLX/tools/opcntr.cpp
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp
   M /Trunk/XaraLX/wxOil/dlgmgr.h
   M /Trunk/XaraLX/wxOil/ktimer.h
   M /Trunk/XaraLX/wxOil/stdwx.h
   M /Trunk/XaraLX/wxOil/xrc/EN/bmpdlgr.xrc

Work on bitmap properties dialog, initial look at some animation stuff


Diff:
Index: Trunk/XaraLX/tools/opcntr.cpp
===================================================================
--- Trunk/XaraLX/tools/opcntr.cpp	(revision 958)
+++ Trunk/XaraLX/tools/opcntr.cpp	(revision 959)
@@ -3735,7 +3735,7 @@
 	if (ok)
 	{
 		// The new number of steps is in pOpParam->Param1 of the 
-		UINT32 NewStepDistance = UINT32(pOpParam->Param1);
+		INT32 NewStepDistance = INT32(pOpParam->Param1);
 		pItem = (NodeListItem *)NodeList.GetHead();
 
 		Node* pSelNode = NULL;
Index: Trunk/XaraLX/Kernel/bmpsdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmpsdlg.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/bmpsdlg.cpp	(revision 959)
@@ -248,14 +248,14 @@
 						CommitDialogValue();
 						Close();	// Hide the dialog box
 						End();		// Finish the operation
-							
+						return OK;							
 					}
 			break;
 			case DIM_CANCEL:	
 					{
 						Close();	// Hide the dialog box
 						End();		// Finish the operation
-						return (DLG_EAT_IF_HUNGRY(Msg)); 
+						return OK; 
 					}
 			break;
 			case DIM_LISTDROPPED:
Index: Trunk/XaraLX/Kernel/frameops.cpp
===================================================================
--- Trunk/XaraLX/Kernel/frameops.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/frameops.cpp	(revision 959)
@@ -131,9 +131,8 @@
 #include "cbmpdata.h"		// CBitmapData
 
 #include "palman.h"			// MakePaletteBrowserCompatible
-#include "wbitmap.h"		// WinBitmap
 
-#include "xshelpid.h"	//For the help ID
+//#include "xshelpid.h"	//For the help ID
 
 #include "gpalopt.h" // for the palette optimiser
 #include "mrhbits.h"
@@ -153,20 +152,24 @@
 CC_IMPLEMENT_DYNCREATE(OpFrameProperties, Operation);
 CC_IMPLEMENT_DYNCREATE(OpAnimationProperties, Operation);
 
+
+PORTNOTE("other", "Removed GrabFrameFilter, OpGrabFrame, OpGrabAllFrames")
+#ifndef EXCLUDE_FROM_XARALX
 CC_IMPLEMENT_DYNAMIC(GIFAnimationExportParam,	BitmapExportParam);
-
 CC_IMPLEMENT_DYNCREATE(OpGrabFrame, Operation);
 CC_IMPLEMENT_DYNCREATE(OpGrabAllFrames, OpGrabFrame);
 CC_IMPLEMENT_DYNAMIC(GrabFrameFilter, MakeBitmapFilter);
 CC_IMPLEMENT_DYNCREATE(OpSaveAnimatedGIF, OpGrabAllFrames);
 CC_IMPLEMENT_DYNCREATE(OpBrowserPreview, OpSaveAnimatedGIF);
 
+BOOL OpGrabAllFrames::ms_ForceRefreshOfAllFrames = FALSE;
+#endif
+
 // This will get Camelot to display the filename and linenumber of any memory allocations
 // that are not released at program exit
 // This line mustn't go before any CC_IMPLEMENT_... macros
 #define new CAM_DEBUG_NEW
 
-BOOL OpGrabAllFrames::ms_ForceRefreshOfAllFrames = FALSE;
 
 //------------------------------------------------------------------------------------------
 // Methods for the OpSelectStartFrame
@@ -247,9 +250,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// yes, so find the first layer and try to move to it
 		Layer * pLayer = pSpread->FindFirstFrameLayer();
 		if (pLayer)
@@ -350,9 +355,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// yes, so find the last layer and try to move to it
 		Layer * pLayer = pSpread->FindLastFrameLayer();
 		if (pLayer)
@@ -501,9 +508,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// yes, so find the last layer and try to move to it
 		Layer * pLayer = pSpread->FindActiveLayer();
 		Layer * pPrevLayer = NULL;
@@ -656,9 +665,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled BrowserPreviewOptions")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// yes, so find the next layer and try to move to it
 		Layer * pLayer = pSpread->FindActiveLayer();
 		Layer * pNextLayer = NULL;
@@ -765,6 +776,8 @@
 
 void OpCreateNewFrame::Do( OpDescriptor * pOpDesc )
 {
+PORTNOTE("other", "Disabled BrowserPreviewOptions")
+#ifndef EXCLUDE_FROM_XARALX
 	// Just find the background layer and then ask our baseclass to delete it for us
 	// Is there a selected spread?
 	Spread * pSpread = Document::GetSelectedSpread();
@@ -772,7 +785,6 @@
 	{
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
 		// Use the spread as the context node
 		OpLayerGalParam Param(FRAME_NEW, pSpread);
 		Param.pLayer		= NULL;
@@ -787,6 +799,7 @@
 
 	// End the operation, but we are calling DoWithParam() which we will assume does it for us.
 	//End();
+#endif
 
 	return;
 }
@@ -898,6 +911,8 @@
 
 void OpCopyFrame::Do( OpDescriptor * pOpDesc )
 {
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 	// Just find the background layer and then ask our baseclass to delete it for us
 	// Is there a selected spread?
 	Spread * pSpread = Document::GetSelectedSpread();
@@ -925,7 +940,7 @@
 
 	// End the operation, but we are calling DoWithParam() which we will assume does it for us.
 	//End();
-
+#endif
 	return;
 }
 
@@ -1051,9 +1066,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// yes, so check that there is a presently active layer and try to delete it
 		Layer * pLayer = pSpread->FindActiveLayer();
 		if (pLayer)
@@ -1190,9 +1207,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_GIFANIMPROPERTYTABS);
 
 		if (pOpDesc != NULL)
@@ -1351,9 +1370,11 @@
 	Spread * pSpread = Document::GetSelectedSpread();
 	if (pSpread)
 	{
+PORTNOTE("other", "Disabled FrameSGallery")
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers.
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_GIFANIMPROPERTYTABS);
 
 		if (pOpDesc != NULL)
@@ -1388,6 +1409,9 @@
 // End of OpAnimationProperties
 ********************************************************************************************/
 
+PORTNOTE("other", "Removed GrabFrameFilter, OpGrabFrame, OpGrabAllFrames")
+#ifndef EXCLUDE_FROM_XARALX
+
 //------------------------------------------------------------------------------------------
 // Methods for the OpGrabFrame
 //------------------------------------------------------------------------------------------
@@ -1428,7 +1452,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 	if(ok)
@@ -1447,7 +1471,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 	 if(ok)
@@ -1466,7 +1490,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 	 if(ok)
@@ -1485,7 +1509,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 	if(ok)
@@ -1504,7 +1528,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 	if(ok)
@@ -1523,7 +1547,7 @@
 								FALSE,							// Smart duplicate operation
 								TRUE,							// Clean operation
 								NULL,							// No vertical counterpart
-								NULL,							// String for one copy only error
+								0,								// String for one copy only error
 								(DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags
 								);
 			// end of non-undoable operations
@@ -1928,7 +1952,7 @@
 	if (pParam != NULL)
 	{
 		// recover the layer pointer that has been specified
-		Layer* pLayer = (Layer *) pParam->Param1;
+		Layer* pLayer = (Layer *) (void *) pParam->Param1;
 		if (pLayer)
 		{
 			ERROR3IF(!pLayer->IS_KIND_OF(Layer), "OpParam passed is not a Layer");
@@ -2279,7 +2303,7 @@
 	m_pLayer->SetEdited(FALSE);
 #ifdef _DEBUG
 	// Tell the frame gallery to update its display of the frame
-	BROADCAST_TO_ALL(LayerMsg(m_pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+	BROADCAST_TO_ALL(LayerMsg(m_pLayer, LayerMsg::REDRAW_LAYER));
 #endif
 
 	// return the bitmap to the caller
@@ -2617,7 +2641,7 @@
 
 	// Get some of the current export options
 	DocRect	BoundingRect	= m_ExportParams.GetAnimationBoundingRect();
-	ERROR3IF(BoundingRect.IsEmpty(),"Bounding rect not set up")
+	ERROR3IF(BoundingRect.IsEmpty(),"Bounding rect not set up");
 //	PALETTE_COLOURS	Palette = m_ExportParams.GetPaletteCols();
 //	WEB_PALETTE WebPalette	= m_ExportParams.GetPalette();
 
@@ -2764,8 +2788,8 @@
 					// Work out the position of the bitmap relative to the top left hand
 					// corner of the bounding rectangle in terms of pixels and put this
 					// in the bitmap 
-					MILLIPOINT LeftOffsetMP = rect.lox - BoundingRect.lox;
-					MILLIPOINT TopOffsetMP = BoundingRect.hiy - rect.hiy;
+					MILLIPOINT LeftOffsetMP = rect.lo.x - BoundingRect.lo.x;
+					MILLIPOINT TopOffsetMP = BoundingRect.hi.y - rect.hi.y;
 					if (LeftOffsetMP >= 0 && TopOffsetMP >= 0)
 					{
 						const UINT32 dpi = 96;
@@ -3043,12 +3067,11 @@
 		// Set up the visibility of the other layers using this layer
 		// as the new temporary and acting active layer
 		FrameSGallery::FixOtherLayersFromActive(pCurrentLayer);
-			
 		// This is the layer that we are adding to the global palette
 		m_pLayer = pCurrentLayer;
 
 		// Render a bitmap of the entire image being exported
-		KernelBitmap* pTestBitmap;
+		KernelBitmap* pTestBitmap=NULL;
 		m_pBitmapFilter->DoCreateBitmap(this, m_pDocument, &pTestBitmap);
 
 		// not enough memory? or no content worth talking about then give up!
@@ -3094,7 +3117,7 @@
 	pPalOpt->UseBrowserPalette(0);
 	pPalOpt->SetFast(TRUE);
 
-	INT32 ColoursToOptimise = max(2, NumColsInPalette-1);
+	INT32 ColoursToOptimise = camMax(2, NumColsInPalette-1);
 
 	// tell the optimiser that we have finished gathering the stats
 	pPalOpt->GenPalette(ColoursToOptimise);
@@ -3107,7 +3130,7 @@
 	pPalOpt->GetPalette( pGlobalPal, ColoursToOptimise);
 
 	 // we want to add a transparent colour to this palette
-	pGlobalPal->palNumEntries = min(255,pGlobalPal->palNumEntries+1);
+	pGlobalPal->palNumEntries = camMin(255,pGlobalPal->palNumEntries+1);
 
 	// the first entry in the palette is special it should be the background colour as it will
 	// be what is visible if the background is not transparent so swap the first entry into
@@ -3217,9 +3240,14 @@
 		RegenerateAllFrames = TRUE;
 
 	Quality OldQuality = m_pSpread->GetAnimationQuality();
-	Quality NewQuality = m_pView->RenderQuality;
-	NewQuality.Antialias = Quality::FullAntialias;
-	NewQuality.Transparency = Quality::FullTransparency;
+
+	// AMB doesn't understand what the following lines were meant to do. Quality
+	// is a linear scale. And in any case this doesn't compile (unsurprisingly)
+	// Quality NewQuality = m_pView->RenderQuality;
+	// NewQuality.Antialias = Quality::FullAntialias;
+	// NewQuality.Transparency = Quality::FullTransparency;
+	Quality NewQuality(Quality::QualityMax);
+
 	// Save away the new quality
 	m_pSpread->SetAnimationQuality(NewQuality);
 	if (NewQuality != OldQuality)
@@ -3451,7 +3479,7 @@
 			pLayer->SetEdited(FALSE);
 #ifdef _DEBUG
 			// Tell the frame gallery to update its display of the frame
-			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 #endif
 		}
 
@@ -4304,7 +4332,7 @@
 
 BOOL GIFAnimationExportParam::AddLayer(Layer * pLayer)
 {
-	ERROR2IF(pLayer == NULL,FALSE,"AddLayer given null layer")
+	ERROR2IF(pLayer == NULL,FALSE,"AddLayer given null layer");
 	BOOL ok = TRUE;
 
 	// If we have a null list then just allocate the first item
@@ -4353,7 +4381,7 @@
 
 BOOL GIFAnimationExportParam::AddBitmap(KernelBitmap * pBitmap)
 {
-	ERROR2IF(pBitmap == NULL,FALSE,"Addbitmap given null bitmap")
+	ERROR2IF(pBitmap == NULL,FALSE,"Addbitmap given null bitmap");
 	BOOL ok = TRUE;
 
 	// If we have a null list then just allocate the first item
@@ -4632,7 +4660,7 @@
 	CCDiskFile DiskFile(1024, FALSE, TRUE);
 
 	BOOL ExportedOk = TRUE;
-	TRY
+	try
 	{
 		// Export bitmaps
 		ExportedOk = m_pBitmapFilter->DoExportBitmaps(this, &DiskFile, &m_SavePath, pExportParam);
@@ -4659,7 +4687,7 @@
 	}
 
 	// See if there was a file io error
-	CATCH(CFileException, e)
+	catch(CFileException)
 	{
 		// Report the error if no one else did
 		if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
@@ -4670,7 +4698,7 @@
 			Error::ClearError();	// otherwise remove the error so it won't get reported
 
 		// Make sure that the file is closed and deleted
-		TRY
+		try
 		{
 			// First try and delete it (tries to close it first)
 			if (m_pBitmapFilter)
@@ -4680,17 +4708,15 @@
 			if (DiskFile.isOpen())
 				DiskFile.close();
 		}
-		CATCH(CFileException, e)
+		catch(CFileException)
 		{
 			// Failed to close the file - not much we can do about it really
 		}
-		END_CATCH
 
 		// Fail
 		ExportedOk = FALSE;
 	}
-	END_CATCH
-
+	
 	// Clean out the filter we created
 	delete m_pBitmapFilter;
 	m_pBitmapFilter = NULL;
@@ -4715,7 +4741,7 @@
 
 BOOL OpSaveAnimatedGIF::EnsureFileType(PathName * pPath)
 {
-	ERROR2IF(pPath == NULL,FALSE,"EnsureFileExtension bad path specified")
+	ERROR2IF(pPath == NULL,FALSE,"EnsureFileExtension bad path specified");
 
 	// we are essentially a GIF filter so we need that extension
 	String_32 ExtStr(_R(IDN_FILTEREXT_GIF));
@@ -4735,6 +4761,7 @@
 // end of OpSaveAnimatedGIF
 ********************************************************************************************/
 
+
 //------------------------------------------------------------------------------------------
 // Methods for the OpBrowserPreview
 //------------------------------------------------------------------------------------------
@@ -4825,7 +4852,8 @@
 	CCDiskFile DiskFile(1024, FALSE, TRUE);
 
 	BOOL ExportedOk = TRUE;
-	TRY
+
+	try
 	{
 		// Export bitmaps supressing the filename so that the user does not see the temp filename
 		ExportedOk = m_pBitmapFilter->DoExportBitmaps(this, &TempDiskFile, &m_TempPath, &m_ExportParams, TRUE);
@@ -4852,7 +4880,7 @@
 	}
 
 	// See if there was a file io error
-	CATCH(CFileException, e)
+	catch(CFileException)
 	{
 		// Report the error if no one else did
 		if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
@@ -4863,7 +4891,7 @@
 			Error::ClearError();	// otherwise remove the error so it won't get reported
 
 		// Make sure that the file is closed and deleted
-		TRY
+		try
 		{
 			// First try and delete it (tries to close it first)
 			if (m_pBitmapFilter)
@@ -4873,16 +4901,14 @@
 			if (DiskFile.isOpen())
 				DiskFile.close();
 		}
-		CATCH(CFileException, e)
+		catch(CFileException)
 		{
 			// Failed to close the file - not much we can do about it really
 		}
-		END_CATCH
 
 		// Fail
 		ExportedOk = FALSE;
 	}
-	END_CATCH
 
 	///------------------------------------
 	// Now we have the file, we can go and preview it in the browser
@@ -5010,4 +5036,6 @@
 // End of OpBrowserPreview
 ********************************************************************************************/
 
+#endif // EXCLUDE_FROM_XARALX
 
+
Index: Trunk/XaraLX/Kernel/prevwdlg.h
===================================================================
--- Trunk/XaraLX/Kernel/prevwdlg.h	(revision 958)
+++ Trunk/XaraLX/Kernel/prevwdlg.h	(revision 959)
@@ -105,7 +105,7 @@
 #include "dialogop.h"
 #include "list.h"
 #include "listitem.h"
-//#include "hirestim.h"	// high-resolution timer class
+#include "ktimer.h"
 //#include "impexpop.h"
 #include "frameops.h"
 
@@ -272,9 +272,6 @@
 	// The number of the current bitmap that we are displaying
 	INT32 m_CurrentItem;
 	
-	// The timer that we are using
-	HiResTimer m_Timer;
-
 	// The render region that we are using for redraws
 	RenderRegion * m_pRender;
 
@@ -298,7 +295,20 @@
 
 protected:
 	// the call back statics that we require
-	static BOOL TimerProc(HiResTimer* pTimer, INT32 nElapsed, void* pvData);
+//	static BOOL TimerProc(HiResTimer* pTimer, INT32 nElapsed, void* pvData);
+
+	void OnTimer();
+
+	class PreviewTimer : public KernelTimer
+	{
+	public:
+		PreviewTimer(PreviewDialog * pOwner) : m_pOwner(pOwner) {}
+		virtual void Notify() {m_pOwner->OnTimer();}
+		PreviewDialog * m_pOwner;
+	};
+	PreviewTimer m_Timer;
+
+
 	static UINT32 m_Delay; 
 	static BOOL m_AnimationPropertiesChanged;	// While the dialog is open, has the user changed any properties?
 	static PreviewDialog* m_pPreviewDialog;
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 958)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 959)
@@ -66,6 +66,7 @@
 	ngsentry.cpp ngsetop.cpp ngdialog.cpp property.cpp \
 	optsedit.cpp optsmisc.cpp optspntr.cpp optstune.cpp optsview.cpp optsgrid.cpp \
 	optspage.cpp optsundo.cpp optsscal.cpp optsunit.cpp pagesize.cpp radio.cpp \
-	xpfcaps.cpp xpfilter.cpp xpfrgn.cpp layerprp.cpp prpsgds.cpp prpslyrs.cpp
+	xpfcaps.cpp xpfilter.cpp xpfrgn.cpp layerprp.cpp prpsgds.cpp prpslyrs.cpp \
+	aprps.cpp prevwdlg.cpp frameops.cpp
 
 AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/main2.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main2.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/main2.cpp	(revision 959)
@@ -156,7 +156,7 @@
 #include "bmpsdlg.h"
 #include "urlimp.h"
 #include "urldlg.h"
-//#include "aprps.h"
+#include "aprps.h"
 #include "crthumb.h"
 #include "bmapprev.h"
 #include "opbevel.h"
@@ -467,9 +467,9 @@
 			OpDragBox::Init() &&				// drag operation base-class
 			OpQuality::Init() &&				// init the OpQuality operations
 			BmpDlg::Init() &&					// Register Bitmap Properties Dialog
-#ifndef EXCLUDE_FROM_XARALX
 			GIFAnimationPropertyTabsDlg::Init() &&	// Register the GIF animation tabs dialog
 			AnimExOptns::Init() &&					// Register the Animation Export Options tabs dialog	
+#ifndef EXCLUDE_FROM_XARALX
 			OpConvertPathToShapes::Declare() &&		// convert path to shapes operation
 			OpChangeBrushDefinition::Declare() &&
 // WEBSTER-ranbirr-13/11/96
Index: Trunk/XaraLX/Kernel/dialogop.cpp
===================================================================
--- Trunk/XaraLX/Kernel/dialogop.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/dialogop.cpp	(revision 959)
@@ -3331,6 +3331,12 @@
 	return DialogManager::GetWindowPosition(GetReadWriteWindowID(), pRect);
 }
 
+BOOL DialogOp::GetWindowPosition( RECT *pRect )
+{
+	// Call the Dialog Manager
+	return DialogManager::GetWindowPosition(GetReadWriteWindowID(), pRect);
+}
+
 /********************************************************************************************
 
 >	BOOL DialogOp::GetGadgetPosition(CGadgetID Gadget, RECT * pRect)
@@ -3350,6 +3356,12 @@
 	return DialogManager::GetGadgetPosition(GetReadWriteWindowID(), Gadget, pRect);
 }
 
+BOOL DialogOp::GetGadgetPosition( CGadgetID Gadget, RECT *pRect )
+{
+	// Call the Dialog Manager
+	return DialogManager::GetGadgetPosition(GetReadWriteWindowID(), Gadget, pRect);
+}
+
 /********************************************************************************************
 
 >	BOOL DialogOp::SetWindowPosition(const RECT& Rect)
@@ -3369,6 +3381,12 @@
 	return DialogManager::SetWindowPosition(GetReadWriteWindowID(), Rect);
 }
 
+BOOL DialogOp::SetWindowPosition( const RECT &Rect )
+{
+	// Call the Dialog Manager
+	return DialogManager::SetWindowPosition(GetReadWriteWindowID(), Rect);
+}
+
 /********************************************************************************************
 
 >	BOOL DialogOp::SetGadgetPosition(CGadgetID Gadget, const RECT& Rect)
@@ -3388,6 +3406,12 @@
 	return DialogManager::SetGadgetPosition(GetReadWriteWindowID(), Gadget, Rect);
 }
 
+BOOL DialogOp::SetGadgetPosition( CGadgetID Gadget, const RECT &Rect )
+{
+	// Call the Dialog Manager
+	return DialogManager::SetGadgetPosition(GetReadWriteWindowID(), Gadget, Rect);
+}
+
 /********************************************************************************************
 
 >	INT32 DialogOp::GetScreenDpi()
Index: Trunk/XaraLX/Kernel/frameops.h
===================================================================
--- Trunk/XaraLX/Kernel/frameops.h	(revision 958)
+++ Trunk/XaraLX/Kernel/frameops.h	(revision 959)
@@ -417,6 +417,13 @@
 	UINT32 m_RegeneratedBitmapPosition;	// The position of the regenerated bitmap in the array. 	
 };
 
+#define OPTOKEN_FRAME_GRABFRAME		_T("GrabFrame")
+#define OPTOKEN_FRAME_GRABALLFRAMES	_T("GrabAllFrames")
+#define	OPTOKEN_SAVEANIMATEDGIF	_T("SaveAnimatedGIF")
+#define OPTOKEN_FRAME_BROWSERPREVIEW _T("BrowserPreview")
+
+PORTNOTE("other", "Removed GrabFrameFilter, OpGrabFrame, OpGrabAllFrames")
+#ifndef EXCLUDE_FROM_XARALX
 //------------------------------------------------------------------------------------------
 //#if _DEBUG // removal of these ops from non-debug builds
 //------------------------------------------------------------------------------------------
@@ -524,7 +531,6 @@
 	SeeAlso:	-
 
 ********************************************************************************************/
-#define OPTOKEN_FRAME_GRABFRAME		_T("GrabFrame")
 
 class CCAPI OpGrabFrame : public Operation
 {         
@@ -600,7 +606,6 @@
 	SeeAlso:	-
 
 ********************************************************************************************/
-#define OPTOKEN_FRAME_GRABALLFRAMES	_T("GrabAllFrames")
 
 class CCAPI OpGrabAllFrames : public OpGrabFrame
 {         
@@ -636,7 +641,6 @@
 ********************************************************************************************/
 
 // Operation token for the OpMenuExport class
-#define	OPTOKEN_SAVEANIMATEDGIF	_T("SaveAnimatedGIF")
 
 class OpSaveAnimatedGIF : public OpGrabAllFrames
 {
@@ -672,7 +676,6 @@
 	SeeAlso:	-
 
 ********************************************************************************************/
-#define OPTOKEN_FRAME_BROWSERPREVIEW _T("BrowserPreview")
 
 class CCAPI OpBrowserPreview : public OpSaveAnimatedGIF
 {         
@@ -694,5 +697,6 @@
 
 //------------------------------------------------------------------------------------------
 //#endif // _DEBUG removal of these ops from non-debug builds
+#endif // EXCLUDE_FROM_XARALX
 
 #endif	// INC_FRAMEOPS
Index: Trunk/XaraLX/Kernel/sgbitmap.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgbitmap.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/sgbitmap.cpp	(revision 959)
@@ -151,7 +151,7 @@
 #include "backgrnd.h"	// OpBackground
 #include "keypress.h"	// KeyPress
 #include "impexpop.h"	// BitmapExportParam
-//#include "prevwdlg.h"	// PreviewDialog::Init()
+#include "prevwdlg.h"	// PreviewDialog::Init()
 #include "bmpexprw.h"	// BitmapExportPreviewDialog::Init()
 
 #include "helpuser.h"		//For the help button
@@ -229,8 +229,6 @@
 BOOL SGBitmapDragTarget::ProcessEvent(DragEventType Event, DragInformation *pDragInfo,
 										OilCoord *pMousePos, KeyPress* pKeyPress)
 {
-PORTNOTE("other", "Disabled use of BitmapDragInformation");
-#ifndef EXCLUDE_FROM_XARALX
 	if (!pDragInfo->IsKindOf(CC_RUNTIME_CLASS(BitmapDragInformation)))
 		return(FALSE);
 
@@ -265,7 +263,6 @@
 				break;
 		}
 	}
-#endif
 	// Otherwise, we aren't interested in the event, so we don't claim it
 	return(FALSE);
 }
@@ -2580,8 +2577,6 @@
 					HelpUserTopic(_R(IDS_HELPPATH_Gallery_Bitmap));
 					break;
 				}
-PORTNOTE("other", "Removed preview dialog")
-#ifndef EXCLUDE_FROM_XARALX
 				else if (Msg->GadgetID == _R(IDC_BMPGAL_PREVIEW))
 				{
 					// Generate a list of the selected bitmaps
@@ -2646,7 +2641,6 @@
 					if (pList != NULL)
 						CCFree(pList);
 				}
-#endif
 #ifdef PHOTOSHOPPLUGINS
 // Only add in if required - general plug-in removal at present
 				else if (Msg->GadgetID == _R(IDC_BMPGAL_PLUGINS))
@@ -3462,13 +3456,13 @@
 								TRUE	  // BOOL fCheckable = FALSE
 								)
 			
-PORTNOTE("other", "Removed Preview Dialog")
+PORTNOTE("other", "Removed BitmapExportPreviewDialog")
 #ifndef EXCLUDE_FROM_XARALX
 //#if _DEBUG
 			&& BitmapExportPreviewDialog::Init()
 //#endif
-			&& PreviewDialog::Init()
 #endif
+			&& PreviewDialog::Init()
 			);
 }               
     
Index: Trunk/XaraLX/Kernel/prevwdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/prevwdlg.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/prevwdlg.cpp	(revision 959)
@@ -111,7 +111,7 @@
 //#include "prevwres.h"
 #include "impexpop.h"	// BitmapExportParam
 #include "nodebmp.h"	// NodeBitmap
-#include "gifutil.h"	// GDM_BACKTOBACK
+//#include "gifutil.h"	// GDM_BACKTOBACK
 #include "dlgview.h"	// DialogView
 
 //#include "rikdlg.h"		// _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)
@@ -121,7 +121,7 @@
 
 #include "spread.h"		// GetFirstFrameLayer()
 
-#include "xshelpid.h"	//For the help ID
+//#include "xshelpid.h"	//For the help ID
 
 // This is not compulsory, but you may as well put it in so that the correct version
 // of your file can be registered in the .exe
@@ -159,7 +159,7 @@
 	{	_R(IDC_PREVIEW_NEXTFRAME),	 _R(IDS_PREVIEWBH_NEXTFRAME) },
 	{	_R(IDC_PREVIEW_PREVFRAME),	 _R(IDS_PREVIEWBH_PREVFRAME) },	
 	{	_R(IDC_PREVIEW_SLIDER),		 _R(IDS_PREVIEWBH_SLIDER)	 },
-	{	NULL, NULL										 }	
+	{	0, 0										 }	
 
 };
 
@@ -240,7 +240,7 @@
 
 *******************************************************************************************/
 
-PreviewDialog::PreviewDialog() : DialogOp(PreviewDialog::IDD, PreviewDialog::Mode) 
+PreviewDialog::PreviewDialog() : DialogOp(PreviewDialog::IDD, PreviewDialog::Mode), m_Timer(this)
 {
 	m_BitmapListSize			= 0;
 	m_CurrentItem				= 0;
@@ -339,7 +339,7 @@
 					SetUpCallBack();
 					
 					INT32 i = 0;
-					while (BubbleHelp[i].Gadget != NULL)						
+					while (BubbleHelp[i].Gadget)						
 					{
 						SetGadgetHelp(BubbleHelp[i].Gadget, BubbleHelp[i].BubbleID, BubbleHelp[i].BubbleID);
 						i++;
@@ -359,25 +359,23 @@
 			case DIM_SLIDER_POS_CHANGING:
 			{
 				// Messages to all the controls, handled individually
-				switch (Msg->GadgetID)
+				if (Msg->GadgetID == _R(IDC_PREVIEW_SLIDER))
 				{
-					case _R(IDC_PREVIEW_SLIDER):								
-					{
-						// While the animation is playing, if this button is selected,
-						// the play button is clicked out, the stop button is clicked in,
-						// and the next/previous frame in the animation is displayed. 
-						PreviewDlgStop();
-						// Kill any bubble help just in case the user has bubble help up
-						// over the slider
-						ControlHelper::BubbleHelpDisable();
-
-						SetSliderPosition();												
-													
-						// Force the gadget to be repainted, 
-						// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-						InvalidateGadget(_R(IDC_REDRAW_ME));
-					}
-					break;
+					// While the animation is playing, if this button is selected,
+					// the play button is clicked out, the stop button is clicked in,
+					// and the next/previous frame in the animation is displayed. 
+					PreviewDlgStop();
+					// Kill any bubble help just in case the user has bubble help up
+					// over the slider
+PORTNOTE("other", "Remove Bubble help reference");
+#ifndef EXCLUDE_FROM_XARALX
+					ControlHelper::BubbleHelpDisable();
+#endif
+					SetSliderPosition();												
+												
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					InvalidateGadget(_R(IDC_REDRAW_ME));
 				}
 				break;	//DIM_SLIDER_POS_CHANGING:
 			}
@@ -385,109 +383,96 @@
 			case DIM_LFT_BN_CLICKED :
 			{
 				// See which button was pressed
-				switch (Msg->GadgetID)
+				if (FALSE) {}
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_PLAY))
 				{
-					case _R(IDC_PREVIEW_PLAY) :
-						{
-							// Play the animation.
-							PreviewDlgPlay();
-							
-							// Force the gadget to be repainted, 
-							// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-							InvalidateGadget(_R(IDC_REDRAW_ME));
-							break;
-						}
+					// Play the animation.
+					PreviewDlgPlay();
+					
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					InvalidateGadget(_R(IDC_REDRAW_ME));
+				}
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_STOP))
+				{
+					// Stop the animation.
+					PreviewDlgStop();
 
-					case _R(IDC_PREVIEW_STOP) :
-						{
-							// Stop the animation.
-							PreviewDlgStop();
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					InvalidateGadget(_R(IDC_REDRAW_ME));
+				}
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_NEXTFRAME))
+				{
+					//  While the animation is playing, if this button is selected,
+					//	the play button is clicked out, the stop button is clicked in,
+					//	and the next frame in the animation is displayed. 
+					PreviewNextFrame();
+											
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					InvalidateGadget(_R(IDC_REDRAW_ME));
 
-							// Force the gadget to be repainted, 
-							// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-							InvalidateGadget(_R(IDC_REDRAW_ME));
-							break;
-						}
+					// Only show one frame at a time, therefore set this flag back to false. 
+					m_DisplayNextFrame = FALSE;
+				}
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_PREVFRAME))
+				{
+					// While the animation is playing, if this button is selected,
+					// the play button is clicked out, the stop button is clicked in,
+					// and the previous frame in the animation is displayed. 
+					PreviewPreviousFrame();
+					
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					InvalidateGadget(_R(IDC_REDRAW_ME));
 
-					case _R(IDC_PREVIEW_NEXTFRAME) :
-						{
-							//  While the animation is playing, if this button is selected,
-							//	the play button is clicked out, the stop button is clicked in,
-							//	and the next frame in the animation is displayed. 
-							PreviewNextFrame();
-													
-							// Force the gadget to be repainted, 
-							// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-							InvalidateGadget(_R(IDC_REDRAW_ME));
+					// Only show one frame at a time, therefore, set this flag to false. 
+					m_DisplayPreviousFrame = FALSE;
+				}
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_REFRESH))
+				{
+					// Has the refresh button been clicked, while the dlg is in an idle state.
+					if (m_SetPreviewDlgToIdleState)
+						SetDlgStateAfterDocChange();
+					else
+						SetDlgStateAfterRefresh();								
+				}
+				/*
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_STARTFRAME))
+				{
+					m_DisplayListOfBitmaps = TRUE;
 
-							// Only show one frame at a time, therefore set this flag back to false. 
-							m_DisplayNextFrame = FALSE;
+					// Find the first frame in our list.
+					m_pPreviewDialog->SelectFirstBitmap();
 
-							break;
-						}
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
+					m_DisplayListOfBitmaps = FALSE;
 
-					case _R(IDC_PREVIEW_PREVFRAME) :
-						{
-							// While the animation is playing, if this button is selected,
-							// the play button is clicked out, the stop button is clicked in,
-							// and the previous frame in the animation is displayed. 
-							PreviewPreviousFrame();
-							
-							// Force the gadget to be repainted, 
-							// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-							InvalidateGadget(_R(IDC_REDRAW_ME));
+					break;
+				}*/
 
-							// Only show one frame at a time, therefore, set this flag to false. 
-							m_DisplayPreviousFrame = FALSE;
-							break;
-						}
+				/*
+				else if (Msg->GadgetID == _R(IDC_PREVIEW_ENDFRAME))
+				{
+					m_DisplayListOfBitmaps = TRUE;
+					// Find the first frame in our list.
+					SelectLastBitmap();
 
-					case _R(IDC_PREVIEW_REFRESH) :
-						{
-							// Has the refresh button been clicked, while the dlg is in an idle state.
-							if (m_SetPreviewDlgToIdleState)
-								SetDlgStateAfterDocChange();
-							else
-								SetDlgStateAfterRefresh();								
-						}
-						break;
-
-					/* case _R(IDC_PREVIEW_STARTFRAME) :
-					{
-							m_DisplayListOfBitmaps = TRUE;
-
-							// Find the first frame in our list.
-							m_pPreviewDialog->SelectFirstBitmap();
-
-							// Force the gadget to be repainted, 
-							// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-							m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
-							m_DisplayListOfBitmaps = FALSE;
-
-							break;
-						
-						}*/
-
-					/* case _R(IDC_PREVIEW_ENDFRAME) :
-						{
-						m_DisplayListOfBitmaps = TRUE;
-						// Find the first frame in our list.
-						SelectLastBitmap();
-
-						// Force the gadget to be repainted, 
-						// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
-						m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
-						m_DisplayListOfBitmaps = FALSE;
-					}
-					{
-						BOOL Valid = FALSE;
-						BOOL State = GetLongGadgetValue(Msg->GadgetID, 0, 1, NULL, &Valid);
-						//if (State)
-						//	SetLongGadgetValue(Msg->GadgetID, !State);
-						break;
-					} */
+					// Force the gadget to be repainted, 
+					// causes a DIM_REDRAW\_R(IDC_REDRAW_ME) message to be sent.
+					m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
+					m_DisplayListOfBitmaps = FALSE;
 				}
-				break;
+				{
+					BOOL Valid = FALSE;
+					BOOL State = GetLongGadgetValue(Msg->GadgetID, 0, 1, NULL, &Valid);
+					//if (State)
+					//	SetLongGadgetValue(Msg->GadgetID, !State);
+					break;
+				} */
 			}
 
 			case DIM_REDRAW :
@@ -495,30 +480,24 @@
 				// This is where all the redrawing is done
 				// Which control in the window is sending the redraw message (if there are many
 				// grdraw controls you can tell which is which from the Gadget ID
-				switch (Msg->GadgetID)
+				if (Msg->GadgetID == _R(IDC_REDRAW_ME))
 				{
-					// Draw the redraw_me control in here
-					case _R(IDC_REDRAW_ME) :
-					{
-						if(m_SetPreviewDlgToIdleState)
-							// Set the Preview dialog to an idle state.
-							SetPreviewDialogToIdleState((ReDrawInfoType*) Msg->DlgMsgParam);
-						else
-							// Render this control.
-							RenderControl((ReDrawInfoType*) Msg->DlgMsgParam);												
-					}
-					break;
-
-					// there are no other controls that should get a redraw message ever
-					default :
-					{
-						// give out an error in debug builds, ignore in retail builds
-						ERROR3("Got a redraw message for a control I don't know about");
-						break;
-					}
+					if(m_SetPreviewDlgToIdleState)
+						// Set the Preview dialog to an idle state.
+						SetPreviewDialogToIdleState((ReDrawInfoType*) Msg->DlgMsgParam);
+					else
+						// Render this control.
+						RenderControl((ReDrawInfoType*) Msg->DlgMsgParam);												
 				}
+				else
+				{
+					// give out an error in debug builds, ignore in retail builds
+					ERROR3("Got a redraw message for a control I don't know about");
+				}
 				break;
 			}	
+			default:
+				break;
 		}
 	}
 	else if (MESSAGE_IS_A(Message, DocChangingMsg))
@@ -526,7 +505,7 @@
 		DocChangingMsg *Msg = (DocChangingMsg *) Message;
 		switch (Msg->State)
 		{
-			case DocChangingMsg::DocState::ABOUTTODIE:
+			case DocChangingMsg::ABOUTTODIE:
 			/*{
 				if (Msg->pOldDoc == NULL)
 				{
@@ -545,8 +524,8 @@
 				}
 				break;
 			}*/
-			case DocChangingMsg::DocState::SELCHANGED:
-			case DocChangingMsg::DocState::BORN:
+			case DocChangingMsg::SELCHANGED:
+			case DocChangingMsg::BORN:
 			/*{
 				// called when new is used,thereafter called when no docs. are around.
 				if (Msg->pNewDoc == NULL)
@@ -565,21 +544,26 @@
 			}*/
 				EndDialog = TRUE;
 			break;
+
+			default:
+				break;
 		}
 	}
 
-	// Allow the base class access to the message, it will do the
-	// DLG_EAT_IF_HUNGRY(Msg) for us
-	// Must do this before the Close and End
-	Result = DialogOp::Message(Message);
-
 	// End dialog here
 	if (EndDialog) 
 	{
 		Close();				// Hide the dialog box
 		End();					// Finish the operation
+		return OK;
 	}
 
+	// Allow the base class access to the message, it will do the
+	// DLG_EAT_IF_HUNGRY(Msg) for us
+	// Must do this before the Close and End
+	Result = DialogOp::Message(Message);
+
+
 	// The message was for our dialog box so return that we have handled it, if necessary
 	//return (DLG_EAT_IF_HUNGRY(Msg)); 
 	return Result;
@@ -661,12 +645,12 @@
 	
 	// Set up the bitmaps for the play controls
 	// Uses the title defined in the rc file so do not specify any bitmaps
-	SetGadgetBitmaps(_R(IDC_PREVIEW_PLAY), NULL, NULL);
-	SetGadgetBitmaps(_R(IDC_PREVIEW_STOP), NULL, NULL);
-	SetGadgetBitmaps(_R(IDC_PREVIEW_NEXTFRAME), NULL, NULL);
-	SetGadgetBitmaps(_R(IDC_PREVIEW_PREVFRAME), NULL, NULL);
-	SetGadgetBitmaps(_R(IDC_PREVIEW_STARTFRAME), NULL, NULL);
-	SetGadgetBitmaps(_R(IDC_PREVIEW_ENDFRAME), NULL, NULL);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_PLAY), 0, 0);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_STOP), 0, 0);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_NEXTFRAME), 0, 0);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_PREVFRAME), 0, 0);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_STARTFRAME), 0, 0);
+	SetGadgetBitmaps(_R(IDC_PREVIEW_ENDFRAME), 0, 0);
 
 	// Reset the loop count that we are currently on
 	m_CurrentLoopCount = 0;
@@ -687,7 +671,7 @@
 
 			// change the name field from saying "Frame:" to "Image:"
 			String_32 Name(_R(IDS_PREVIEW_FRAMENAMETYPESTR));
-			SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAMETYPE), &Name);
+			SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAMETYPE), Name);
 		}
 		else
 		{
@@ -723,7 +707,7 @@
 
 			// change the name field from saying "Frame:" to "Image:"
 			String_32 Name(_R(IDS_PREVIEW_FRAMENAMETYPESTR));
-			SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAMETYPE), &Name);
+			SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAMETYPE), Name);
 		}
 		else
 		{
@@ -758,7 +742,7 @@
 
 	// Set up the frame/layer name control
 	String_32 BlankName(TEXT(""));
-	SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), &BlankName);
+	SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), BlankName);
 
 	return TRUE;
 }
@@ -899,7 +883,7 @@
 
 	// Set up the frame/layer name control
 	String_32 BlankName(TEXT(""));
-	SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), &BlankName);
+	SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), BlankName);
 
 	return TRUE;
 }
@@ -1101,7 +1085,7 @@
 				m_pRender->SetFillColour(COLOUR_WHITE); 
 				m_pRender->DrawRect(&VirtualSize);
 
-				INT32 ThisIndex = m_CurrentItem;
+//				INT32 ThisIndex = m_CurrentItem;
 				INT32 StartIndex = m_CurrentItem;
 				BOOL StartFrameFound = FALSE;
 				// First, search out the first frame to redraw
@@ -1518,7 +1502,7 @@
 
 		// Set up the frame/layer name control to be the bitmap name
 		String_256 Name = pBitmapToUse->GetName();
-		SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), &Name);
+		SetStringGadgetValue(_R(IDC_PREVIEW_FRAMENAME), Name);
 	}
 
 	return pBitmapToUse;
@@ -1539,7 +1523,7 @@
 void PreviewDialog::IncrementCurrentBitmap()
 {
 	// Local flag to test whether to increment the slider position.
-	BOOL SliderPositionReset = FALSE;
+//	BOOL SliderPositionReset = FALSE;
 
 	// Increment the Bitmap if the user has clicked either Play or NextFrame.
 	if (m_PlayAnimation || m_DisplayNextFrame )
@@ -1653,7 +1637,7 @@
 void PreviewDialog::DecrementCurrentBitmap()
 {
 	//  Local flag to test whether to increment the slider position.
-	BOOL SliderPositionReset = FALSE;
+//	BOOL SliderPositionReset = FALSE;
 
 	//  Decrement the bitmap if the user has eitther clicked Play or Previous frame.
 	if(m_PlayAnimation || m_DisplayPreviousFrame)
@@ -1838,6 +1822,8 @@
 		}
 	}
 
+PORTNOTE("other", "Removed GIFAnimationExportParam")
+#ifndef EXCLUDE_FROM_XARALX
 	// Work out the bounding box of the animation and the loop count
 	if (pParam->IS_KIND_OF(GIFAnimationExportParam))
 	{
@@ -1849,6 +1835,7 @@
 		m_RequiredLoopCount = pGIFParam->GetAnimLoop();
 	}
 	else
+#endif
 	{
 		// Look through all the bitmaps to find the biggest size
 		// But we have already done this above, so use it
@@ -2056,8 +2043,8 @@
 		m_pRender = NULL;
 	}
 	
-	// Get the handle of the dialog box. This is really an HWND.
-	CWindowID hWnd = GetReadWriteWindowID();
+	// Get the handle of the dialog box. This is really an CWindowID.
+//	CWindowID hWnd = GetReadWriteWindowID();
 
 	RECT RedrawRect;
 	if (!GetGadgetPosition(_R(IDC_REDRAW_ME), &RedrawRect))
@@ -2154,7 +2141,7 @@
 {
 	// set the delay for the first bitmap that we are going to display
 	m_Delay = GetDelayForCurrentBitmap();
-	return m_Timer.Start(m_Delay * 10, TimerProc, FALSE);
+	return m_Timer.Start(m_Delay * 10, TRUE);
 }
 
 
@@ -2170,37 +2157,34 @@
 				frame.
 *******************************************************************************************/
 
-BOOL PreviewDialog::TimerProc(HiResTimer* pThisTimer, INT32 nElapsed, void* /* pvData */)
+void PreviewDialog::OnTimer()
 {
 	if (m_pPreviewDialog != NULL)
 	{
-		TRACEUSER( "JustinF", _T("%ld msec elapsed
"), (INT32) nElapsed);
-
 		// Stop the animation if the properties are changed or the document is closd.
-		if(m_AnimationPropertiesChanged || m_pPreviewDialog->m_DocumentAboutToDie)
+		if(m_AnimationPropertiesChanged || m_DocumentAboutToDie)
 		{
 			// Stop any pending timer events.
-			if (pThisTimer->IsRunning())
-				pThisTimer->Stop();
-			return TRUE;
+			if (m_Timer.IsRunning())
+				m_Timer.Stop();
+			return;
 		}
 	
 		// Move to the next bitmap in the list
-		m_pPreviewDialog->IncrementCurrentBitmap();
+		IncrementCurrentBitmap();
 
 		// Force the gadget to be repainted
-		m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
-		m_pPreviewDialog->PaintGadgetNow(_R(IDC_REDRAW_ME));
+		InvalidateGadget(_R(IDC_REDRAW_ME));
+		PaintGadgetNow(_R(IDC_REDRAW_ME));
 
 		// Get the delay until we need to show the next frame
-		m_Delay = m_pPreviewDialog->GetDelayForCurrentBitmap();
+		m_Delay = GetDelayForCurrentBitmap();
 
 		// Reset the timer.
-		pThisTimer->Start(m_Delay * 10, TimerProc, FALSE);
+		m_Timer.Start(m_Delay * 10, FALSE);
 	}
 
-	// Please continue to send events to us.
-	return TRUE;
+	return;
 }
 
 
@@ -2236,14 +2220,16 @@
 ********************************************************************************************/
 void PreviewDialog::UpdateBubbleHelp(void)
 {
+PORTNOTE("other", "Disabled PreviewDialog bubble help")
+#ifndef EXCLUDE_FROM_XARALX
 	PreviewDialog *pPrvDlg = m_pPreviewDialog;
 	if (pPrvDlg == NULL)
 		return;
 
-	static HWND TheWindow = NULL;
+	static CWindowID TheWindow = NULL;
 	
 	if (TheWindow == NULL)
-		TheWindow = (HWND)pPrvDlg->WindowID;
+		TheWindow = (CWindowID)pPrvDlg->WindowID;
 
 	if (TheWindow == NULL)
 		return;
@@ -2257,7 +2243,7 @@
 		LastUpdate.Sample();
 
 		// Default to the mouse being "nowhere special" again
-		TheWindow = (HWND)pPrvDlg->WindowID;
+		TheWindow = (CWindowID)pPrvDlg->WindowID;
 		MousePos = NULL;
 
 		POINT MouseScreenPos;
@@ -2265,7 +2251,7 @@
 		{
 			// Only continue processing if the window under the pointer is the Preview Dialog
 			
-			HWND WindowUnder = ::WindowFromPoint(MouseScreenPos);
+			CWindowID WindowUnder = ::WindowFromPoint(MouseScreenPos);
 
 			if (WindowUnder != NULL &&
 				(WindowUnder == TheWindow || ::GetParent(WindowUnder) == TheWindow))
@@ -2278,14 +2264,14 @@
 				::ScreenToClient(TheWindow, &TempPos);
 
 				CPoint Pos(TempPos);
-				HWND WindowUnderPointer = ::ChildWindowFromPoint(TheWindow, Pos);
+				CWindowID WindowUnderPointer = ::ChildWindowFromPoint(TheWindow, Pos);
 				if (WindowUnderPointer != NULL)// && IsWindowVisible(WindowUnderPointer))
 				{
 					// Make sure that hidden windows do not provide status help!
 					INT32 WindowStyle = ::GetWindowLong(WindowUnderPointer, GWL_STYLE);
 					if ((WindowStyle & WS_VISIBLE) != 0)
 					{
-						HWND hGadget;
+						CWindowID hGadget;
 						INT32 i = 0;
 						while (BubbleHelp[i].Gadget != NULL && MousePos == NULL)
 						{
@@ -2308,11 +2294,12 @@
 		// Set up our callback handler to show the bubble help. 
 		ControlHelper::DoBubbleHelpOn(TheWindow, MousePos, PreviewDialog::HelpCallbackHandler, NULL);
 	}
+#endif
 }
 
 /********************************************************************************************
 
->	TCHAR* PreviewDialog::HelpCallbackHandler(HWND Window, UINT32 Item, void *UserData)
+>	TCHAR* PreviewDialog::HelpCallbackHandler(CWindowID Window, UINT32 Item, void *UserData)
 
 	Author:		Ranbir_Rana (Xara Group Ltd) <camelotdev@xxxxxxxx> (Based onn Jason code)
 	Created:	21/05/97
@@ -2324,7 +2311,7 @@
 	
 ********************************************************************************************/
 
-TCHAR *PreviewDialog::HelpCallbackHandler(HWND Window, UINT32 Item, void *UserData)
+TCHAR *PreviewDialog::HelpCallbackHandler(CWindowID Window, UINT32 Item, void *UserData)
 {
 	static String_256 HelpStringStore;
 	BOOL ReturnVal = FALSE;
@@ -2333,33 +2320,31 @@
 	if (pPreviewDlg == NULL)
 		return(NULL);
 
-	switch (Item)
+	if (Item == _R(IDC_PREVIEW_PLAY))
 	{
-		case _R(IDC_PREVIEW_PLAY):
-			HelpStringStore = String_256(_R(IDS_PREVIEWBH_PLAY));
-			ReturnVal = TRUE;
-		break;
-			
-		case _R(IDC_PREVIEW_STOP):		 	     
-			HelpStringStore = String_256(_R(IDS_PREVIEWBH_STOP));
-			ReturnVal = TRUE;
-		break;
-
-		case _R(IDC_PREVIEW_NEXTFRAME):		 	     
-			HelpStringStore = String_256(_R(IDS_PREVIEWBH_NEXTFRAME));
-			ReturnVal = TRUE;
-		break;
-			
-		case _R(IDC_PREVIEW_PREVFRAME):
-			HelpStringStore = String_256(_R(IDS_PREVIEWBH_PREVFRAME));
-			ReturnVal = TRUE;
-		break;	
-
-		case _R(IDC_PREVIEW_SLIDER):
-			HelpStringStore = String_256(_R(IDS_PREVIEWBH_SLIDER));
-			ReturnVal = TRUE;
-		break;	
+		HelpStringStore = String_256(_R(IDS_PREVIEWBH_PLAY));
+		ReturnVal = TRUE;
 	}
+	else if (Item == _R(IDC_PREVIEW_STOP))
+	{
+		HelpStringStore = String_256(_R(IDS_PREVIEWBH_STOP));
+		ReturnVal = TRUE;
+	}
+	else if (Item == _R(IDC_PREVIEW_NEXTFRAME))
+	{
+		HelpStringStore = String_256(_R(IDS_PREVIEWBH_NEXTFRAME));
+		ReturnVal = TRUE;
+	}
+	else if (Item == _R(IDC_PREVIEW_PREVFRAME))
+	{
+		HelpStringStore = String_256(_R(IDS_PREVIEWBH_PREVFRAME));
+		ReturnVal = TRUE;
+	}
+	else if (Item == _R(IDC_PREVIEW_SLIDER))
+	{
+		HelpStringStore = String_256(_R(IDS_PREVIEWBH_SLIDER));
+		ReturnVal = TRUE;
+	}
 
 	if (ReturnVal)
 		return((TCHAR *) HelpStringStore);
@@ -2383,6 +2368,8 @@
 
 BOOL PreviewDialog::GetStatusLineText(String_256 *Result)
 {
+PORTNOTE("other", "Disabled bitmap preview dialog live status text")
+#ifndef EXCLUDE_FROM_XARALX
 	ERROR3IF(Result == NULL, "Illegal NULL param");
 		
 	PreviewDialog* pPreviewDlg = m_pPreviewDialog;
@@ -2391,7 +2378,7 @@
 		return(FALSE);
 
 	// Find the main editor window
-	HWND TheWindow = (HWND)pPreviewDlg->WindowID;
+	CWindowID TheWindow = (CWindowID)pPreviewDlg->WindowID;
 	if (TheWindow == NULL)
 		return(FALSE);
 
@@ -2403,9 +2390,9 @@
 	// Convert to client coords in the main window
 	ScreenToClient(TheWindow, &TempPos);
 
-	// See if this is over the main window or any child, get it's HWND
+	// See if this is over the main window or any child, get it's CWindowID
 	CPoint Pos(TempPos);	
-	HWND WindowUnderPointer = ::ChildWindowFromPoint(TheWindow, Pos);
+	CWindowID WindowUnderPointer = ::ChildWindowFromPoint(TheWindow, Pos);
 	if (WindowUnderPointer == NULL)
 		return(FALSE);
 
@@ -2419,7 +2406,7 @@
 		return(GetStatusLineText(pPreviewDlg, 0, Result));
 
 	// Otherwise, see if we can find help for the specific gadget
-	HWND hGadget;
+	CWindowID hGadget;
 	INT32 i = 0;
 	while (BubbleHelp[i].Gadget != NULL)
 	{
@@ -2429,6 +2416,9 @@
 		i++;
 	}
 	return FALSE;
+#else
+	return TRUE;
+#endif
 }
 
 /************************************************************************************************
@@ -2447,24 +2437,22 @@
 
 BOOL PreviewDialog::GetStatusLineText(PreviewDialog *pPrvDlg, UINT32 GadgetID,String_256 *Result)
 {
-	switch (GadgetID)
+	if (GadgetID == _R(IDC_PREVIEW_PLAY))
 	{
-		case _R(IDC_PREVIEW_PLAY):
-			*Result = String_256(_R(IDS_PREVIEWST_PLAY));
-			break;
-
-		case _R(IDC_PREVIEW_STOP):
-			*Result = String_256(_R(IDS_PREVIEWST_STOP));
-			break;
-
-		case _R(IDC_PREVIEW_NEXTFRAME):
-			*Result = String_256(_R(IDS_PREVIEW_NEXTFRAME));
-			break;
-
-		case _R(IDC_PREVIEW_PREVFRAME):
-			*Result = String_256(_R(IDS_PREVIEW_PREVFRAME));
-			break;			
+		*Result = String_256(_R(IDS_PREVIEWST_PLAY));
 	}
+	else if (GadgetID == _R(IDC_PREVIEW_STOP))
+	{
+		*Result = String_256(_R(IDS_PREVIEWST_STOP));
+	}
+	else if (GadgetID == _R(IDC_PREVIEW_NEXTFRAME))
+	{
+		*Result = String_256(_R(IDS_PREVIEW_NEXTFRAME));
+	}
+	else if (GadgetID == _R(IDC_PREVIEW_PREVFRAME))
+	{
+		*Result = String_256(_R(IDS_PREVIEW_PREVFRAME));
+	}
 	return TRUE;
 }
 
@@ -2486,6 +2474,8 @@
 	// When in play mode, we should grab the entire animation
 	// If we were in stand by mode then grab the active frame.
 
+PORTNOTE("other", "Disabled BrowserPreviewOptions")
+#ifndef EXCLUDE_FROM_XARALX
 	// Return false if the document is empty.
 	String_256 ShadeReason;
 	OpState State = OpGrabAllFrames::GetState(&ShadeReason, NULL);
@@ -2499,6 +2489,7 @@
 		m_pPreviewDialog->InvalidateGadget(_R(IDC_REDRAW_ME));
 		return FALSE;			
 	}
+#endif
 	
 	// Temp flags to remember whether the animation was playing/How may layers existed
 	// before all the frames were regenerated.
@@ -2581,7 +2572,7 @@
 		if (pOpDesc != NULL)
 		{
 			OpParam Param;
-			Param.Param1 = (INT32)pLayerToRefresh;
+			Param.Param1 = (void *)pLayerToRefresh;
 			pOpDesc->Invoke(&Param);
 		}
 		else
Index: Trunk/XaraLX/Kernel/dialogop.h
===================================================================
--- Trunk/XaraLX/Kernel/dialogop.h	(revision 958)
+++ Trunk/XaraLX/Kernel/dialogop.h	(revision 959)
@@ -499,9 +499,13 @@
 
 	// Get and set the position of a window or a gadget
 	BOOL GetWindowPosition( wxRect *pRect );
+	BOOL GetWindowPosition( RECT *pRect );
 	BOOL GetGadgetPosition( CGadgetID Gadget, wxRect *pRect );
+	BOOL GetGadgetPosition( CGadgetID Gadget, RECT *pRect );
 	BOOL SetWindowPosition( const wxRect &Rect);
+	BOOL SetWindowPosition( const RECT &Rect);
 	BOOL SetGadgetPosition( CGadgetID Gadget, const wxRect &Rect );
+	BOOL SetGadgetPosition( CGadgetID Gadget, const RECT &Rect );
 
 	INT32 GetScreenDpi();
 	BOOL GetScreenSize(INT32 * pWidth, INT32 * pHeight);
Index: Trunk/XaraLX/Kernel/aprps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/aprps.cpp	(revision 958)
+++ Trunk/XaraLX/Kernel/aprps.cpp	(revision 959)
@@ -368,11 +368,11 @@
 
 		switch ( TheMsg->State )
 		{
-			case DocChangingMsg::DocState::SELCHANGED:
+			case DocChangingMsg::SELCHANGED:
 			{
 				// In different cases we use different document pointers.
 				Document *pDocument = NULL;
-				if (TheMsg->State == DocChangingMsg::DocState::TITLECHANGED)
+				if (TheMsg->State == DocChangingMsg::TITLECHANGED)
 				{
 					// Document title has changed message.
 					pDocument = TheMsg->pChangingDoc;
@@ -429,7 +429,7 @@
 			break;
 			
 			// This message is sent when a new or just opened document is stable.
-			case DocChangingMsg::DocState::BORNANDSTABLE:
+			case DocChangingMsg::BORNANDSTABLE:
 			{
 				// Get the changing document pointer.
 				Document *pDocument = NULL;
@@ -456,6 +456,9 @@
 				}
 			}
 			break;
+
+			default:
+				break;
 		}
 	}
 
@@ -466,7 +469,7 @@
 
 		switch ( TheMsg->State )
 		{
-			case DocViewMsg::DocViewState::SELCHANGED:
+			case DocViewMsg::SELCHANGED:
 			{
 				if (TheMsg->pNewDocView != NULL)
 				{
@@ -491,6 +494,9 @@
 				}
 			}
 			break;
+
+			default:
+				break;
 		}
 	}
 
@@ -502,7 +508,7 @@
 		switch ( TheMsg->Reason )
 		{
 			// The selected spread has changed
-			case SpreadMsg::SpreadReason::SELCHANGED:
+			case SpreadMsg::SELCHANGED:
 			{
 				if (TheMsg->pNewSpread != NULL)
 				{
@@ -528,7 +534,7 @@
 			}
 			break;
 
-			case SpreadMsg::SpreadReason::ANIMATIONPROPERTIESCHANGED:
+			case SpreadMsg::ANIMATIONPROPERTIESCHANGED:
 			{
 				GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
 
@@ -545,6 +551,9 @@
 					}
 			}
 			break;
+
+			default:
+				break;
  		}
 	}
 
@@ -556,7 +565,7 @@
 		switch ( TheMsg->Reason )
 		{
 			// The active layer has changed.
-			case LayerMsg::LayerReason::ACTIVE_LAYER_CHANGED:
+			case LayerMsg::ACTIVE_LAYER_CHANGED:
 			{
 				if (TheMsg->pNewLayer != NULL)
 				{
@@ -564,7 +573,7 @@
 					m_pGIFAnimationProperties->SetActiveLayer(TheMsg->pNewLayer);
 
 					// While Loop flag.
-					BOOL FoundPage = FALSE;
+//					BOOL FoundPage = FALSE;
 
 					GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
 
@@ -594,7 +603,7 @@
 			break;
 
 			// The active layer has been updated.
-			case LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER:
+			case LayerMsg::UPDATE_ACTIVE_LAYER:
 			{
 				// While Loop flag.
 				BOOL FoundPage = FALSE;
@@ -624,8 +633,11 @@
 					}
 					// Get the next option's tab.
 					pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
-				}				
+				}
+				break;
 			}
+			default:
+				break;
 		}
 	}
 
@@ -636,7 +648,7 @@
 
 		switch ( TheMsg->State )
 		{
-			case BrowserPrvwChgdMsg::BrowserPrvwPropState::PROPERTIES_CHANGED:
+			case BrowserPrvwChgdMsg::PROPERTIES_CHANGED:
 			{
 				// The properties have changed, so update the Browser preview tab.
 
@@ -668,8 +680,10 @@
 					// Get the next option's tab.
 					pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
 				}
-			
+				break;
 			}
+			default:
+				break;
 		}
 	}
 
@@ -683,7 +697,7 @@
 		// Main handler for dialog type messages
 		BOOL EndDialog = FALSE;											// TRUE if we should quit the dialog
 		BOOL CommitValues = FALSE;										// TRUE if we should commit the dialog values
-		BOOL OldApplyNow = m_pGIFAnimationProperties->GetApplyNowState();	// Old ApplyNow button state  
+		/*BOOL OldApplyNow =*/ m_pGIFAnimationProperties->GetApplyNowState();	// Old ApplyNow button state  
 
 		// Make sure that the tabs know what is the current document and spread to work on.
 		Document *pDocument = Document::GetSelected();
@@ -759,6 +773,9 @@
 					EndDialog = TRUE;
 				}
 				break;
+
+				default:
+					break;
 				}
 			}
 
@@ -778,15 +795,14 @@
 		// End dialog here
 		if (EndDialog) 
 		{
-			Close();		
-			End();			
-
+			// We can only look at static variables here
 			// Remove the link to the options tabs if all dialogs have been cloosed. 
 			if(m_pGIFAnimationProperties->GetCount() < 1)
 			{
 				// Make sure that we remove our options tabs link to the dialog box class as the dialog will now be destroyed.
 				m_pGIFAnimationProperties->SetTabbedDlg(NULL);
 			}
+			return OK;
 		}
 		
 		// Check if we have been sending an init/create message, if so then set the flag False.
@@ -1023,7 +1039,7 @@
 	
 ********************************************************************************************/
 
-GIFAnimationPropertyTabs::Init()
+BOOL GIFAnimationPropertyTabs::Init()
 {
 	// Do nothing for now.
 	return TRUE;
@@ -1118,14 +1134,14 @@
 	
 ********************************************************************************************/
 
-BOOL GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs()
+void GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs()
 {
-	GIFAnimationPropertyTabs *pGIFAnimationProperty = NULL;
+//	GIFAnimationPropertyTabs *pGIFAnimationProperty = NULL;
 
 	// Remove all the Tabs.
 	GIFAnimationPropertyTabsList.DeleteAll();
 
-	return TRUE;
+	return;
 }
 
 /********************************************************************************************
@@ -1316,7 +1332,7 @@
 
 CDlgResID GIFAnimationPropertyTabs::GetPageID()
 {
-	return NULL;
+	return 0;
 }
 
 /******************************************************************************************
@@ -1665,9 +1681,11 @@
 		// Find out whether we're transparent or not.
 		Transparency = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_FRAME_TRANSPARENCY));
 
+PORTNOTE("other", "Remove FrameSGallery");
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// Set the new animation colour prefterences in the spread.
 		pSpread->SetAnimationColours( Dither, WebPal, PalCols, CurNumColsInPal, Transparency);
 
@@ -2123,6 +2141,9 @@
 			}
 		}
 		break;
+
+		default:
+			break;
 	}
 	return TRUE;
 }  
@@ -2495,9 +2516,11 @@
 		if(Loop_Continously)
 			Loop = 0;
 
+PORTNOTE("other", "Remove FrameSGallery");
+#ifndef EXCLUDE_FROM_XARALX
 		// Check that all visible layers are actually frame layers.
 		FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 		// Pass the new loop value to the spread.
 		pSpread->SetAnimationLoop(Loop);
 
@@ -2548,7 +2571,7 @@
 				!pLayer->IsPageBackground())
 			{
 				// Tell the frame gallery to update its display of the frame
-				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 			}
 
 			// Move to the next frame layer in the animation
@@ -2559,7 +2582,7 @@
 		pLayer = pSpread->FindActiveLayer();
 
 		// Boradcast the message.
-		BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));			
+		BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));			
 
 		//The new delay entry is valid.
 		PropertiesChanged = TRUE;
@@ -2861,9 +2884,11 @@
 					Layer* pLayer = pSpread->FindFirstFrameLayer();
 					if (pLayer)
 					{
+PORTNOTE("other", "Remove FrameSGallery");
+#ifndef EXCLUDE_FROM_XARALX
 						// Check that all visible layers are actually frame layers
 						FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
-
+#endif
 						// Get the delay value for the frame layer.
 						DWORD GlobalDelay = pLayer->GetFrameDelay();
 
@@ -3034,6 +3059,9 @@
 			}
 		}
 		break;
+
+		default:
+			break;
 	}	
 	return TRUE;
 }  
@@ -3107,7 +3135,7 @@
 	if (!ok)
 		return TRUE;
 
-	BOOL UseLocalFrameDelayValues = FALSE;	// Flag to determine whether local frame delay values are being used.
+//	BOOL UseLocalFrameDelayValues = FALSE;	// Flag to determine whether local frame delay values are being used.
 	UINT32 CurrentDelay = 0;					//Current delay setting in the animation properties tab. 
 
 	// Retrieve the details stored in the current spread.
@@ -3123,7 +3151,7 @@
 		
 	// If "Many" is displayed in the "Delay for" edit field, then we do not want to read the value.
 	String_256 StrDelay = pPropertiesDlg->GetStringGadgetValue(_R(IDC_ANIMTAB_DELAY), NULL);
-	INT32 result = strnicmp(StrDelay, "Many", 4);
+	INT32 result = camStrnicmp(StrDelay, _T("Many"), 4);
 			
 	// Is 'Many' displayed in the delay edit field?
 	if(result == 0)
@@ -3405,7 +3433,7 @@
 
 #ifdef _DEBUG
 		// Tell the frame gallery to update its display of the frame
-		BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+		BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 #endif
 
 		// Get the OILBitmap Bitmap associated with this frame layer and set its delay value and Name details.
@@ -3421,17 +3449,17 @@
 		{
 			//if the frame layer delay values for this animation are no longer the same, force the animation properties tab to update itself.
 			if(!SameflDelayValues())
-				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 			else
 				AreDelayValuesSame = TRUE;
 
 			// Currently "Many" is displayed in the animation propertiess tab, but the frame propertiess tab delay
 			// values have changed to give all the frame layers the same delay value. Therfore, update the animation properties tab.
 			if(AreDelayValuesSame && m_IsManyDisplayed)
-				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 			
 			// Force a redraw of the frame gallery. Allows us to update frame layer Name/Delay details.
-			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 
 			return TRUE;
 		}
@@ -3443,17 +3471,17 @@
 
 			//if the frame layer delay values for this animation are no longer the same, force the animation properties tab to update itself.
 			if(!SameflDelayValues())
-				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 			else
 				AreDelayValuesSame = TRUE;
 
 			// Currently "Many" is displayed in the animation propertiess tab, but the frame propertiess tab delay
 			// values have changed to give all the frame layers the same delay value. Therfore, update the animation properties tab.
 			if(AreDelayValuesSame && m_IsManyDisplayed)
-				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+				BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 						
 			// Force a redraw of the frame gallery. Allows us to update frame layer Name/Delay details.
-			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 
 			return TRUE;
 		}
@@ -3464,6 +3492,8 @@
 		// Set the name in the OILBitmap.
 		pOILBitmap->SetName(FrameLayerName);
 
+PORTNOTE("other", "Disabled OpGrabFrame")
+#ifndef EXCLUDE_FROM_XARALX
 		if (PreviewDialog::GetPreviewDialog())
 		{
 			OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_FRAME_GRABFRAME); 
@@ -3475,21 +3505,22 @@
 				ERROR3("Couldn't find OPTOKEN_FRAME_GRABALLFRAMES op descriptor");
 			}
 		}
+#endif
 
 		//if the frame layer delay values for this animation are no longer the same, force the animation properties tab to update itself.
 		if(!SameflDelayValues())
-			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 		else
 			AreDelayValuesSame = TRUE;
 
 		// Currently "Many" is displayed in the animation propertiess tab, a change to the frame properties tab delay
 		// value has caused all the frame layers to have the same delay value. Therfore, update the animation properties tab.
 		if(AreDelayValuesSame && m_IsManyDisplayed)
-			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::UPDATE_ACTIVE_LAYER));
+			BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::UPDATE_ACTIVE_LAYER));
 	}
 
 	// Force a redraw of the frame gallery.
-	BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+	BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 
 	// Everything is OK!
 	return TRUE;
@@ -3693,7 +3724,7 @@
 
 	// Set the dialog detais
 	// Set the layer Layer Name.
-	pPropertiesDlg->SetStringGadgetValue(_R(IDC_FRAMETAB_NAME),	&pLayer->GetLayerID());
+	pPropertiesDlg->SetStringGadgetValue(_R(IDC_FRAMETAB_NAME),	pLayer->GetLayerID());
 
 	// Set the "Background" check box.
 	pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_FRAMETAB_SOLID), pLayer->IsSolid());
@@ -3905,43 +3936,39 @@
 
 		case DIM_LFT_BN_CLICKED:
 		{
-			switch (Msg->GadgetID)
+			if (FALSE) {}
+			else if (Msg->GadgetID ==_R(IDC_FRAMETAB_SOLID))
 			{
-				case _R(IDC_FRAMETAB_SOLID):
+				// If the "Background" check box is ticked, grey the "Overlay" check box.
+				BOOL Value = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_FRAMETAB_SOLID));
+				if (Value)
 				{
-					// If the "Background" check box is ticked, grey the "Overlay" check box.
-					BOOL Value = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_FRAMETAB_SOLID));
-					if (Value)
-					{
-						// Grey the 'Overlay' check box.
-						pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_OVERLAY), FALSE);
-					}
-					else
-					{
-						// Ungrey the 'Overlay' check box.
- 						pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_OVERLAY), TRUE);								
-					}
+					// Grey the 'Overlay' check box.
+					pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_OVERLAY), FALSE);
 				}
-				break;
-
-				case _R(IDC_FRAMETAB_SHOWFRAME):
+				else
 				{
-					// If the "Show frame" check box is ticked, grey the "Disaply this frame for" check box.
-					BOOL Value = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_FRAMETAB_SHOWFRAME));
+					// Ungrey the 'Overlay' check box.
+					pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_OVERLAY), TRUE);								
+				}
+			}
+			else if (Msg->GadgetID == _R(IDC_FRAMETAB_SHOWFRAME))
+			{
+				// If the "Show frame" check box is ticked, grey the "Disaply this frame for" check box.
+				BOOL Value = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_FRAMETAB_SHOWFRAME));
 
-					// Get a ptr to the active layer.
-					Layer* pLayer = pSpread->FindActiveLayer();
+				// Get a ptr to the active layer.
+				Layer* pLayer = pSpread->FindActiveLayer();
 
-					// Ensure we have a valid ptr.
-					if(!pLayer)
-						break;
-
+				// Ensure we have a valid ptr.
+				if( pLayer)
+				{
 					// The 'Show frame' check box is ticked.
 					if(Value)
 					{
 						// Ungrey the 'Delay this frame for' check box.
 						pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_DELAY), TRUE);
-
+	
 						// Pass this value onto the layer. This is necessary as when we force the frame gallery 
 						// to update itself, it takes the value stored in the layer. 
 						//pLayer->SetHiddenFrame(FALSE);
@@ -3950,17 +3977,16 @@
 					{
 						// Grey the 'Delay this frame for' check box.  
 						pPropertiesDlg->EnableGadget(_R(IDC_FRAMETAB_DELAY), FALSE);
-
+	
 						// Pass this value onto the layer. This is necessary as when we force the frame gallery 
 						// to update itself, it takes the value stored in the layer. 
 						//pLayer->SetHiddenFrame(TRUE);
 					}
-
+	
 					// Tell the frame gallery to update its display of the frame.
 					// We do this to update the right click pop-up menu.
-					BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::LayerReason::REDRAW_LAYER));
+					BROADCAST_TO_ALL(LayerMsg(pLayer, LayerMsg::REDRAW_LAYER));
 				}
-				break;
 			}
 			
 			// Set the correct state of the flag.
@@ -4021,6 +4047,9 @@
 			}			
 		}
 		break;
+
+		default:
+			break;
 	}
 	return TRUE;
 }  
@@ -4288,7 +4317,7 @@
 
 void AnimExOptns::Do( OpDescriptor * pOpDesc ) 
 {
-	BOOL ok = FALSE;
+//	BOOL ok = FALSE;
 
 	if (m_pGIFAnimationProperties == NULL)
 	{
@@ -4342,7 +4371,7 @@
 		// Main handler for dialog type messages
 		BOOL EndDialog = FALSE;											// TRUE if we should quit the dialog
 		BOOL CommitValues = FALSE;										// TRUE if we should commit the dialog values
-		BOOL OldApplyNow = m_pGIFAnimationProperties->GetApplyNowState();	// Old ApplyNow button state  
+		/*BOOL OldApplyNow =*/ m_pGIFAnimationProperties->GetApplyNowState();	// Old ApplyNow button state  
 
 		// Make sure that the tabs know what is the current document and spread to work on.
 		Document *pDocument = Document::GetSelected();
@@ -4397,8 +4426,11 @@
 				case DIM_CANCEL:		
 					EndDialog = TRUE;
 					break;
-				}
+
+				default:
+					break;
 			}
+		}
 
 		// Commit values here.
 		if (CommitValues)
@@ -4943,79 +4975,71 @@
 
 		case DIM_LFT_BN_CLICKED:
 		{
-			switch(Msg->GadgetID)
+			if (FALSE) {}
+			else if (Msg->GadgetID == _R(IDC_GIF_BITMAPPREVIEW))
 			{
-				case _R(IDC_GIF_BITMAPPREVIEW):
-				{
-					// A Click on the 'Browser Preview' button
+				// A Click on the 'Browser Preview' button
 
-					// The op cannot be invoked if the current doc. is empty.
-					// Return false if the document is empty.
-					String_256 ShadeReason;
-					OpState State = OpGrabAllFrames::GetState(&ShadeReason, NULL);
+PORTNOTE("other", "Disabled BrowserPreviewOptions")
+#ifndef EXCLUDE_FROM_XARALX
+				// The op cannot be invoked if the current doc. is empty.
+				// Return false if the document is empty.
+				String_256 ShadeReason;
+				OpState State = OpGrabAllFrames::GetState(&ShadeReason, NULL);
 
-					if (State.Greyed)
-					{
-						// The current doc, is empty, inform the user.
-						InformError(_R(IDS_NOFRAMESTOPREVIEW));
-					}
-					else
-					{
-						// Preview the animtion in the browser.
-						// Store the current browser options here.
-						BrowserPreviewOptions BrowserOptions;
-
-						// Get the browser options
-						GetBrowserValues(&BrowserOptions);  	
-
-						// Invoke the OP to preview the animation.
-						OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_FRAME_BROWSERPREVIEW); 
-
-						if (pOpDesc != NULL)
-						pOpDesc->Invoke();
-					}
+				if (State.Greyed)
+				{
+					// The current doc, is empty, inform the user.
+					InformError(_R(IDS_NOFRAMESTOPREVIEW));
 				}
-				break;
-
-				case _R(IDC_PLAINBKGND):
+				else
 				{
-					// Set the correct state of the applynow flag.
-					PreviewInBrowserTab::SetApplyNowState(TRUE);
+					// Preview the animtion in the browser.
+					// Store the current browser options here.
+					BrowserPreviewOptions BrowserOptions;
 
-					// Ungrey the apply/ok/cancel buttons.
-					PreviewInBrowserTab::UngreyApplyNow();
-				}
-				break;
+					// Get the browser options
+					GetBrowserValues(&BrowserOptions);  	
 
-				case _R(IDC_DOCBKGND):
-				{
-					// Set the correct state of the applynow flag.
-					PreviewInBrowserTab::SetApplyNowState(TRUE);
+					// Invoke the OP to preview the animation.
+					OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_FRAME_BROWSERPREVIEW); 
 
-					// Ungrey the apply/ok/cancel buttons.
-					PreviewInBrowserTab::UngreyApplyNow();
+					if (pOpDesc != NULL)
+					pOpDesc->Invoke();
 				}
-				break;
+#endif
+			}
+			else if (Msg->GadgetID == _R(IDC_PLAINBKGND))
+			{
+				// Set the correct state of the applynow flag.
+				PreviewInBrowserTab::SetApplyNowState(TRUE);
 
-				case _R(IDC_CHQBKGND):
-				{
-					// Set the correct state of the applynow flag.
-					PreviewInBrowserTab::SetApplyNowState(TRUE);
+				// Ungrey the apply/ok/cancel buttons.
+				PreviewInBrowserTab::UngreyApplyNow();
+			}
+			else if (Msg->GadgetID == _R(IDC_DOCBKGND))
+			{
+				// Set the correct state of the applynow flag.
+				PreviewInBrowserTab::SetApplyNowState(TRUE);
 
-					// Ungrey the apply/ok/cancel buttons.
-					PreviewInBrowserTab::UngreyApplyNow();
-				}
-				break;	
+				// Ungrey the apply/ok/cancel buttons.
+				PreviewInBrowserTab::UngreyApplyNow();
+			}
+			else if (Msg->GadgetID == _R(IDC_CHQBKGND))
+			{
+				// Set the correct state of the applynow flag.
+				PreviewInBrowserTab::SetApplyNowState(TRUE);
 
-				case _R(IDC_HTMLSTUB):
-				{
-					// Set the correct state of the applynow flag.
-					PreviewInBrowserTab::SetApplyNowState(TRUE);
+				// Ungrey the apply/ok/cancel buttons.
+				PreviewInBrowserTab::UngreyApplyNow();
+			}
+			else if (Msg->GadgetID == _R(IDC_GIF_BITMAPPREVIEW))
+			{
+				// Set the correct state of the applynow flag.
+				PreviewInBrowserTab::SetApplyNowState(TRUE);
 
-					// Ungrey the apply/ok/cancel buttons.
-					PreviewInBrowserTab::UngreyApplyNow();
-				}
-				break;
+				// Ungrey the apply/ok/cancel buttons.
+				PreviewInBrowserTab::UngreyApplyNow();
 			}
 		}
 		break;
@@ -5031,6 +5055,9 @@
 			}			
 		}			
 		break;
+
+		default:
+			break;
 	}
 	return TRUE;
 }  
@@ -5064,10 +5091,13 @@
 	CommitSection();
 
 	// Force the image map flag to false.
+PORTNOTE("other", "Disabled BrowserPreviewOptions")
+#ifndef EXCLUDE_FROM_XARALX
 	BOOL Imagemap = FALSE;
 
 	// Make a note of the options.
 	pBrowserOptions->Set(g_Background, g_InfoInHtmlStub, Imagemap);
+#endif
 
 	// Everything ok.
 	return TRUE;
@@ -5165,11 +5195,11 @@
 
 BOOL PreviewInBrowserTab::Declare()
 {
-	if (Camelot.DeclareSection("Browser Preview", 5))
+	if (Camelot.DeclareSection(_T("Browser Preview"), 5))
 	{
-		Camelot.DeclarePref( NULL, "BrowserBackground", (INT32*)&g_Background, 0, 3 );
-		Camelot.DeclarePref( NULL, "IncludeImageMap", &g_Imagemap, 0, 1 );
-		Camelot.DeclarePref( NULL, "IncludeInfoInHTMLStub", &g_InfoInHtmlStub, 0, 1 );
+		Camelot.DeclarePref( NULL, _T("BrowserBackground"), (INT32*)&g_Background, 0, 3 );
+		Camelot.DeclarePref( NULL, _T("IncludeImageMap"), &g_Imagemap, 0, 1 );
+		Camelot.DeclarePref( NULL, _T("IncludeInfoInHTMLStub"), &g_InfoInHtmlStub, 0, 1 );
 	}
 
 	// All ok
Index: Trunk/XaraLX/Scripts/rc2xml.pl
===================================================================
--- Trunk/XaraLX/Scripts/rc2xml.pl	(revision 958)
+++ Trunk/XaraLX/Scripts/rc2xml.pl	(revision 959)
@@ -958,7 +958,7 @@
     ReadOrs (\$token);
     $inputfile = $ii;
 
-    if ($token =~ /BS_AUTOCHECKBOX/)
+    if ($token =~ /(BS_AUTOCHECKBOX|BS_3STATE)/)
     {
 	ParseCheckBox($label, $varname);
     }
Index: Trunk/XaraLX/wxOil/ktimer.h
===================================================================
--- Trunk/XaraLX/wxOil/ktimer.h	(revision 958)
+++ Trunk/XaraLX/wxOil/ktimer.h	(revision 959)
@@ -160,7 +160,7 @@
 		class MyTimer : public KernelTimer
 		{
 		public:
-			MyTimer(MyClass * pOwner) : m_pOwner(pOwner);
+			MyTimer(MyClass * pOwner) : m_pOwner(pOwner) {}
 			virtual void Notify() {m_pOwner->OnTimer();}
 			MyClass * m_pOwner;
 		};
Index: Trunk/XaraLX/wxOil/dlgmgr.h
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.h	(revision 958)
+++ Trunk/XaraLX/wxOil/dlgmgr.h	(revision 959)
@@ -722,9 +722,13 @@
 
 	// Get and set the position of a window or a gadget
 	static BOOL GetWindowPosition(CWindowID WindowID, wxRect *pRect);
+	static BOOL GetWindowPosition(CWindowID WindowID, RECT *pRect);
 	static BOOL GetGadgetPosition(CWindowID WindowID, CGadgetID Gadget, wxRect *pRect);
+	static BOOL GetGadgetPosition(CWindowID WindowID, CGadgetID Gadget, RECT *pRect);
 	static BOOL SetWindowPosition(CWindowID WindowID, const wxRect &Rect);
+	static BOOL SetWindowPosition(CWindowID WindowID, const RECT &Rect);
 	static BOOL SetGadgetPosition(CWindowID WindowID, CGadgetID Gadget, const wxRect &Rect);
+	static BOOL SetGadgetPosition(CWindowID WindowID, CGadgetID Gadget, const RECT &Rect);
 
 	static INT32 GetScreenDpi();
 	static BOOL GetScreenSize(INT32 * pWidth, INT32 * pHeight);
Index: Trunk/XaraLX/wxOil/xrc/EN/bmpdlgr.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/bmpdlgr.xrc	(revision 958)
+++ Trunk/XaraLX/wxOil/xrc/EN/bmpdlgr.xrc	(revision 959)
@@ -88,7 +88,7 @@
 			 <pos>35,135d</pos> <size>29,8d</size>
 			<label>Restore:</label>
 		</object>
-		<object class="wxButton" name="IDC_BMP_ALWAYS_INTERPOLATE">
+		<object class="wxCheckBox" name="IDC_BMP_ALWAYS_INTERPOLATE">
 			 <pos>23,162d</pos> <size>108,10d</size>
 			<label>Smooth when scaled up</label>
 		</object>
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 958)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 959)
@@ -6469,20 +6469,18 @@
 
 BOOL DialogManager::GetWindowPosition( CWindowID WindowID, wxRect *pRect )
 {
-	PORTNOTETRACE("dialog","DialogManager::GetWindowPosition - do nothing");
-#ifndef EXCLUDE_FROM_XARALX
-	// Get the size and position of the specified window
-	WINDOWPLACEMENT Place;
-	Place.length = sizeof(WINDOWPLACEMENT);
-	// Call the Windows API
-	if (!GetWindowPlacement(WindowID, &Place))
-		return FALSE;
+	*pRect = wxRect(WindowID->GetPosition(), WindowID->GetSize());
+	return TRUE;
+}
 
-	// We just need to pass back the normal position of the window
-	if (pRect)
-		*pRect = Place.rcNormalPosition;
-#endif
-
+BOOL DialogManager::GetWindowPosition( CWindowID WindowID, RECT *pRect )
+{
+	wxRect Rect;
+	if (!GetWindowPosition(WindowID, &Rect)) return FALSE;
+	pRect->bottom=Rect.GetBottom();
+	pRect->top=Rect.GetTop();
+	pRect->left=Rect.GetLeft();
+	pRect->right=Rect.GetRight();
 	return TRUE;
 }
 
@@ -6513,6 +6511,17 @@
 	return TRUE;
 }
 
+BOOL DialogManager::GetGadgetPosition( CWindowID WindowID, CGadgetID Gadget, RECT *pRect )
+{
+	wxRect Rect;
+	if (!GetGadgetPosition(WindowID, Gadget, &Rect)) return FALSE;
+	pRect->bottom=Rect.GetBottom();
+	pRect->top=Rect.GetTop();
+	pRect->left=Rect.GetLeft();
+	pRect->right=Rect.GetRight();
+	return TRUE;
+}
+
 /********************************************************************************************
 
 >	static BOOL DialogManager::SetWindowPosition(CWindowID WindowID, const RECT& Rect)
@@ -6534,28 +6543,14 @@
 
 BOOL DialogManager::SetWindowPosition(CWindowID WindowID, const wxRect &Rect)
 {
-	PORTNOTETRACE("dialog","DialogManager::SetWindowPosition - do nothing");
-#ifndef EXCLUDE_FROM_XARALX
-	// First we need to get the current version of the structure we require
-	// to set the new position (See technical note as to why we do it this way)
-	WINDOWPLACEMENT Place;
-	Place.length = sizeof(WINDOWPLACEMENT);
-	if (GetWindowPlacement(WindowID, &Place))
-	{
-		// Make the surround for the redraw icon the required size
-		Place.length = sizeof(WINDOWPLACEMENT);
+	WindowID->SetPosition(Rect.GetTopLeft());
+	WindowID->SetSize(Rect.GetSize());
+	return TRUE;
+}
 
-		// We just need to set up the new normal position of the window using the
-		// rectangle that we have been given.
-		Place.rcNormalPosition = Rect;
-
-		// Call the Windows API to set the new position and return the result to the caller
-		return SetWindowPlacement(WindowID, &Place);
-	}
-#endif
-
-	// The get call failed so we cannot call the set
-	return FALSE;
+BOOL DialogManager::SetWindowPosition( CWindowID WindowID, const RECT &Rect )
+{
+	return SetWindowPosition( WindowID, wxRect(wxPoint(Rect.left, Rect.top), wxPoint(Rect.right, Rect.bottom)));
 }
 
 /********************************************************************************************
@@ -6582,6 +6577,11 @@
 	return TRUE;
 }
 
+BOOL DialogManager::SetGadgetPosition( CWindowID WindowID, CGadgetID Gadget, const RECT &Rect )
+{
+	return SetGadgetPosition( WindowID, Gadget, wxRect(wxPoint(Rect.left, Rect.top), wxPoint(Rect.right, Rect.bottom)));
+}
+
 /********************************************************************************************
 
 >	static INT32 DialogManager::GetScreenDpi()
Index: Trunk/XaraLX/wxOil/stdwx.h
===================================================================
--- Trunk/XaraLX/wxOil/stdwx.h	(revision 958)
+++ Trunk/XaraLX/wxOil/stdwx.h	(revision 959)
@@ -170,11 +170,14 @@
 #endif
 
 #if defined(__WXMSW__)
-// min and max macros
+// min and max macros - only MSW because they blow up some of the headers
 #define max(a,b)  (((a) > (b)) ? (a) : (b))
 #define min(a,b)  (((a) < (b)) ? (a) : (b))
 #endif
 
+#define camMax(a,b)  (((a) > (b)) ? (a) : (b))
+#define camMin(a,b)  (((a) < (b)) ? (a) : (b))
+
 // Defines and types moved from awindows.h
 
 #define nobreak


Xara