diff -pur src680-m147.orig/binfilter/bf_forms/source/component/Edit.hxx src680-m147/binfilter/bf_forms/source/component/Edit.hxx
--- src680-m147.orig/binfilter/bf_forms/source/component/Edit.hxx	2005-09-07 17:32:04.000000000 +0200
+++ src680-m147/binfilter/bf_forms/source/component/Edit.hxx	2005-12-28 13:31:26.000000000 +0100
@@ -139,7 +139,7 @@ class OEditControl : public OBoundContro
 						m_aChangeListeners;
 
 	::rtl::OUString			m_aHtmlChangeValue;
-	sal_uInt32 				m_nKeyEvent;
+	sal_uIntPtr				m_nKeyEvent;
 
 public:
 	OEditControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff -pur src680-m147.orig/binfilter/bf_forms/source/component/FormattedField.hxx src680-m147/binfilter/bf_forms/source/component/FormattedField.hxx
--- src680-m147.orig/binfilter/bf_forms/source/component/FormattedField.hxx	2005-09-07 17:34:32.000000000 +0200
+++ src680-m147/binfilter/bf_forms/source/component/FormattedField.hxx	2005-12-28 13:47:42.000000000 +0100
@@ -185,7 +185,7 @@ namespace frm
 	class OFormattedControl :	 public OBoundControl
 								,public OFormattedControl_BASE
 	{
-		sal_uInt32				m_nKeyEvent;
+		sal_uIntPtr				m_nKeyEvent;
 
 	public:
 		OFormattedControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff -pur src680-m147.orig/binfilter/bf_forms/source/component/Grid.hxx src680-m147/binfilter/bf_forms/source/component/Grid.hxx
--- src680-m147.orig/binfilter/bf_forms/source/component/Grid.hxx	2005-09-07 17:35:26.000000000 +0200
+++ src680-m147/binfilter/bf_forms/source/component/Grid.hxx	2005-12-28 13:48:41.000000000 +0100
@@ -123,7 +123,7 @@ class OGridControlModel :public OControl
 
 	::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >		m_xSelection;
 	::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >			m_xParentFormLoadable;
-	sal_uInt32					m_nFontEvent;
+	sal_uIntPtr					m_nFontEvent;
 
 // [properties]
 	::rtl::OUString 			m_sHelpURL; 				// URL
diff -pur src680-m147.orig/binfilter/bf_sfx2/source/dialog/filedlgimpl.hxx src680-m147/binfilter/bf_sfx2/source/dialog/filedlgimpl.hxx
--- src680-m147.orig/binfilter/bf_sfx2/source/dialog/filedlgimpl.hxx	2005-09-08 04:48:35.000000000 +0200
+++ src680-m147/binfilter/bf_sfx2/source/dialog/filedlgimpl.hxx	2005-12-28 13:51:19.000000000 +0100
@@ -106,7 +106,7 @@ namespace sfx2
 		SfxFilterFlags				m_nMustFlags;
 		SfxFilterFlags				m_nDontFlags;
 
-		ULONG						mnPostUserEventId;
+		sal_uIntPtr					mnPostUserEventId;
 
 		ErrCode 					mnError;
 
diff -pur src680-m147.orig/binfilter/bf_svx/source/inc/fmctrler.hxx src680-m147/binfilter/bf_svx/source/inc/fmctrler.hxx
--- src680-m147.orig/binfilter/bf_svx/source/inc/fmctrler.hxx	2005-09-08 08:00:35.000000000 +0200
+++ src680-m147/binfilter/bf_svx/source/inc/fmctrler.hxx	2005-12-28 13:52:18.000000000 +0100
@@ -322,9 +322,9 @@ class FmXFormController		: public ::comp
 
 	::rtl::OUString				m_aMode;
 
-	sal_uInt32 					m_nLoadEvent;
-	sal_uInt32					m_nUpdateDispatcherEvent;
-	sal_uInt32					m_nToggleEvent;
+	sal_uIntPtr					m_nLoadEvent;
+	sal_uIntPtr					m_nUpdateDispatcherEvent;
+	sal_uIntPtr					m_nToggleEvent;
 
 	sal_Int32					m_nCurrentFilterPosition;	// current level for filtering (or-criteria)
 	::rtl::OUString					m_sDispatchPrefix;
diff -pur src680-m147.orig/binfilter/bf_svx/source/inc/fmshimp.hxx src680-m147/binfilter/bf_svx/source/inc/fmshimp.hxx
--- src680-m147.orig/binfilter/bf_svx/source/inc/fmshimp.hxx	2005-09-08 08:04:13.000000000 +0200
+++ src680-m147/binfilter/bf_svx/source/inc/fmshimp.hxx	2005-12-28 13:53:13.000000000 +0100
@@ -353,7 +353,7 @@ class FmXFormShell	:public FmXFormShell_
 	SvLongs				m_arrRelativeGridColumn;
 
 	::osl::Mutex	m_aMutex;
-	sal_uInt32		m_nInvalidationEvent;
+	sal_uIntPtr		m_nInvalidationEvent;
 	::std::queue< FmLoadAction >
 					m_aLoadingPages;
 
diff -pur src680-m147.orig/binfilter/bf_svx/source/inc/fmvwimp.hxx src680-m147/binfilter/bf_svx/source/inc/fmvwimp.hxx
--- src680-m147.orig/binfilter/bf_svx/source/inc/fmvwimp.hxx	2005-09-08 08:05:53.000000000 +0200
+++ src680-m147/binfilter/bf_svx/source/inc/fmvwimp.hxx	2005-12-28 13:55:55.000000000 +0100
@@ -180,9 +180,9 @@ class FmXFormView :	public ::cppu::WeakI
 
 	FmFormObj*		m_pMarkedGrid;
 	FmFormView*		m_pView;
-	sal_uInt32		m_nActivationEvent;
-	sal_uInt32		m_nErrorMessageEvent;	// event for an asynchronous error message. See also m_aAsyncError
-	sal_uInt32      m_nAutoFocusEvent;		// event for asynchronously setting the focus to a control
+	sal_uIntPtr		m_nActivationEvent;
+	sal_uIntPtr		m_nErrorMessageEvent;	// event for an asynchronous error message. See also m_aAsyncError
+	sal_uIntPtr		m_nAutoFocusEvent;		// event for asynchronously setting the focus to a control
 
 	::com::sun::star::sdb::SQLErrorEvent
 					m_aAsyncError;			// error event which is to be displayed asyn. See m_nErrorMessageEvent.
diff -pur src680-m147.orig/binfilter/inc/bf_svx/gridctrl.hxx src680-m147/binfilter/inc/bf_svx/gridctrl.hxx
--- src680-m147.orig/binfilter/inc/bf_svx/gridctrl.hxx	2005-09-09 15:36:27.000000000 +0200
+++ src680-m147/binfilter/inc/bf_svx/gridctrl.hxx	2005-12-28 13:58:48.000000000 +0100
@@ -272,7 +272,7 @@ private:
 
 					m_xEmptyRow;		// Datensatz zum einfuegen
 
-	sal_uInt32			m_nAsynAdjustEvent;
+	sal_uIntPtr			m_nAsynAdjustEvent;
 
 	// if we modify the row for the new record, we automatically insert a "new new row".
 	// But if somebody else inserts a new record into the data source, we have to do the same.
@@ -310,7 +310,7 @@ private:  
 
 	BrowserMode			m_nMode;
 	sal_Int32			m_nCurrentPos;		// Aktuelle Position;
-	sal_uInt32			m_nDeleteEvent;		// EventId fuer asychrone Loeschen von Zeilen
+	sal_uIntPtr			m_nDeleteEvent;		// EventId fuer asychrone Loeschen von Zeilen
 	sal_uInt16			m_nOptions;			// Was kann das Control (Insert, Update, Delete)
 										// default readonly
 	sal_uInt16			m_nOptionMask;		// the mask of options to be enabled in setDataSource
diff -pur src680-m147.orig/dbaccess/source/ui/inc/AsyncronousLink.hxx src680-m147/dbaccess/source/ui/inc/AsyncronousLink.hxx
--- src680-m147.orig/dbaccess/source/ui/inc/AsyncronousLink.hxx	2005-09-08 17:14:42.000000000 +0200
+++ src680-m147/dbaccess/source/ui/inc/AsyncronousLink.hxx	2005-12-28 13:59:29.000000000 +0100
@@ -60,7 +60,7 @@ namespace dbaui
 		::vos::OMutex*		m_pEventSafety;
 		::vos::OMutex*		m_pDestructionSafety;
 		BOOL				m_bOwnMutexes;
-		ULONG				m_nEventId;
+		sal_uIntPtr			m_nEventId;
 
 	public:
 		/** constructs the object
diff -pur src680-m147.orig/dbaccess/source/ui/inc/sbagrid.hxx src680-m147/dbaccess/source/ui/inc/sbagrid.hxx
--- src680-m147.orig/dbaccess/source/ui/inc/sbagrid.hxx	2005-09-08 18:02:21.000000000 +0200
+++ src680-m147/dbaccess/source/ui/inc/sbagrid.hxx	2005-12-28 14:02:13.000000000 +0100
@@ -262,7 +262,7 @@ namespace dbaui
 	protected:
 		::svx::ODataAccessDescriptor													m_aDataDescriptor;
 		SbaGridListener*	m_pMasterListener;
-		sal_Int32			m_nAsyncDropEvent;
+		sal_IntPtr			m_nAsyncDropEvent;
 		sal_uInt16			m_nLastColId;
 		sal_uInt16			m_nLastRowId;
 
diff -pur src680-m147.orig/dbaccess/source/ui/inc/TableGrantCtrl.hxx src680-m147/dbaccess/source/ui/inc/TableGrantCtrl.hxx
--- src680-m147.orig/dbaccess/source/ui/inc/TableGrantCtrl.hxx	2005-09-08 17:37:13.000000000 +0200
+++ src680-m147/dbaccess/source/ui/inc/TableGrantCtrl.hxx	2005-12-28 14:00:50.000000000 +0100
@@ -115,7 +115,7 @@ protected:
 	virtual void CellModified();
 
 private:
-	ULONG		m_nDeActivateEvent;
+	sal_uIntPtr	m_nDeActivateEvent;
 	DECL_LINK( AsynchActivate, void* );
 	DECL_LINK( AsynchDeactivate, void* );
 
diff -pur src680-m147.orig/dbaccess/source/ui/inc/TableWindowListBox.hxx src680-m147/dbaccess/source/ui/inc/TableWindowListBox.hxx
--- src680-m147.orig/dbaccess/source/ui/inc/TableWindowListBox.hxx	2005-09-08 17:38:55.000000000 +0200
+++ src680-m147/dbaccess/source/ui/inc/TableWindowListBox.hxx	2005-12-28 14:01:30.000000000 +0100
@@ -77,7 +77,7 @@ namespace dbaui
 		Point						m_aMousePos;
 
 		OTableWindow*				m_pTabWin;
-		sal_Int32					m_nDropEvent;
+		sal_IntPtr					m_nDropEvent;
 		OJoinDropData				m_aDropInfo;
 
 		BOOL						m_bReallyScrolled : 1;
diff -pur src680-m147.orig/forms/source/component/Button.hxx src680-m147/forms/source/component/Button.hxx
--- src680-m147.orig/forms/source/component/Button.hxx	2005-09-09 00:34:04.000000000 +0200
+++ src680-m147/forms/source/component/Button.hxx	2005-12-28 15:43:10.000000000 +0100
@@ -113,7 +113,7 @@ class OButtonControl	:public OButtonCont
                         ,public OFormNavigationHelper
 {
 private:
-	sal_uInt32  m_nClickEvent;
+    sal_uIntPtr m_nClickEvent;
     sal_Int32   m_nTargetUrlFeatureId;
     /// caches the value of the "Enabled" property of our model
     sal_Bool    m_bEnabledByPropertyValue;
diff -pur src680-m147.orig/forms/source/component/Edit.hxx src680-m147/forms/source/component/Edit.hxx
--- src680-m147.orig/forms/source/component/Edit.hxx	2005-09-09 00:37:36.000000000 +0200
+++ src680-m147/forms/source/component/Edit.hxx	2005-12-28 15:43:46.000000000 +0100
@@ -150,7 +150,7 @@ class OEditControl : public OBoundContro
 						m_aChangeListeners;
 
 	::rtl::OUString			m_aHtmlChangeValue;
-	sal_uInt32 				m_nKeyEvent;
+	sal_uIntPtr				m_nKeyEvent;
 
 public:
 	OEditControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff -pur src680-m147.orig/forms/source/component/FormattedField.hxx src680-m147/forms/source/component/FormattedField.hxx
--- src680-m147.orig/forms/source/component/FormattedField.hxx	2005-09-09 00:40:49.000000000 +0200
+++ src680-m147/forms/source/component/FormattedField.hxx	2005-12-28 15:51:44.000000000 +0100
@@ -193,7 +193,7 @@ namespace frm
 	class OFormattedControl :	 public OBoundControl
 								,public OFormattedControl_BASE
 	{
-		sal_uInt32				m_nKeyEvent;
+		sal_uIntPtr				m_nKeyEvent;
 
 	public:
 		OFormattedControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
diff -pur src680-m147.orig/fpicker/source/office/commonpicker.hxx src680-m147/fpicker/source/office/commonpicker.hxx
--- src680-m147.orig/fpicker/source/office/commonpicker.hxx	2005-09-09 01:30:41.000000000 +0200
+++ src680-m147/fpicker/source/office/commonpicker.hxx	2005-12-28 15:52:51.000000000 +0100
@@ -113,7 +113,7 @@ namespace svt
 		// </properties>
 
 		SvtFileDialog*		m_pDlg;
-		sal_uInt32			m_nCancelEvent;
+		sal_uIntPtr			m_nCancelEvent;
 		sal_Bool			m_bExecuting;
 
 		::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >	m_xDialogParent;
diff -pur src680-m147.orig/sd/source/ui/slideshow/slideshowimpl.hxx src680-m147/sd/source/ui/slideshow/slideshowimpl.hxx
--- src680-m147.orig/sd/source/ui/slideshow/slideshowimpl.hxx	2005-10-11 10:18:14.000000000 +0200
+++ src680-m147/sd/source/ui/slideshow/slideshowimpl.hxx	2005-12-28 15:54:23.000000000 +0100
@@ -397,7 +397,7 @@ private:
 
     ::std::auto_ptr<PaneHider> mpPaneHider;
 
-	ULONG	mnEndShowEvent;
+	sal_uIntPtr		mnEndShowEvent;
 };
 
 class SlideShowImplGuard
diff -pur src680-m147.orig/sfx2/inc/tbxctrl.hxx src680-m147/sfx2/inc/tbxctrl.hxx
--- src680-m147.orig/sfx2/inc/tbxctrl.hxx	2005-09-07 19:21:58.000000000 +0200
+++ src680-m147/sfx2/inc/tbxctrl.hxx	2005-12-28 15:58:11.000000000 +0100
@@ -153,7 +153,7 @@ class SFX2_DLLPUBLIC SfxPopupWindow: pub
 {
 friend class SfxToolBox_Impl;
 	BOOL					                                                         m_bFloating;
-	ULONG					                                                         m_nEventId;
+	sal_uIntPtr				                                                         m_nEventId;
 	BOOL					                                                         m_bCascading;
 	Link					                                                         m_aDeleteLink;
     USHORT                                                                           m_nId;
diff -pur src680-m147.orig/sfx2/source/dialog/filedlgimpl.hxx src680-m147/sfx2/source/dialog/filedlgimpl.hxx
--- src680-m147.orig/sfx2/source/dialog/filedlgimpl.hxx	2005-09-07 20:18:47.000000000 +0200
+++ src680-m147/sfx2/source/dialog/filedlgimpl.hxx	2005-12-28 15:59:26.000000000 +0100
@@ -105,7 +105,7 @@ namespace sfx2
 		SfxFilterFlags				m_nMustFlags;
 		SfxFilterFlags				m_nDontFlags;
 
-		ULONG						mnPostUserEventId;
+		sal_uIntPtr					mnPostUserEventId;
 
 		ErrCode 					mnError;
 
diff -pur src680-m147.orig/svx/inc/gridctrl.hxx src680-m147/svx/inc/gridctrl.hxx
--- src680-m147.orig/svx/inc/gridctrl.hxx	2005-09-08 19:52:30.000000000 +0200
+++ src680-m147/svx/inc/gridctrl.hxx	2005-12-28 16:01:39.000000000 +0100
@@ -275,7 +275,7 @@ private:
 
 					m_xEmptyRow;		// Datensatz zum einfuegen
 
-	sal_uInt32			m_nAsynAdjustEvent;
+	sal_uIntPtr		m_nAsynAdjustEvent;
 
 	// if we modify the row for the new record, we automatically insert a "new new row".
 	// But if somebody else inserts a new record into the data source, we have to do the same.
@@ -313,7 +313,7 @@ private:  
 
 	BrowserMode			m_nMode;
 	sal_Int32			m_nCurrentPos;		// Aktuelle Position;
-	sal_uInt32			m_nDeleteEvent;		// EventId fuer asychrone Loeschen von Zeilen
+	sal_uIntPtr			m_nDeleteEvent;		// EventId fuer asychrone Loeschen von Zeilen
 	sal_uInt16			m_nOptions;			// Was kann das Control (Insert, Update, Delete)
 										// default readonly
 	sal_uInt16			m_nOptionMask;		// the mask of options to be enabled in setDataSource
diff -pur src680-m147.orig/svx/source/inc/fmctrler.hxx src680-m147/svx/source/inc/fmctrler.hxx
--- src680-m147.orig/svx/source/inc/fmctrler.hxx	2005-09-09 01:15:07.000000000 +0200
+++ src680-m147/svx/source/inc/fmctrler.hxx	2005-12-28 16:02:35.000000000 +0100
@@ -353,9 +353,9 @@ class SAL_DLLPRIVATE FmXFormController  
 
 	::rtl::OUString				m_aMode;
 
-	sal_uInt32 					m_nLoadEvent;
-	sal_uInt32					m_nUpdateDispatcherEvent;
-	sal_uInt32					m_nToggleEvent;
+	sal_uIntPtr					m_nLoadEvent;
+	sal_uIntPtr					m_nUpdateDispatcherEvent;
+	sal_uIntPtr					m_nToggleEvent;
 
 	sal_Int32					m_nCurrentFilterPosition;	// current level for filtering (or-criteria)
 
diff -pur src680-m147.orig/svx/source/inc/fmobj.hxx src680-m147/svx/source/inc/fmobj.hxx
--- src680-m147.orig/svx/source/inc/fmobj.hxx	2005-09-09 01:17:25.000000000 +0200
+++ src680-m147/svx/source/inc/fmobj.hxx	2005-12-28 16:03:30.000000000 +0100
@@ -68,7 +68,7 @@ class FmFormObj: public SdrUnoObj
 				// m_pEnvironmentHistory was created
 
 	FmFormView*     m_pControlCreationView;
-	sal_uInt32		m_nControlCreationEvent;
+	sal_uIntPtr		m_nControlCreationEvent;
 
 	// Informationen fuer die Controlumgebung
 	// werden nur vorgehalten, wenn ein Object sich nicht in einer Objectliste befindet
diff -pur src680-m147.orig/svx/source/inc/fmshimp.hxx src680-m147/svx/source/inc/fmshimp.hxx
--- src680-m147.orig/svx/source/inc/fmshimp.hxx	2005-09-09 01:18:58.000000000 +0200
+++ src680-m147/svx/source/inc/fmshimp.hxx	2005-12-28 16:04:04.000000000 +0100
@@ -319,8 +319,8 @@ class SAL_DLLPRIVATE FmXFormShell   :pub
 	SvLongs				m_arrRelativeGridColumn;
 
 	::osl::Mutex	m_aMutex;
-	ULONG           m_nInvalidationEvent;
-    ULONG           m_nActivationEvent;
+	sal_uIntPtr     m_nInvalidationEvent;
+	sal_uIntPtr     m_nActivationEvent;
 	::std::queue< FmLoadAction >
 					m_aLoadingPages;
 
diff -pur src680-m147.orig/vcl/inc/svapp.hxx src680-m147/vcl/inc/svapp.hxx
--- src680-m147.orig/vcl/inc/svapp.hxx	2005-09-09 13:29:11.000000000 +0200
+++ src680-m147/vcl/inc/svapp.hxx	2005-12-28 13:21:04.000000000 +0100
@@ -276,7 +276,7 @@ public:
 
     virtual BOOL                QueryExit();
 
-    virtual void                UserEvent( ULONG nEvent, void* pEventData );
+    virtual void                UserEvent( sal_uInt32 nEvent, void* pEventData );
 
     virtual void                ActivateExtHelp();
     virtual void                DeactivateExtHelp();
@@ -348,19 +348,19 @@ public:
     static void                 RemoveEventListener( const Link& rEventListener );
     static void                 AddKeyListener( const Link& rKeyListener );
     static void                 RemoveKeyListener( const Link& rKeyListener );
-    static void                 ImplCallEventListeners( ULONG nEvent, Window* pWin, void* pData );
+    static void                 ImplCallEventListeners( sal_uInt32 nEvent, Window* pWin, void* pData );
     static void                 ImplCallEventListeners( VclWindowEvent* pEvent );
-    static BOOL                 HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
+    static BOOL                 HandleKey( sal_uInt32 nEvent, Window *pWin, KeyEvent* pKeyEvent );
     
-	static ULONG                PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
-    static ULONG                PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent );
-	static void					RemoveMouseAndKeyEvents( Window *pWin );
-
-    static ULONG                PostUserEvent( ULONG nEvent, void* pEventData = NULL );
-    static ULONG                PostUserEvent( const Link& rLink, void* pCaller = NULL );
-    static BOOL                 PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData = NULL );
-    static BOOL                 PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller = NULL );
-    static void                 RemoveUserEvent( ULONG nUserEvent );
+    static sal_uIntPtr          PostKeyEvent( sal_uInt32 nEvent, Window *pWin, KeyEvent* pKeyEvent );
+    static sal_uIntPtr          PostMouseEvent( sal_uInt32 nEvent, Window *pWin, MouseEvent* pMouseEvent );
+    static void                 RemoveMouseAndKeyEvents( Window *pWin );
+
+    static sal_uIntPtr          PostUserEvent( sal_uInt32 nEvent, void* pEventData = NULL );
+    static sal_uIntPtr          PostUserEvent( const Link& rLink, void* pCaller = NULL );
+    static BOOL                 PostUserEvent( sal_uIntPtr& rEventId, sal_uInt32 nEvent, void* pEventData = NULL );
+    static BOOL                 PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller = NULL );
+    static void                 RemoveUserEvent( sal_uIntPtr nUserEvent );
 
     static BOOL                 InsertIdleHdl( const Link& rLink, USHORT nPriority );
     static void                 RemoveIdleHdl( const Link& rLink );
@@ -397,10 +397,10 @@ public:
     static void                 FlushAccel();
     static BOOL                 CallAccel( const KeyCode& rKeyCode, USHORT nRepeat = 0 );
 
-    static ULONG                AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
-    static void                 RemoveHotKey( ULONG nId );
-    static ULONG                AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
-    static void                 RemoveEventHook( ULONG nId );
+    static sal_uIntPtr          AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
+    static void                 RemoveHotKey( sal_uIntPtr nId );
+    static sal_uIntPtr          AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
+    static void                 RemoveEventHook( sal_uIntPtr nId );
     static long                 CallEventHooks( NotifyEvent& rEvt );
     static long                 CallPreNotify( NotifyEvent& rEvt );
     static long                 CallEvent( NotifyEvent& rEvt );
diff -pur src680-m147.orig/vcl/inc/svdata.hxx src680-m147/vcl/inc/svdata.hxx
--- src680-m147.orig/vcl/inc/svdata.hxx	2005-09-09 13:29:39.000000000 +0200
+++ src680-m147/vcl/inc/svdata.hxx	2005-12-28 16:29:56.000000000 +0100
@@ -414,7 +414,7 @@ struct ImplDelData
 
 struct ImplSVEvent
 {
-    ULONG               mnEvent;
+    sal_uInt32          mnEvent;
     void*               mpData;
     Link*               mpLink;
     Window*             mpWindow;
diff -pur src680-m147.orig/vcl/inc/vclevent.hxx src680-m147/vcl/inc/vclevent.hxx
--- src680-m147.orig/vcl/inc/vclevent.hxx	2005-09-09 13:35:10.000000000 +0200
+++ src680-m147/vcl/inc/vclevent.hxx	2005-12-28 13:13:52.000000000 +0100
@@ -192,13 +192,13 @@ class Menu;
 class VCL_DLLPUBLIC VclSimpleEvent
 {
 private:
-    ULONG nId;
+    sal_uInt32 nId;
 
 public:
-    VclSimpleEvent( ULONG n ) { nId = n; }
-	TYPEINFO();
+    VclSimpleEvent( sal_uInt32 n ) { nId = n; }
+    TYPEINFO();
 
-	ULONG GetId() const { return nId; }
+    sal_uInt32 GetId() const { return nId; }
 };
 
 class VCL_DLLPUBLIC VclWindowEvent : public VclSimpleEvent
@@ -208,7 +208,7 @@ private:
     void*   pData;
 
 public:
-    VclWindowEvent( Window* pWin, ULONG n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; }
+    VclWindowEvent( Window* pWin, sal_uInt32 n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; }
 	TYPEINFO();
 
 	Window* GetWindow() const { return pWindow; }
@@ -222,7 +222,7 @@ private:
     MouseEvent aEvent;
 
 public:
-    VclMouseEvent( Window* pWin, ULONG n, const MouseEvent& rEvent ) : VclWindowEvent( pWin, n ), aEvent(rEvent) { ; }
+    VclMouseEvent( Window* pWin, sal_uInt32 n, const MouseEvent& rEvent ) : VclWindowEvent( pWin, n ), aEvent(rEvent) { ; }
 	TYPEINFO();
 
 	const MouseEvent& GetEvent() const { return aEvent; }
@@ -236,7 +236,7 @@ private:
     USHORT mnPos;
 
 public:
-    VclMenuEvent( Menu* pM, ULONG n, USHORT nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; }
+    VclMenuEvent( Menu* pM, sal_uInt32 n, USHORT nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; }
 	TYPEINFO();
 
 	Menu* GetMenu() const { return pMenu; }
diff -pur src680-m147.orig/vcl/inc/window.hxx src680-m147/vcl/inc/window.hxx
--- src680-m147.orig/vcl/inc/window.hxx	2005-11-10 16:48:41.000000000 +0100
+++ src680-m147/vcl/inc/window.hxx	2005-12-28 11:37:14.000000000 +0100
@@ -605,8 +605,8 @@ protected:
 
             void        SetCompoundControl( BOOL bCompound );
 
-            void        ImplCallEventListeners( ULONG nEvent, void* pData = NULL );
-            void        CallEventListeners( ULONG nEvent, void* pData = NULL );
+            void        ImplCallEventListeners( sal_uInt32 nEvent, void* pData = NULL );
+            void        CallEventListeners( sal_uInt32 nEvent, void* pData = NULL );
 
 
 public:
@@ -632,7 +632,7 @@ public:
     virtual void        RequestHelp( const HelpEvent& rHEvt );
     virtual void        Command( const CommandEvent& rCEvt );
     virtual void        Tracking( const TrackingEvent& rTEvt );
-    virtual void        UserEvent( ULONG nEvent, void* pEventData );
+    virtual void        UserEvent( sal_uInt32 nEvent, void* pEventData );
     virtual void        StateChanged( StateChangedType nStateChange );
     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
     virtual long        PreNotify( NotifyEvent& rNEvt );
@@ -644,11 +644,11 @@ public:
     /*virtual*/ void    AddChildEventListener( const Link& rEventListener );
     /*virtual*/ void    RemoveChildEventListener( const Link& rEventListener );
 
-    ULONG               PostUserEvent( ULONG nEvent, void* pEventData = NULL );
-    ULONG               PostUserEvent( const Link& rLink, void* pCaller = NULL );
-    BOOL                PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData = NULL );
-    BOOL                PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller = NULL );
-    void                RemoveUserEvent( ULONG nUserEvent );
+    sal_uIntPtr         PostUserEvent( sal_uInt32 nEvent, void* pEventData = NULL );
+    sal_uIntPtr         PostUserEvent( const Link& rLink, void* pCaller = NULL );
+    BOOL                PostUserEvent( sal_uIntPtr& rEventId, sal_uInt32 nEvent, void* pEventData = NULL );
+    BOOL                PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller = NULL );
+    void                RemoveUserEvent( sal_uIntPtr nUserEvent );
     void                PostStateChanged( StateChangedType nState );
 
     void                IncrementLockCount();
