--- a/DboxMain.h
+++ b/DboxMain.h
@@ -5,12 +5,25 @@
 #define DboxMain_h
 
 #include "corelib/PWScore.h"
-#include "resource.h"
+#include "PwsPlatform.h"
+#if defined(POCKET_PC)
+  #include "pocketpc/resource.h"
+  #include "pocketpc/MyListCtrl.h"
+#else
+  #include "resource.h"
+#endif
+
+#if defined(POCKET_PC) || (_MFC_VER <= 1200)
+DECLARE_HANDLE(HDROP);
+#endif
 
 //-----------------------------------------------------------------------------
 class DboxMain
    : public CDialog
 {
+#if defined(POCKET_PC)
+friend class CMyListCtrl;
+#endif
 
 // static methods
 private:
@@ -41,7 +54,11 @@
 
 	//{{AFX_DATA(DboxMain)
 	enum { IDD = IDD_PASSWORDSAFE_DIALOG };
+#if defined(POCKET_PC)
+	CMyListCtrl	m_ctlItemList;
+#else
 	CListCtrl	m_ctlItemList;
+#endif
 	//}}AFX_DATA
 
 	// ClassWizard generated virtual function overrides
@@ -61,11 +78,18 @@
    HGLOBAL hGlobalMemory;
 
    CMyString m_currbackup;
+#if !defined(POCKET_PC)
    CMyString m_title; // what's displayed in the title bar
+#endif
 
+#if defined(POCKET_PC)
+   CCeCommandBar	*m_wndCommandBar;
+   CMenu			*m_wndMenu;
+#else
    CToolBar m_wndToolBar;
    CStatusBar m_statusBar;
    BOOL m_toolbarsSetup;
+#endif
 
    bool m_windowok;
    BOOL m_existingrestore;
@@ -100,7 +124,7 @@
    int Save(void);
    int SaveAs(void);
    int Open(void);
-   int Open( const char* pszFilename );
+   int Open( const CMyString &pszFilename );
    int BackupSafe(void);
    int New(void);
    int Restore(void);
@@ -133,9 +157,13 @@
    afx_msg void OnSave();
    afx_msg void OnAdd();
    afx_msg void OnOK();
+#if defined(POCKET_PC)
+   afx_msg void OnShowPassword();
+#else
    afx_msg void OnSetfocusItemlist( NMHDR * pNotifyStruct, LRESULT * result );
    afx_msg void OnKillfocusItemlist( NMHDR * pNotifyStruct, LRESULT * result );
    afx_msg void OnDropFiles(HDROP hDrop);
+#endif
 	afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
 	afx_msg void OnUpdateMRU(CCmdUI* pCmdUI);
 	afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
@@ -143,10 +171,14 @@
 	//}}AFX_MSG
 
    afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);
-   afx_msg void OnOpenMRU(UINT nID);
    afx_msg void OnExportV17();
    afx_msg void OnExportText();
 
+#if _MFC_VER > 1200
+	afx_msg BOOL OnOpenMRU(UINT nID);
+#else
+	afx_msg void OnOpenMRU(UINT nID);
+#endif
    DECLARE_MESSAGE_MAP()
 
   BOOL CheckExtension(const CMyString &name, const CMyString &ext) const;
@@ -155,7 +187,6 @@
 
 private:
   PWScore m_core;
-
 };
 
 //-----------------------------------------------------------------------------