diff -pur src680-m147.orig/vcl/source/app/svapp.cxx src680-m147/vcl/source/app/svapp.cxx
--- src680-m147.orig/vcl/source/app/svapp.cxx	2005-11-01 13:58:43.000000000 +0100
+++ src680-m147/vcl/source/app/svapp.cxx	2005-12-28 13:19:16.000000000 +0100
@@ -237,16 +237,16 @@ struct ImplEventHook
 
 struct ImplPostEventData
 {
-    ULONG			mnEvent;
+    sal_uInt32		mnEvent;
     const Window*	mpWin;
-	ULONG			mnEventId;
+    sal_uIntPtr		mnEventId;
     KeyEvent    	maKeyEvent;
 	MouseEvent		maMouseEvent;
 	
 
-   	ImplPostEventData( ULONG nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
+    ImplPostEventData( sal_uInt32 nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
     	mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
-   	ImplPostEventData( ULONG nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
+    ImplPostEventData( sal_uInt32 nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
     	mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
 
 	~ImplPostEventData() {}
@@ -308,7 +308,7 @@ BOOL Application::QueryExit()
 
 // -----------------------------------------------------------------------
 
-void Application::UserEvent( ULONG, void* )
+void Application::UserEvent( sal_uInt32, void* )
 {
 }
 
@@ -855,7 +855,7 @@ void Application::NotifyAllWindows( Data
 
 // -----------------------------------------------------------------------
 
-void Application::ImplCallEventListeners( ULONG nEvent, Window *pWin, void* pData )
+void Application::ImplCallEventListeners( sal_uInt32 nEvent, Window *pWin, void* pData )
 {
     ImplSVData* pSVData = ImplGetSVData();
     VclWindowEvent aEvent( pWin, nEvent, pData );
@@ -915,7 +915,7 @@ void Application::RemoveKeyListener( con
 
 // -----------------------------------------------------------------------
 
-BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+BOOL Application::HandleKey( sal_uInt32 nEvent, Window *pWin, KeyEvent* pKeyEvent )
 {
     // let listeners process the key event
     VclWindowEvent aEvent( pWin, nEvent, (void *) pKeyEvent );
@@ -932,10 +932,10 @@ BOOL Application::HandleKey( ULONG nEven
 
 // -----------------------------------------------------------------------------
 
-ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+sal_uIntPtr Application::PostKeyEvent( sal_uInt32 nEvent, Window *pWin, KeyEvent* pKeyEvent )
 {
 	const ::vos::OGuard	aGuard( GetSolarMutex() );
-	ULONG 				nEventId = 0;
+    sal_uIntPtr			nEventId = 0;
 	
     if( pWin && pKeyEvent )
     {
@@ -959,10 +959,10 @@ ULONG Application::PostKeyEvent( ULONG n
 
 // -----------------------------------------------------------------------------
 
-ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent )
+sal_uIntPtr Application::PostMouseEvent( sal_uInt32 nEvent, Window *pWin, MouseEvent* pMouseEvent )
 {
 	const ::vos::OGuard	aGuard( GetSolarMutex() );
-	ULONG 				nEventId = 0;
+    sal_uIntPtr			nEventId = 0;
 	
     if( pWin && pMouseEvent )
     {
@@ -999,8 +999,8 @@ IMPL_STATIC_LINK( Application, PostEvent
 	const ::vos::OGuard	aGuard( GetSolarMutex() );
     ImplPostEventData*	pData = static_cast< ImplPostEventData * >( pCallData );
 	const void*			pEventData;
-    ULONG               nEvent;
-	const ULONG			nEventId = pData->mnEventId;
+    sal_uInt32          nEvent;
+    const sal_uIntPtr   nEventId = pData->mnEventId;
 	
     switch( pData->mnEvent )
     {
@@ -1081,25 +1081,25 @@ void Application::RemoveMouseAndKeyEvent
 
 // -----------------------------------------------------------------------
 
-ULONG Application::PostUserEvent( ULONG nEvent, void* pEventData )
+sal_uIntPtr Application::PostUserEvent( sal_uInt32 nEvent, void* pEventData )
 {
-    ULONG nEventId;
+    sal_uIntPtr nEventId;
     PostUserEvent( nEventId, nEvent, pEventData );
     return nEventId;
 }
 
 // -----------------------------------------------------------------------
 
-ULONG Application::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uIntPtr Application::PostUserEvent( const Link& rLink, void* pCaller )
 {
-    ULONG nEventId;
+    sal_uIntPtr nEventId;
     PostUserEvent( nEventId, rLink, pCaller );
     return nEventId;
 }
 
 // -----------------------------------------------------------------------
 
-BOOL Application::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+BOOL Application::PostUserEvent( sal_uIntPtr& rEventId, sal_uInt32 nEvent, void* pEventData )
 {
     ImplSVEvent* pSVEvent = new ImplSVEvent;
     pSVEvent->mnEvent   = nEvent;
@@ -1107,7 +1107,7 @@ BOOL Application::PostUserEvent( ULONG& 
     pSVEvent->mpLink    = NULL;
     pSVEvent->mpWindow  = NULL;
     pSVEvent->mbCall    = TRUE;
-    rEventId = (ULONG)pSVEvent;
+    rEventId = (sal_uIntPtr)pSVEvent;
     if ( ImplGetDefaultWindow()->ImplGetFrame()->PostEvent( pSVEvent ) )
         return TRUE;
     else
@@ -1120,7 +1120,7 @@ BOOL Application::PostUserEvent( ULONG& 
 
 // -----------------------------------------------------------------------
 
-BOOL Application::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller )
+BOOL Application::PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller )
 {
     ImplSVEvent* pSVEvent = new ImplSVEvent;
     pSVEvent->mnEvent   = 0;
@@ -1128,7 +1128,7 @@ BOOL Application::PostUserEvent( ULONG& 
     pSVEvent->mpLink    = new Link( rLink );
     pSVEvent->mpWindow  = NULL;
     pSVEvent->mbCall    = TRUE;
-    rEventId = (ULONG)pSVEvent;
+    rEventId = (sal_uIntPtr)pSVEvent;
     if ( ImplGetDefaultWindow()->ImplGetFrame()->PostEvent( pSVEvent ) )
         return TRUE;
     else
@@ -1141,7 +1141,7 @@ BOOL Application::PostUserEvent( ULONG& 
 
 // -----------------------------------------------------------------------
 
-void Application::RemoveUserEvent( ULONG nUserEvent )
+void Application::RemoveUserEvent( sal_uIntPtr nUserEvent )
 {
     if(nUserEvent)
 	{
@@ -1673,7 +1673,7 @@ void ImplFreeHotKeyData()
 
 // -----------------------------------------------------------------------
 
-ULONG Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
+sal_uIntPtr Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
 {
     ImplSVData*     pSVData = ImplGetSVData();
     ImplHotKey*     pHotKeyData = new ImplHotKey;
@@ -1682,12 +1682,12 @@ ULONG Application::AddHotKey( const KeyC
     pHotKeyData->maLink     = rLink;
     pHotKeyData->mpNext     = pSVData->maAppData.mpFirstHotKey;
     pSVData->maAppData.mpFirstHotKey = pHotKeyData;
-    return (ULONG)pHotKeyData;
+    return (sal_uIntPtr)pHotKeyData;
 }
 
 // -----------------------------------------------------------------------
 
-void Application::RemoveHotKey( ULONG nId )
+void Application::RemoveHotKey( sal_uIntPtr nId )
 {
     ImplSVData*     pSVData = ImplGetSVData();
     ImplHotKey*     pFindHotKeyData = (ImplHotKey*)nId;
@@ -1731,7 +1731,7 @@ void ImplFreeEventHookData()
 
 // -----------------------------------------------------------------------
 
-ULONG Application::AddEventHook( VCLEventHookProc pProc, void* pData )
+sal_uIntPtr Application::AddEventHook( VCLEventHookProc pProc, void* pData )
 {
     ImplSVData*     pSVData = ImplGetSVData();
     ImplEventHook*  pEventHookData = new ImplEventHook;
@@ -1739,12 +1739,12 @@ ULONG Application::AddEventHook( VCLEven
     pEventHookData->mpProc     = pProc;
     pEventHookData->mpNext     = pSVData->maAppData.mpFirstEventHook;
     pSVData->maAppData.mpFirstEventHook = pEventHookData;
-    return (ULONG)pEventHookData;
+    return (sal_uIntPtr)pEventHookData;
 }
 
 // -----------------------------------------------------------------------
 
-void Application::RemoveEventHook( ULONG nId )
+void Application::RemoveEventHook( sal_uIntPtr nId )
 {
     ImplSVData*     pSVData = ImplGetSVData();
     ImplEventHook*  pFindEventHookData = (ImplEventHook*)nId;
diff -pur src680-m147.orig/vcl/source/window/window.cxx src680-m147/vcl/source/window/window.cxx
--- src680-m147.orig/vcl/source/window/window.cxx	2005-11-11 12:55:45.000000000 +0100
+++ src680-m147/vcl/source/window/window.cxx	2005-12-28 16:37:52.000000000 +0100
@@ -4966,7 +4966,7 @@ void Window::Tracking( const TrackingEve
 
 // -----------------------------------------------------------------------
 
-void Window::UserEvent( ULONG, void* )
+void Window::UserEvent( sal_uInt32, void* )
 {
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 }
@@ -5309,7 +5309,7 @@ long Window::Notify( NotifyEvent& rNEvt 
 
 // -----------------------------------------------------------------------
 
-void Window::ImplCallEventListeners( ULONG nEvent, void* pData )
+void Window::ImplCallEventListeners( sal_uInt32 nEvent, void* pData )
 {
 	// The implementation was moved to CallEventListeners(),
 	// because derived classes in svtools must be able to
@@ -5322,7 +5322,7 @@ void Window::ImplCallEventListeners( ULO
 
 // -----------------------------------------------------------------------
 
-void Window::CallEventListeners( ULONG nEvent, void* pData )
+void Window::CallEventListeners( sal_uInt32 nEvent, void* pData )
 {
     VclWindowEvent aEvent( this, nEvent, pData );
 
@@ -5390,25 +5390,25 @@ void Window::RemoveChildEventListener( c
 
 // -----------------------------------------------------------------------
 
-ULONG Window::PostUserEvent( ULONG nEvent, void* pEventData )
+sal_uIntPtr Window::PostUserEvent( sal_uInt32 nEvent, void* pEventData )
 {
-    ULONG nEventId;
+    sal_uIntPtr nEventId;
     PostUserEvent( nEventId, nEvent, pEventData );
     return nEventId;
 }
 
 // -----------------------------------------------------------------------
 
-ULONG Window::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uIntPtr Window::PostUserEvent( const Link& rLink, void* pCaller )
 {
-    ULONG nEventId;
+    sal_uIntPtr nEventId;
     PostUserEvent( nEventId, rLink, pCaller );
     return nEventId;
 }
 
 // -----------------------------------------------------------------------
 
-BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+BOOL Window::PostUserEvent( sal_uIntPtr& rEventId, sal_uInt32 nEvent, void* pEventData )
 {
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 
@@ -5419,7 +5419,7 @@ BOOL Window::PostUserEvent( ULONG& rEven
     pSVEvent->mpWindow  = this;
     pSVEvent->mbCall    = TRUE;
     ImplAddDel( &(pSVEvent->maDelData) );
-    rEventId = (ULONG)pSVEvent;
+    rEventId = (sal_uIntPtr)pSVEvent;
     if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) )
         return TRUE;
     else
@@ -5433,7 +5433,7 @@ BOOL Window::PostUserEvent( ULONG& rEven
 
 // -----------------------------------------------------------------------
 
-BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller )
+BOOL Window::PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller )
 {
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 
@@ -5444,7 +5444,7 @@ BOOL Window::PostUserEvent( ULONG& rEven
     pSVEvent->mpWindow  = this;
     pSVEvent->mbCall    = TRUE;
     ImplAddDel( &(pSVEvent->maDelData) );
-    rEventId = (ULONG)pSVEvent;
+    rEventId = (sal_uIntPtr)pSVEvent;
     if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) )
         return TRUE;
     else
@@ -5458,7 +5458,7 @@ BOOL Window::PostUserEvent( ULONG& rEven
 
 // -----------------------------------------------------------------------
 
-void Window::RemoveUserEvent( ULONG nUserEvent )
+void Window::RemoveUserEvent( sal_uIntPtr nUserEvent )
 {
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 
