From bbf1f0e5cffb8c01696eb26e254857a61f017d70 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Karsten=20Ball=C3=BCder?= <ballueder@usa.net>
Date: Wed, 20 May 1998 14:21:00 +0000
Subject: [PATCH] now MSW stuff is complete

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 include/wx/msw/ctl3d/ctl3d.h                |  61 ++
 include/wx/msw/ole/droptgt.h                | 113 +++
 include/wx/msw/ole/oleutils.h               | 145 ++++
 include/wx/msw/ole/uuid.h                   |  91 +++
 samples/joytest/chart.ico                   | Bin 0 -> 766 bytes
 samples/joytest/gun.wav                     | Bin 0 -> 26838 bytes
 samples/joytest/joytest.cpp                 | 171 ++++
 samples/joytest/joytest.def                 |   8 +
 samples/joytest/joytest.h                   |  51 ++
 samples/joytest/joytest.ico                 | Bin 0 -> 766 bytes
 samples/joytest/joytest.rc                  |   5 +
 samples/joytest/makefile.b32                |  64 ++
 samples/joytest/makefile.bcc                |  75 ++
 samples/joytest/makefile.dos                |  63 ++
 samples/joytest/makefile.g95                |  35 +
 samples/joytest/makefile.nt                 |  63 ++
 samples/joytest/makefile.sc                 |  37 +
 samples/joytest/makefile.unx                |  55 ++
 samples/joytest/makefile.wat                |  43 +
 samples/joytest/mondrian.ico                | Bin 0 -> 766 bytes
 samples/mfc/makefile.b32                    |  71 ++
 samples/mfc/makefile.bcc                    |  76 ++
 samples/mfc/makefile.dos                    |  89 +++
 samples/mfc/makefile.nt                     |  66 ++
 samples/mfc/makefile.wat                    |  47 ++
 samples/mfc/mfctest.cpp                     | 408 ++++++++++
 samples/mfc/mfctest.def                     |  21 +
 samples/mfc/mfctest.h                       |  66 ++
 samples/mfc/mfctest.ico                     | Bin 0 -> 766 bytes
 samples/mfc/mfctest.rc                      | 108 +++
 samples/mfc/resource.h                      |  18 +
 samples/mfc/stdafx.h                        |  12 +
 samples/nativdlg/aiai.ico                   | Bin 0 -> 766 bytes
 samples/nativdlg/dialog1.rc                 | 142 ++++
 samples/nativdlg/makefile.b32               |  64 ++
 samples/nativdlg/makefile.bcc               |  74 ++
 samples/nativdlg/makefile.dos               |  86 ++
 samples/nativdlg/makefile.g95               |  36 +
 samples/nativdlg/makefile.nt                |  63 ++
 samples/nativdlg/makefile.sc                |  35 +
 samples/nativdlg/makefile.unx               |  76 ++
 samples/nativdlg/makefile.vms               |  38 +
 samples/nativdlg/makefile.wat               |  42 +
 samples/nativdlg/nativdlg.cpp               | 130 +++
 samples/nativdlg/nativdlg.def               |   9 +
 samples/nativdlg/nativdlg.h                 |  47 ++
 samples/nativdlg/nativdlg.rc                |   4 +
 samples/nativdlg/resource.h                 |  25 +
 samples/ownerdrw/bell.bmp                   | Bin 0 -> 370 bytes
 samples/ownerdrw/makefile.b32               |  64 ++
 samples/ownerdrw/makefile.dos               |  65 ++
 samples/ownerdrw/makefile.g95               |  37 +
 samples/ownerdrw/makefile.nt                |  64 ++
 samples/ownerdrw/mondrian.ico               | Bin 0 -> 766 bytes
 samples/ownerdrw/nosound.bmp                | Bin 0 -> 370 bytes
 samples/ownerdrw/ownerdrw.cpp               | 293 +++++++
 samples/ownerdrw/ownerdrw.def               |   8 +
 samples/ownerdrw/ownerdrw.rc                |   6 +
 samples/ownerdrw/sound.bmp                  | Bin 0 -> 370 bytes
 samples/regtest/key1.ico                    | Bin 0 -> 318 bytes
 samples/regtest/key2.ico                    | Bin 0 -> 318 bytes
 samples/regtest/key3.ico                    | Bin 0 -> 318 bytes
 samples/regtest/makefile.g95                |  37 +
 samples/regtest/makefile.nt                 |  64 ++
 samples/regtest/registry.ico                | Bin 0 -> 1078 bytes
 samples/regtest/regtest.cpp                 | 834 ++++++++++++++++++++
 samples/regtest/regtest.rc                  |   9 +
 samples/regtest/value1.ico                  | Bin 0 -> 318 bytes
 samples/regtest/value2.ico                  | Bin 0 -> 318 bytes
 samples/taskbar/makefile.b32                |  64 ++
 samples/taskbar/makefile.bcc                |  73 ++
 samples/taskbar/makefile.dos                |  65 ++
 samples/taskbar/makefile.g95                |  37 +
 samples/taskbar/makefile.nt                 |  64 ++
 samples/taskbar/mondrian.ico                | Bin 0 -> 766 bytes
 samples/taskbar/tbtest.cpp                  | 120 +++
 samples/taskbar/tbtest.def                  |   8 +
 samples/taskbar/tbtest.h                    |  50 ++
 samples/taskbar/tbtest.rc                   |   3 +
 src/msw/ctl3d/borland/makefile.b32          |  25 +
 src/msw/ctl3d/borland/makefile.bcc          |  25 +
 src/msw/ctl3d/ctl3d.dll                     | Bin 0 -> 20964 bytes
 src/msw/ctl3d/ctl3d32.dll                   | Bin 0 -> 26623 bytes
 src/msw/ctl3d/ctl3dv2.dll                   | Bin 0 -> 27620 bytes
 src/msw/ctl3d/msvc/ctl3d.h                  |  61 ++
 src/msw/ctl3d/msvc/ctl3d.lib                | Bin 0 -> 2560 bytes
 src/msw/ctl3d/msvc/ctl3dv2.lib              | Bin 0 -> 2560 bytes
 src/msw/ctl3d/readme.txt                    |  31 +
 src/msw/ctl3d/wat32/import32.zip            | Bin 0 -> 22993 bytes
 src/msw/ctl3d/wat386/ctl3d.h                |  61 ++
 src/msw/ctl3d/wat386/ctl3d32.c              | 285 +++++++
 src/msw/ctl3d/wat386/ctl3d32.lnk            |   1 +
 src/msw/ctl3d/wat386/ctl3d32.obj            | Bin 0 -> 6699 bytes
 src/msw/ctl3d/wat386/ctl3d32.txt            |  11 +
 src/msw/ctl3d/wat386/makefile.wat           |  23 +
 src/msw/ole/droptgt.cpp                     | 459 +++++++++++
 src/msw/ole/oleutils.cpp                    | 193 +++++
 src/msw/ole/uuid.cpp                        | 153 ++++
 utils/nplugin/docs/notes.txt                |  32 +
 utils/nplugin/lib/dummy                     |   1 +
 utils/nplugin/samples/gui/gui.cpp           | 186 +++++
 utils/nplugin/samples/gui/gui.h             |  59 ++
 utils/nplugin/samples/gui/makefile.nt       |  70 ++
 utils/nplugin/samples/gui/npgui32.def       |   9 +
 utils/nplugin/samples/gui/npgui32.rc        |  44 ++
 utils/nplugin/samples/simple/makefile.nt    |  70 ++
 utils/nplugin/samples/simple/npsimple32.def |   9 +
 utils/nplugin/samples/simple/npsimple32.rc  |  44 ++
 utils/nplugin/samples/simple/simple.cpp     | 174 ++++
 utils/nplugin/src/makefile.nt               |  78 ++
 utils/nplugin/src/npapi.h                   | 258 ++++++
 utils/nplugin/src/npapp.cpp                 | 277 +++++++
 utils/nplugin/src/npapp.h                   |  91 +++
 utils/nplugin/src/npframe.cpp               | 293 +++++++
 utils/nplugin/src/npframe.h                 |  81 ++
 utils/nplugin/src/npshell.cpp               | 278 +++++++
 utils/nplugin/src/npupp.h                   | 799 +++++++++++++++++++
 utils/nplugin/src/npwin.cpp                 | 186 +++++
 118 files changed, 9265 insertions(+)
 create mode 100644 include/wx/msw/ctl3d/ctl3d.h
 create mode 100644 include/wx/msw/ole/droptgt.h
 create mode 100644 include/wx/msw/ole/oleutils.h
 create mode 100644 include/wx/msw/ole/uuid.h
 create mode 100644 samples/joytest/chart.ico
 create mode 100644 samples/joytest/gun.wav
 create mode 100644 samples/joytest/joytest.cpp
 create mode 100644 samples/joytest/joytest.def
 create mode 100644 samples/joytest/joytest.h
 create mode 100644 samples/joytest/joytest.ico
 create mode 100644 samples/joytest/joytest.rc
 create mode 100644 samples/joytest/makefile.b32
 create mode 100644 samples/joytest/makefile.bcc
 create mode 100644 samples/joytest/makefile.dos
 create mode 100644 samples/joytest/makefile.g95
 create mode 100644 samples/joytest/makefile.nt
 create mode 100644 samples/joytest/makefile.sc
 create mode 100644 samples/joytest/makefile.unx
 create mode 100644 samples/joytest/makefile.wat
 create mode 100644 samples/joytest/mondrian.ico
 create mode 100644 samples/mfc/makefile.b32
 create mode 100644 samples/mfc/makefile.bcc
 create mode 100644 samples/mfc/makefile.dos
 create mode 100644 samples/mfc/makefile.nt
 create mode 100644 samples/mfc/makefile.wat
 create mode 100644 samples/mfc/mfctest.cpp
 create mode 100644 samples/mfc/mfctest.def
 create mode 100644 samples/mfc/mfctest.h
 create mode 100644 samples/mfc/mfctest.ico
 create mode 100644 samples/mfc/mfctest.rc
 create mode 100644 samples/mfc/resource.h
 create mode 100644 samples/mfc/stdafx.h
 create mode 100644 samples/nativdlg/aiai.ico
 create mode 100644 samples/nativdlg/dialog1.rc
 create mode 100644 samples/nativdlg/makefile.b32
 create mode 100644 samples/nativdlg/makefile.bcc
 create mode 100644 samples/nativdlg/makefile.dos
 create mode 100644 samples/nativdlg/makefile.g95
 create mode 100644 samples/nativdlg/makefile.nt
 create mode 100644 samples/nativdlg/makefile.sc
 create mode 100644 samples/nativdlg/makefile.unx
 create mode 100644 samples/nativdlg/makefile.vms
 create mode 100644 samples/nativdlg/makefile.wat
 create mode 100644 samples/nativdlg/nativdlg.cpp
 create mode 100644 samples/nativdlg/nativdlg.def
 create mode 100644 samples/nativdlg/nativdlg.h
 create mode 100644 samples/nativdlg/nativdlg.rc
 create mode 100644 samples/nativdlg/resource.h
 create mode 100644 samples/ownerdrw/bell.bmp
 create mode 100644 samples/ownerdrw/makefile.b32
 create mode 100644 samples/ownerdrw/makefile.dos
 create mode 100644 samples/ownerdrw/makefile.g95
 create mode 100644 samples/ownerdrw/makefile.nt
 create mode 100644 samples/ownerdrw/mondrian.ico
 create mode 100644 samples/ownerdrw/nosound.bmp
 create mode 100644 samples/ownerdrw/ownerdrw.cpp
 create mode 100644 samples/ownerdrw/ownerdrw.def
 create mode 100644 samples/ownerdrw/ownerdrw.rc
 create mode 100644 samples/ownerdrw/sound.bmp
 create mode 100644 samples/regtest/key1.ico
 create mode 100644 samples/regtest/key2.ico
 create mode 100644 samples/regtest/key3.ico
 create mode 100644 samples/regtest/makefile.g95
 create mode 100644 samples/regtest/makefile.nt
 create mode 100644 samples/regtest/registry.ico
 create mode 100644 samples/regtest/regtest.cpp
 create mode 100644 samples/regtest/regtest.rc
 create mode 100644 samples/regtest/value1.ico
 create mode 100644 samples/regtest/value2.ico
 create mode 100644 samples/taskbar/makefile.b32
 create mode 100644 samples/taskbar/makefile.bcc
 create mode 100644 samples/taskbar/makefile.dos
 create mode 100644 samples/taskbar/makefile.g95
 create mode 100644 samples/taskbar/makefile.nt
 create mode 100644 samples/taskbar/mondrian.ico
 create mode 100644 samples/taskbar/tbtest.cpp
 create mode 100644 samples/taskbar/tbtest.def
 create mode 100644 samples/taskbar/tbtest.h
 create mode 100644 samples/taskbar/tbtest.rc
 create mode 100644 src/msw/ctl3d/borland/makefile.b32
 create mode 100644 src/msw/ctl3d/borland/makefile.bcc
 create mode 100644 src/msw/ctl3d/ctl3d.dll
 create mode 100644 src/msw/ctl3d/ctl3d32.dll
 create mode 100644 src/msw/ctl3d/ctl3dv2.dll
 create mode 100644 src/msw/ctl3d/msvc/ctl3d.h
 create mode 100644 src/msw/ctl3d/msvc/ctl3d.lib
 create mode 100644 src/msw/ctl3d/msvc/ctl3dv2.lib
 create mode 100644 src/msw/ctl3d/readme.txt
 create mode 100644 src/msw/ctl3d/wat32/import32.zip
 create mode 100644 src/msw/ctl3d/wat386/ctl3d.h
 create mode 100644 src/msw/ctl3d/wat386/ctl3d32.c
 create mode 100644 src/msw/ctl3d/wat386/ctl3d32.lnk
 create mode 100644 src/msw/ctl3d/wat386/ctl3d32.obj
 create mode 100644 src/msw/ctl3d/wat386/ctl3d32.txt
 create mode 100644 src/msw/ctl3d/wat386/makefile.wat
 create mode 100644 src/msw/ole/droptgt.cpp
 create mode 100644 src/msw/ole/oleutils.cpp
 create mode 100644 src/msw/ole/uuid.cpp
 create mode 100644 utils/nplugin/docs/notes.txt
 create mode 100644 utils/nplugin/lib/dummy
 create mode 100644 utils/nplugin/samples/gui/gui.cpp
 create mode 100644 utils/nplugin/samples/gui/gui.h
 create mode 100644 utils/nplugin/samples/gui/makefile.nt
 create mode 100644 utils/nplugin/samples/gui/npgui32.def
 create mode 100644 utils/nplugin/samples/gui/npgui32.rc
 create mode 100644 utils/nplugin/samples/simple/makefile.nt
 create mode 100644 utils/nplugin/samples/simple/npsimple32.def
 create mode 100644 utils/nplugin/samples/simple/npsimple32.rc
 create mode 100644 utils/nplugin/samples/simple/simple.cpp
 create mode 100644 utils/nplugin/src/makefile.nt
 create mode 100644 utils/nplugin/src/npapi.h
 create mode 100644 utils/nplugin/src/npapp.cpp
 create mode 100644 utils/nplugin/src/npapp.h
 create mode 100644 utils/nplugin/src/npframe.cpp
 create mode 100644 utils/nplugin/src/npframe.h
 create mode 100644 utils/nplugin/src/npshell.cpp
 create mode 100644 utils/nplugin/src/npupp.h
 create mode 100644 utils/nplugin/src/npwin.cpp

diff --git a/include/wx/msw/ctl3d/ctl3d.h b/include/wx/msw/ctl3d/ctl3d.h
new file mode 100644
index 0000000000..de7e67aa50
--- /dev/null
+++ b/include/wx/msw/ctl3d/ctl3d.h
@@ -0,0 +1,61 @@
+/*-----------------------------------------------------------------------
+|	CTL3D.DLL
+|	
+|	Adds 3d effects to Windows controls
+|
+|	See ctl3d.doc for info
+|		
+-----------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD);
+BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD);
+WORD WINAPI Ctl3dGetVer(void);
+BOOL WINAPI Ctl3dEnabled(void);
+HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG);	// ARCHAIC, use Ctl3dCtlColorEx
+HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam);
+BOOL WINAPI Ctl3dColorChange(void);
+BOOL WINAPI Ctl3dSubclassCtl(HWND);
+LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM);
+
+BOOL WINAPI Ctl3dAutoSubclass(HANDLE);
+
+BOOL WINAPI Ctl3dRegister(HANDLE);
+BOOL WINAPI Ctl3dUnregister(HANDLE);
+
+//begin DBCS: far east short cut key support
+VOID WINAPI Ctl3dWinIniChange(void);
+//end DBCS
+
+
+/* Ctl3dSubclassDlg3d flags */
+#define CTL3D_BUTTONS		0x0001
+#define CTL3D_LISTBOXES		0x0002		
+#define CTL3D_EDITS			0x0004	
+#define CTL3D_COMBOS			0x0008		
+#define CTL3D_STATICTEXTS	0x0010		
+#define CTL3D_STATICFRAMES	0x0020
+
+#define CTL3D_NODLGWINDOW       0x00010000
+#define CTL3D_ALL				0xffff
+
+#define WM_DLGBORDER (WM_USER+3567)
+/* WM_DLGBORDER *(int FAR *)lParam return codes */
+#define CTL3D_NOBORDER		0
+#define CTL3D_BORDER			1
+
+#define WM_DLGSUBCLASS (WM_USER+3568)
+/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */
+#define CTL3D_NOSUBCLASS	0
+#define CTL3D_SUBCLASS		1
+
+/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */
+#define CTL3D_3DCHECK 26567
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/wx/msw/ole/droptgt.h b/include/wx/msw/ole/droptgt.h
new file mode 100644
index 0000000000..518a39cd5c
--- /dev/null
+++ b/include/wx/msw/ole/droptgt.h
@@ -0,0 +1,113 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ole/droptgt.h
+// Purpose:     declaration of the wxDropTarget class
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     06.03.98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// prolog
+// ============================================================================
+#ifndef   _OLEDROPTGT_H
+#define   _OLEDROPTGT_H
+
+#ifdef __GNUG__
+#pragma interface "droptgt.h"
+#endif
+
+#if !USE_DRAG_AND_DROP
+  #error  "You should #define USE_DRAG_AND_DROP to 1 to compile this file!"
+#endif  //WX_DRAG_DROP
+
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+class  wxIDropTarget;
+struct IDataObject;
+
+typedef unsigned short wxDataFormat;
+
+// ----------------------------------------------------------------------------
+// An instance of the class wxDropTarget may be associated with any wxWindow
+// derived object via SetDropTarget() function. If this is done, the virtual
+// methods of wxDropTarget are called when something is dropped on the window.
+// 
+// Note that wxDropTarget is an abstract base class (ABC) and you should derive
+// your own class from it implementing pure virtual function in order to use it
+// (all of them, including protected ones which are called by the class itself)
+// ----------------------------------------------------------------------------
+class WXDLLEXPORT wxDropTarget
+{
+public:
+  // ctor & dtor
+  wxDropTarget();
+  virtual ~wxDropTarget();
+
+  // normally called by wxWindow on window creation/destruction, but might be
+  // called `manually' as well. Register() returns true on success.
+  bool Register(WXHWND hwnd);
+  void Revoke(WXHWND hwnd);
+
+  // do we accept this kind of data?
+  virtual bool IsAcceptedData(IDataObject *pIDataSource) const;
+
+  // called when mouse enters/leaves the window: might be used to give
+  // some visual feedback to the user
+  virtual void OnEnter() { }
+  virtual void OnLeave() { }
+
+  // this function is called when data is dropped.
+  // (x, y) are the coordinates of the drop
+  virtual bool OnDrop(long x, long y, const void *pData) = 0;
+
+protected:
+  // Override these to indicate what kind of data you support: the first
+  // format to which data can be converted is used. The classes below show
+  // how it can be done in the simplest cases.
+    // how many different (clipboard) formats do you support?
+  virtual size_t GetFormatCount() const = 0;
+    // return the n-th supported format
+  virtual wxDataFormat GetFormat(size_t n) const = 0;
+
+private:
+  wxIDropTarget    *m_pIDropTarget; // the pointer to COM interface
+};
+
+// ----------------------------------------------------------------------------
+// A simple wxDropTarget derived class for text data: you only need to
+// override OnDropText() to get something working
+// ----------------------------------------------------------------------------
+class WXDLLEXPORT wxTextDropTarget : public wxDropTarget
+{
+public:
+  virtual bool OnDrop(long x, long y, const void *pData);
+  virtual bool OnDropText(long x, long y, const char *psz) = 0;
+
+protected:
+  virtual size_t GetFormatCount() const;
+  virtual wxDataFormat GetFormat(size_t n) const;
+};
+
+// ----------------------------------------------------------------------------
+// A drop target which accepts files (dragged from File Manager or Explorer)
+// ----------------------------------------------------------------------------
+class WXDLLEXPORT wxFileDropTarget : public wxDropTarget
+{
+public:
+  virtual bool OnDrop(long x, long y, const void *pData);
+
+  // params: the number of files and the array of file names
+  virtual bool OnDropFiles(long x, long y, 
+                           size_t nFiles, const char * const aszFiles[]) = 0;
+
+protected:
+  virtual size_t GetFormatCount() const;
+  virtual wxDataFormat GetFormat(size_t n) const;
+};
+
+// ============================================================================
+#endif  //_OLEDROPTGT_H
\ No newline at end of file
diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h
new file mode 100644
index 0000000000..1430abbbe2
--- /dev/null
+++ b/include/wx/msw/ole/oleutils.h
@@ -0,0 +1,145 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        oleutils.h
+// Purpose:     OLE helper routines, OLE debugging support &c
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     19.02.1998
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef   _OLEUTILS_H
+#define   _OLEUTILS_H
+
+#ifdef __GNUG__
+#pragma interface "oleutils.h"
+#endif
+
+// ============================================================================
+// General purpose functions and macros
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// misc helper functions/macros
+// ----------------------------------------------------------------------------
+
+// release the interface pointer (if !NULL)
+inline void ReleaseInterface(IUnknown *pIUnk)
+{
+  if ( pIUnk != NULL )
+    pIUnk->Release();
+}
+
+// release the interface pointer (if !NULL) and make it NULL
+#define   RELEASE_AND_NULL(p)   if ( (p) != NULL ) { p->Release(); p = NULL; };
+
+// return TRUE if the iid is in the array
+bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
+
+// ============================================================================
+// IUnknown implementation helpers
+// ============================================================================
+
+/*
+   The most dumb implementation of IUnknown methods. We don't support 
+   aggregation nor containment, but for 99% of cases this simple
+   implementation is quite enough.
+
+   Usage is trivial: here is all you should have
+   1) DECLARE_IUNKNOWN_METHOS in your (IUnknown derived!) class declaration
+   2) BEGIN/END_IID_TABLE with ADD_IID in between for all interfaces you
+      support (at least all for which you intent to return 'this' from QI,
+      i.e. you should derive from IFoo if you have ADD_IID(Foo)) somewhere else
+   3) IMPLEMENT_IUNKNOWN_METHOS somewhere also
+
+   These macros are quite simple: AddRef and Release are trivial and QI does
+   lookup in a static member array of IIDs and returns 'this' if it founds
+   the requested interface in it or E_NOINTERFACE if not.
+ */
+
+// declare the methods and the member variable containing reference count
+// you must also define the ms_aIids array somewhere with BEGIN_IID_TABLE
+// and friends (see below)
+#define   DECLARE_IUNKNOWN_METHODS                                            \
+  public:                                                                     \
+    STDMETHODIMP          QueryInterface(REFIID, void **);                    \
+    STDMETHODIMP_(ULONG)  AddRef();                                           \
+    STDMETHODIMP_(ULONG)  Release();                                          \
+  private:                                                                    \
+    static  const IID    *ms_aIids[];                                         \
+    ULONG                 m_cRef
+
+// macros for declaring supported interfaces
+// NB: you should write ADD_INTERFACE(Foo) and not ADD_INTERFACE(IID_IFoo)!
+#define BEGIN_IID_TABLE(cname)  const IID *cname::ms_aIids[] = {
+#define ADD_IID(iid)                                             &IID_I##iid,
+#define END_IID_TABLE                                          }
+
+// implementation is as straightforward as possible
+// Parameter:  classname - the name of the class
+#define   IMPLEMENT_IUNKNOWN_METHODS(classname)                               \
+  STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv)             \
+  {                                                                           \
+    wxLogQueryInterface(#classname, riid);                                    \
+                                                                              \
+    if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) {                  \
+      *ppv = this;                                                            \
+      AddRef();                                                               \
+                                                                              \
+      return S_OK;                                                            \
+    }                                                                         \
+    else {                                                                    \
+      *ppv = NULL;                                                            \
+                                                                              \
+      return (HRESULT) E_NOINTERFACE;                                                   \
+    }                                                                         \
+  }                                                                           \
+                                                                              \
+  STDMETHODIMP_(ULONG) classname::AddRef()                                    \
+  {                                                                           \
+    wxLogAddRef(#classname, m_cRef);                                          \
+                                                                              \
+    return ++m_cRef;                                                          \
+  }                                                                           \
+                                                                              \
+  STDMETHODIMP_(ULONG) classname::Release()                                   \
+  {                                                                           \
+    wxLogRelease(#classname, m_cRef);                                         \
+                                                                              \
+    if ( --m_cRef == 0 ) {                                                    \
+      delete this;                                                            \
+      return 0;                                                               \
+    }                                                                         \
+    else                                                                      \
+      return m_cRef;                                                          \
+  }
+
+// ============================================================================
+// Debugging support
+// ============================================================================
+
+#ifdef  __DEBUG__
+
+// ----------------------------------------------------------------------------
+// 
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// All OLE specific log functions have DebugTrace level (as LogTrace)
+// ----------------------------------------------------------------------------
+
+// tries to translate riid into a symbolic name, if possible
+void wxLogQueryInterface(const char *szInterface, REFIID riid);
+
+// these functions print out the new value of reference counter
+void wxLogAddRef (const char *szInterface, ULONG cRef);
+void wxLogRelease(const char *szInterface, ULONG cRef);
+
+#else   //!DEBUG
+  #define   wxLogQueryInterface(szInterface, riid)
+  #define   wxLogAddRef(szInterface, cRef)
+  #define   wxLogRelease(szInterface, cRef)
+#endif  //DEBUG
+
+#endif  //_OLEUTILS_H
\ No newline at end of file
diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h
new file mode 100644
index 0000000000..a970267997
--- /dev/null
+++ b/include/wx/msw/ole/uuid.h
@@ -0,0 +1,91 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ole/uuid.h
+// Purpose:     encapsulates an UUID with some added helper functions
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     11.07.97
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+//
+// Notes:       you should link your project with RPCRT4.LIB!
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef   _OLEUUID_H
+#define   _OLEUUID_H
+
+#ifdef __GNUG__
+#pragma interface "uuid.h"
+#endif
+
+// ------------------------------------------------------------------
+// UUID (Universally Unique IDentifier) definition
+// ------------------------------------------------------------------
+
+// ----- taken from RPC.H
+#ifndef UUID_DEFINED            // in some cases RPC.H will be already
+  #ifdef  __WIN32__             // included, so avoid redefinition
+    typedef struct                
+    {
+      unsigned long   Data1;
+      unsigned short  Data2;
+      unsigned short  Data3;
+      unsigned char   Data4[8];
+    } UUID;                     // UUID = GUID = CLSID = LIBID = IID
+  #else   // WIN16
+    #error "Don't know about UUIDs on this platform"
+  #endif  // WIN32
+#endif  // UUID_DEFINED
+
+#ifndef GUID_DEFINED
+  typedef UUID GUID;
+  #define UUID_DEFINED          // prevent redefinition
+#endif  // GUID_DEFINED
+
+typedef unsigned char uchar;
+
+// ------------------------------------------------------------------
+// a class to store UUID and it's string representation
+// ------------------------------------------------------------------
+
+// uses RPC functions to create/convert Universally Unique Identifiers
+class Uuid
+{
+private:
+  UUID  m_uuid;
+  uchar *m_pszUuid;   // this string is alloc'd and freed by RPC 
+  char  *m_pszCForm;  // this string is allocated in Set/Create
+
+  void  UuidToCForm();
+
+  // function used to set initial state by all ctors
+  void  Init() { m_pszUuid = NULL; m_pszCForm = NULL; }
+
+public:
+  // ctors & dtor
+  Uuid()                 { Init();            }
+  Uuid(const char *pc)   { Init(); Set(pc);   }
+  Uuid(const UUID &uuid) { Init(); Set(uuid); }
+ ~Uuid();
+
+  // copy ctor and assignment operator needed for this class
+  Uuid(const Uuid& uuid);
+  Uuid& operator=(const Uuid& uuid);
+
+  // create a brand new UUID
+  void Create();
+
+  // set value of UUID 
+  bool Set(const char *pc);   // from a string, returns true if ok
+  void Set(const UUID& uuid); // from another UUID (never fails)
+
+  // accessors
+  operator const UUID*() const { return &m_uuid;             }
+  operator const char*() const { return (char *)(m_pszUuid); }
+
+  // return string representation of the UUID in the C form
+  // (as in DEFINE_GUID macro)
+  const char *CForm() const    { return m_pszCForm;          }
+};
+
+#endif    // _OLEUUID_H
\ No newline at end of file
diff --git a/samples/joytest/chart.ico b/samples/joytest/chart.ico
new file mode 100644
index 0000000000000000000000000000000000000000..16d4a585fd3246e7a8dc43c45e010c006e643dd6
GIT binary patch
literal 766
zcmc&wF%H5o40I7AQkYn&nArFNzsi_=qf@@p2UOx4jHOFdsgk)%D>cxHj+|r1*R$Ou
zA_c50k3u|mA}8!ucnQD53)v%zcxdbJ5TSTKZiq<XUh2ArplOLJGdPT&$QOt<gJWF=
zaFcbkE1dI<Xe+InHGQkUIKN=yPv-tkZ&>7qFu*Pe;O)q})Br9M@2fs2xG_OluNwM{
zcSECEB^`=VZ-!Clq`-NP$D|`q^P8EoNK<|GI(*Wt>lv#s7a1^aS#Q-v=NLJDsYfc-
TMvJ?z=wHXdA%Ehd{14;}SbUVL

literal 0
HcmV?d00001

diff --git a/samples/joytest/gun.wav b/samples/joytest/gun.wav
new file mode 100644
index 0000000000000000000000000000000000000000..8cb037d78d14fec09784deb03d1c225c5bf96f12
GIT binary patch
literal 26838
zcmeHvS#xB^l^!R;4}SJ9aQJy%JYk0&o(YFE;v!OP_6{`mwW<Krg4*|eFVw!E7665P
zX*9ag&0P|ykw|N-upj*3@DK9$oy=P(G})9!qGRU4$>^$EcgdT1mhXJ$WP%UgfA`)0
zwf5FqlRuq!$87ih+kf-cTW|dp{`+?mZ^^&Edh1`~jCpCr`>*i5i#u1Byi5E}{{IFE
zB;v7nJdsEwQ>k<YEuBi?q_lWE9*cy-;YcKw$mEN~LN1HTyoxLFSS%U|1_FT)t|s|x
zHk-@ki{*NwoKGiHnS7<)8}z!JR-;zgD&g65G9HbDL&1RG=k++P=H-ROWz(9~;qv;?
zN2=H!9`4j4)^&HPbAC14iu(ON$HrzLmPi*n$44dWg2@xlWbpoUuH3(T^>olEm-3mI
z&zCA?V}9H82k+jUSzWW*?3?azX|PxFID*CAu;19qr4!!8dk<G#;bbNraQoxAO0zrI
z={Cx_OcvwL<v6rxIEaC{T`rfyGW+oH!iEO}4Mq~_T%lBH_78^5Ql+)sAMEVz?(Q9&
zoL@eB_U!WM`RVb&ZhyOlITmu6WGv)!J8U-V#yXmLY3k0~@7$f+@CBWw`K2|7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(@G0nL7QtbfUw*Is@5=j~C-uiH1g=@&-yrb}bzzo+|u%BiuQ#t->sEs^ol
zJpN%p{qZ~W^S1$XgrKkW{`$*re*aS@`5oAJ^TRhU__2>Lvmd+5f3f|&LB9X5$NK{g
zKYI0R2KJZ!9QCUX-Z1e$=k#km|Cm4j(n){!dHMT?A9IL*BwGC`0)5kPzB~Fq*E1Po
tzSG|H+JDCLGUFd#MgNR5`WN)-?-;=7#E(Bn{5ALwG+zAi-^m`|`oHdJTl4?`

literal 0
HcmV?d00001

diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp
new file mode 100644
index 0000000000..6ec7c6fa53
--- /dev/null
+++ b/samples/joytest/joytest.cpp
@@ -0,0 +1,171 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        joytest.cpp
+// Purpose:     Joystick sample
+// Author:      Julian Smart
+// Modified by:
+// Created:     04/01/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart and Markus Holzem
+// Licence:   	wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include <wx/msw/wave.h>
+#include <wx/msw/joystick.h>
+
+#include "joytest.h"
+
+MyFrame *frame = NULL;
+
+IMPLEMENT_APP(MyApp)
+
+// For drawing lines in a canvas
+long xpos = -1;
+long ypos = -1;
+
+int winNumber = 1;
+
+// Initialise this in OnInit, not statically
+bool MyApp::OnInit(void)
+{
+  wxJoystick stick(wxJOYSTICK1);
+  if (!stick.IsOk())
+  {
+    wxMessageBox("No joystick detected!");
+    return FALSE;
+  }
+  m_fire.Create("gun.wav");
+
+  m_maxX = stick.GetXMax();
+  m_maxY = stick.GetYMax();
+
+  // Create the main frame window
+
+  frame = new MyFrame(NULL, "Joystick Demo", wxPoint(0, 0), wxSize(500, 400),
+   wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL);
+
+  // Give it an icon (this is ignored in MDI mode: uses resources)
+#ifdef __WINDOWS__
+  frame->SetIcon(wxIcon("joyicon"));
+#endif
+#ifdef __X__
+  frame->SetIcon(wxIcon("joyicon.xbm"));
+#endif
+
+  // Make a menubar
+  wxMenu *file_menu = new wxMenu;
+
+  file_menu->Append(JOYTEST_QUIT, "&Exit");
+
+  wxMenu *help_menu = new wxMenu;
+  help_menu->Append(JOYTEST_ABOUT, "&About");
+
+  wxMenuBar *menu_bar = new wxMenuBar;
+
+  menu_bar->Append(file_menu, "&File");
+  menu_bar->Append(help_menu, "&Help");
+
+  // Associate the menu bar with the frame
+  frame->SetMenuBar(menu_bar);
+
+  frame->CreateStatusBar();
+
+  frame->Show(TRUE);
+
+  SetTopWindow(frame);
+
+  return TRUE;
+}
+
+BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
+	EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
+END_EVENT_TABLE()
+
+// Define a constructor for my canvas
+MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size):
+ wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER)
+{
+    wxJoystick joystick(wxJOYSTICK1);
+    joystick.SetCapture(this);
+}
+
+MyCanvas::~MyCanvas(void)
+{
+    wxJoystick joystick(wxJOYSTICK1);
+    joystick.ReleaseCapture();
+}
+
+void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
+{
+  wxClientDC dc(this);
+
+  wxPoint pt(event.GetPosition());
+
+  // Scale to canvas size
+  int cw, ch;
+  GetSize(&cw, &ch);
+
+  pt.x = (long) (((double)pt.x/(double)wxGetApp().m_maxX) * cw);
+  pt.y = (long) (((double)pt.y/(double)wxGetApp().m_maxY) * ch);
+
+  if (xpos > -1 && ypos > -1 && event.IsMove() && event.ButtonIsDown())
+  {
+    dc.SetPen(*wxBLACK_PEN);
+    dc.DrawLine(xpos, ypos, pt.x, pt.y);
+  }
+  xpos = pt.x;
+  ypos = pt.y;
+
+  char buf[100];
+  if (event.ButtonDown())
+    sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y);
+  else
+    sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y);
+  frame->SetStatusText(buf);
+
+  if (event.ButtonDown() && wxGetApp().m_fire.IsOk())
+  {
+    wxGetApp().m_fire.Play();
+  }
+}
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+  EVT_MENU(JOYTEST_QUIT, MyFrame::OnQuit)
+END_EVENT_TABLE()
+
+MyFrame::MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
+const long style):
+  wxFrame(parent, -1, title, pos, size, style)
+{
+  canvas = new MyCanvas(this);
+}
+
+MyFrame::~MyFrame(void)
+{
+}
+
+void MyFrame::OnQuit(wxCommandEvent& event)
+{
+      Close(TRUE);
+}
+
+void MyFrame::OnActivate(wxActivateEvent& event)
+{
+  if (event.GetActive() && canvas)
+    canvas->SetFocus();
+}
+
+bool MyFrame::OnClose(void)
+{
+  return TRUE;
+}
\ No newline at end of file
diff --git a/samples/joytest/joytest.def b/samples/joytest/joytest.def
new file mode 100644
index 0000000000..501f2b229a
--- /dev/null
+++ b/samples/joytest/joytest.def
@@ -0,0 +1,8 @@
+NAME         Joytest
+DESCRIPTION  'Joystick Test Program'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     6000
+STACKSIZE    48000
diff --git a/samples/joytest/joytest.h b/samples/joytest/joytest.h
new file mode 100644
index 0000000000..68c4f68075
--- /dev/null
+++ b/samples/joytest/joytest.h
@@ -0,0 +1,51 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        joytest.cpp
+// Purpose:     Joystick sample
+// Author:      Julian Smart
+// Modified by:
+// Created:     04/01/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart and Markus Holzem
+// Licence:   	wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// Define a new application
+class MyApp: public wxApp
+{
+  public:
+    bool OnInit(void);
+
+    // Joystick max values
+    int     m_maxX;
+    int     m_maxY;
+
+    wxWave  m_fire;
+};
+
+DECLARE_APP(MyApp)
+
+class MyCanvas: public wxScrolledWindow
+{
+  public:
+    MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
+    ~MyCanvas(void);
+    void OnJoystickEvent(wxJoystickEvent& event);
+
+    DECLARE_EVENT_TABLE()
+};
+
+class MyFrame: public wxFrame
+{
+  public:
+    MyCanvas *canvas;
+    MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
+    ~MyFrame(void);
+    bool OnClose(void);
+    void OnActivate(wxActivateEvent& event);
+    void OnQuit(wxCommandEvent& event);
+
+DECLARE_EVENT_TABLE()
+};
+
+#define JOYTEST_QUIT        1
+#define JOYTEST_ABOUT       2
diff --git a/samples/joytest/joytest.ico b/samples/joytest/joytest.ico
new file mode 100644
index 0000000000000000000000000000000000000000..2dc1bde40cf921731fb2f7c6534054c6fb8d96d1
GIT binary patch
literal 766
zcmah{IgY|W5G*e%tq=i3o32BCvHXmAf>Zy(`6TlchZ{QF05Mc`&y2+((WbBJ>H`DN
z@#*^mB!3^kH~o>?Q%}?mpR_<=?X?6JSqZ@%EkkNRN{NMRALOiv%14mQONo@Vuu~f2
zR1r@bqoxHgHqbgO7{>y8VLOh4a849H4Zzj{FAJP(g5{I-n)O_*F$%SIE3<<+Nj^dZ
zMrsmnqFCH}{&VhK#xlN*^s!HQyVC2cT_ZcBoK?PWy+p6H9A{2%_%Scn3ie-MC5TR`
zfM>p<u^XdS?|okOIfpJ^f%66U{Re&)U_S$23D`&j|AJNVMk-G}mHwHtG*h#+L%Xz7
FyKkN>7Bv6>

literal 0
HcmV?d00001

diff --git a/samples/joytest/joytest.rc b/samples/joytest/joytest.rc
new file mode 100644
index 0000000000..8138605789
--- /dev/null
+++ b/samples/joytest/joytest.rc
@@ -0,0 +1,5 @@
+aaaa                    ICON    "mondrian.ico"
+joyicon                 ICON    "mondrian.ico"
+
+#include "wx/msw/wx.rc"
+
diff --git a/samples/joytest/makefile.b32 b/samples/joytest/makefile.b32
new file mode 100644
index 0000000000..d889d44cee
--- /dev/null
+++ b/samples/joytest/makefile.b32
@@ -0,0 +1,64 @@
+#
+# File:		makefile.b32
+# Author:	Patrick Halke
+# Created:	1995
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds 32bit MDI example.
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXLIBDIR = $(WXDIR)\lib
+WXLIB = $(WXLIBDIR)\wx32.lib
+LIBS=$(WXLIB) cw32 import32
+
+TARGET=joytest
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = joytest.obj
+
+$(TARGET).exe:	$(OBJECTS) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+joytest.obj:      joytest.$(SRCSUFF) joytest.h
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
+
+
diff --git a/samples/joytest/makefile.bcc b/samples/joytest/makefile.bcc
new file mode 100644
index 0000000000..230ea4abbe
--- /dev/null
+++ b/samples/joytest/makefile.bcc
@@ -0,0 +1,75 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds joytest example (DOS).
+
+!if "$(BCCDIR)" == ""
+!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
+!endif
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makebcc.env
+
+THISDIR = $(WXDIR)\samples\joytest
+WXLIB = $(WXDIR)\lib\wx.lib
+LIBS=$(WXLIB) mathwl cwl import
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+CFG=$(WXDIR)\src\wxwin.cfg
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+HEADERS = joytest.h
+SOURCES = joytest.$(SRCSUFF)
+OBJECTS = joytest.obj
+
+joytest:    joytest.exe
+
+all:    joytest.exe
+
+joytest.exe:      $(WXLIB) joytest.obj joytest.def joytest.res
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj joytest.obj
+joytest
+nul
+$(LIBS)
+joytest.def
+!
+        rc -30 -K joytest.res
+
+.$(SRCSUFF).obj:
+	bcc $(CPPFLAGS) -c {$< }
+
+joytest.obj:      joytest.$(SRCSUFF)
+
+joytest.res :      joytest.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa joytest
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
diff --git a/samples/joytest/makefile.dos b/samples/joytest/makefile.dos
new file mode 100644
index 0000000000..b2ddbcf9f5
--- /dev/null
+++ b/samples/joytest/makefile.dos
@@ -0,0 +1,63 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds joytest example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+THISDIR = $(WXDIR)\samples\joytest
+INC=/I$(WXDIR)\include
+
+HEADERS = joytest.h
+SOURCES = joytest.$(SRCSUFF)
+OBJECTS = joytest.obj
+
+all:    joytest.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+
+joytest.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) joytest.obj joytest.def joytest.res
+        link $(LINKFLAGS) @<<
+$(WXDIR)\src\msw\dummy.obj joytest.obj,
+joytest,
+NUL,
+$(LIBS),
+joytest.def
+;
+<<
+        rc -K joytest.res
+
+joytest.obj:      joytest.h joytest.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+joytest.res :      joytest.rc $(WXDIR)\include\wx\msw\wx.rc
+    rc -r /i$(WXDIR)\include joytest
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/joytest/makefile.g95 b/samples/joytest/makefile.g95
new file mode 100644
index 0000000000..8eef77f7cf
--- /dev/null
+++ b/samples/joytest/makefile.g95
@@ -0,0 +1,35 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for joytest example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/makeg95.env
+
+OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF) $(OBJDIR)/joytest_resources.$(OBJSUFF)
+
+all:    $(OBJDIR) joytest$(GUISUFFIX)
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+joytest$(GUISUFFIX): $(OBJECTS) $(WXLIB)
+	$(CC) $(LDFLAGS) -o joytest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
+
+$(OBJDIR)/joytest.$(OBJSUFF):        joytest.$(SRCSUFF) joytest.h
+	$(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF)
+
+$(OBJDIR)/joytest_resources.o:  joytest.rc
+	$(RESCOMP) -i joytest.rc -o $(OBJDIR)/joytest_resources.o $(RESFLAGS)
+
+clean:
+	rm -f $(OBJECTS) joytest$(GUISUFFIX).exe core *.res *.rsc
diff --git a/samples/joytest/makefile.nt b/samples/joytest/makefile.nt
new file mode 100644
index 0000000000..ca7ec0c46a
--- /dev/null
+++ b/samples/joytest/makefile.nt
@@ -0,0 +1,63 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds joytest example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+WXUSINGDLL=0
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\joytest
+PROGRAM=joytest
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/joytest/makefile.sc b/samples/joytest/makefile.sc
new file mode 100644
index 0000000000..bcdcb11d54
--- /dev/null
+++ b/samples/joytest/makefile.sc
@@ -0,0 +1,37 @@
+;    Last change:  JS   12 Apr 98   10:45 am
+# Symantec C++ makefile for joytest example
+# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makesc.env
+
+WXLIB = $(WXDIR)\lib\wx.lib
+INCDIR = $(WXDIR)\include
+MSWINC = $(INCDIR)\msw
+BASEINC = $(INCDIR)\base
+
+CC=sc
+RC=rc
+CFLAGS = -o -ml -W -Dwx_msw
+LDFLAGS = -ml -W
+
+INCLUDE=$(BASEINC);$(MSWINC)
+
+LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
+
+.$(SRCSUFF).obj:
+	*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
+
+.rc.res:
+	*$(RC) -r -I$(INCLUDE) $<
+
+joytest.exe: joytest.obj joytest.def joytest.res
+	*$(CC) $(LDFLAGS) -o$@ joytest.obj joytest.def $(LIBS)
+	*$(RC) -k joytest.res
+
+clean:
+        -del *.obj
+	-del *.exe
+	-del *.res
+	-del *.map
+	-del *.rws
diff --git a/samples/joytest/makefile.unx b/samples/joytest/makefile.unx
new file mode 100644
index 0000000000..c4156423ac
--- /dev/null
+++ b/samples/joytest/makefile.unx
@@ -0,0 +1,55 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for joytest example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/make.env
+
+OBJECTS = $(OBJDIR)/joytest.$(OBJSUFF)
+
+.SUFFIXES:
+
+all:    $(OBJDIR) joytest$(GUISUFFIX)
+
+wx:
+#	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx
+motif:
+	$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
+
+xview:
+	$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
+
+hp:
+	$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
+         XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+joytest$(GUISUFFIX): $(OBJDIR)/joytest.$(OBJSUFF) $(WXLIB)
+	$(CC) $(LDFLAGS) -o joytest$(GUISUFFIX) $(OBJDIR)/joytest.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
+
+$(OBJDIR)/joytest.$(OBJSUFF):        joytest.$(SRCSUFF) joytest.h
+	$(CC) -c $(CPPFLAGS) -o $@ joytest.$(SRCSUFF)
+
+clean_motif:
+	$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
+
+clean_ol:
+	$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
+
+clean_hp:
+	$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
+
+cleanany:
+	rm -f $(OBJECTS) joytest$(GUISUFFIX) core
diff --git a/samples/joytest/makefile.wat b/samples/joytest/makefile.wat
new file mode 100644
index 0000000000..d009dcb6a8
--- /dev/null
+++ b/samples/joytest/makefile.wat
@@ -0,0 +1,43 @@
+#
+# Makefile for WATCOM
+#
+# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
+# 8 Nov 1994
+#
+
+WXDIR = ..\.. 
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB = $(WXDIR)\lib
+NAME = joytest
+LNK = $(name).lnk
+OBJS = $(name).obj
+
+all:    $(name).exe
+
+$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
+    wlink @$(LNK)
+    $(BINDCOMMAND) $(name).res
+
+$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
+     $(RC) $(RESFLAGS1) $(name).rc
+
+$(LNK) : makefile.wat
+    %create $(LNK)
+    @%append $(LNK) debug all
+    @%append $(LNK) system $(LINKOPTION)
+    @%append $(LNK) $(MINDATA)
+    @%append $(LNK) $(MAXDATA)
+    @%append $(LNK) $(STACK)
+    @%append $(LNK) name $(name)
+    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
+    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
+    @for %i in ($(OBJS)) do @%append $(LNK) file %i
+
+thing: .SYMBOLIC
+    echo $(WATLIBDIR)
+
+clean:   .SYMBOLIC
+    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
+
diff --git a/samples/joytest/mondrian.ico b/samples/joytest/mondrian.ico
new file mode 100644
index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53
GIT binary patch
literal 766
zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Z<M**w4TKL=5})Lnt5#WHKB$
zaDbtqp#doIAB-6O{|B*v7zjZ^AOa2W|NsACHyAJ}De?dRKnp(HN~rljcR;{k;{zQE
i@;}UZ|9Q?Fpp*~yJCwmWbLIrN`9Qm9%}2L?p!oo$cZ4ed

literal 0
HcmV?d00001

diff --git a/samples/mfc/makefile.b32 b/samples/mfc/makefile.b32
new file mode 100644
index 0000000000..9f0993827d
--- /dev/null
+++ b/samples/mfc/makefile.b32
@@ -0,0 +1,71 @@
+#
+# File:		makefile.bcc
+# Author:       Andre Beltman
+# Created:      1995
+# Updated:	
+# Copyright:    (c) 1995, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds mfc example (DOS).
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXLIBDIR = $(WXDIR)\lib
+WXINC = $(WXDIR)\include\msw
+WXBASESRC = $(WXDIR)\src\base
+WXBASEINC = $(WXDIR)\include\base
+WXLIB = $(WXLIBDIR)\wx32.lib
+FAFALIB = $(WXLIBDIR)\fafa.lib
+ITSYLIB = $(WXLIBDIR)\itsy.lib
+XPMLIB = $(WXLIBDIR)\xpm.lib
+DIBLIB = $(WXLIBDIR)\dib.lib
+GAUGELIB = $(WXLIBDIR)\gauge.lib
+WXTREELIB = $(WXLIBDIR)\wxtree.lib
+RCPARSERLIB = $(WXLIBDIR)\rcparser.lib
+PROLOGLIB = $(WXLIBDIR)\prologio.lib
+LIBS=$(WXLIB) cw32 import32 ctl3d32 $(FAFALIB) $(ITSYLIB) $(DIBLIB)\
+  $(XPMLIB) $(PROLOGLIB) $(RCPARSERLIB) $(GAUGELIB) $(WXTREELIB)
+
+TARGET=hello
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = hello.obj
+
+$(TARGET).exe:	$(OBJECTS) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+hello.obj:      hello.$(SRCSUFF)
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\msw\wx.rc
+    brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa $(TARGET)
+
+clean:
+        -erase *.obj *.exe *.res *.map *.rws
+
diff --git a/samples/mfc/makefile.bcc b/samples/mfc/makefile.bcc
new file mode 100644
index 0000000000..6e2059d571
--- /dev/null
+++ b/samples/mfc/makefile.bcc
@@ -0,0 +1,76 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds mfc example (DOS).
+
+!if "$(BCCDIR)" == ""
+!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
+!endif
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makebcc.env
+
+THISDIR = $(WXDIR)\samples\mfc
+WXLIB = $(WXDIR)\lib\wx.lib
+
+LIBS=$(WXLIB) mathwl cwl import
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+CFG=$(WXDIR)\src\wxwin.cfg
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+HEADERS = hello.h
+SOURCES = hello.$(SRCSUFF)
+OBJECTS = hello.obj
+
+hello:    hello.exe
+
+all:    hello.exe
+
+hello.exe:      $(WXLIB) hello.obj hello.def hello.res
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj hello.obj
+hello
+nul
+$(LIBS)
+hello.def
+!
+        rc -30 -K hello.res
+
+.$(SRCSUFF).obj:
+	bcc $(CPPFLAGS) -c {$< }
+
+hello.obj:      hello.$(SRCSUFF)
+
+hello.res :      hello.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa hello
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
diff --git a/samples/mfc/makefile.dos b/samples/mfc/makefile.dos
new file mode 100644
index 0000000000..93934fd12a
--- /dev/null
+++ b/samples/mfc/makefile.dos
@@ -0,0 +1,89 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds MFC compatibility example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info.
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+THISDIR = $(WXDIR)\samples\mfc
+WXLIB = $(WXDIR)\lib\wx.lib
+MFCINC = c:\msvc\mfc\include
+LIBS=lafxcwD $(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem  # mfcoleui compobj storage ole2 ole2disp
+#LIBS=lafxcwD llibcew libw commdlg shell
+INC=-I$(MFCINC) -I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+DUMMY=$(WXDIR)\src\msw\dummy.obj
+
+# Set this to nothing if using MS C++ 7
+ZOPTION=/Z7
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+PRECOMP = # /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch
+
+!if "$(FINAL)" == "0"
+CPPFLAGS=/D_DEBUG /AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw
+#CPPFLAGS=/AL /Zp /GA /G2 /Gyf /Od /W3 $(INC) /D_DEBUG
+LINKFLAGS=/NOD /CO /NOE /ONERROR:NOEXE /SEG:256 /STACK:12000
+!else
+CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw
+LINKFLAGS=/NOD /NOE /ONERROR:NOEXE /SEG:256
+!endif
+
+HEADERS = hello.h
+SOURCES = hello.$(SRCSUFF)
+OBJECTS = hello.obj
+
+hello:    hello.exe
+
+all:    wx hello.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+
+hello.exe:      $(DUMMY) $(WXLIB) hello.obj hello.def hello.res
+        link $(LINKFLAGS) @<<
+$(DUMMY) hello.obj,
+hello,
+NUL,
+$(LIBS),
+hello.def
+;
+<<
+        rc -31 -K hello.res
+
+hello.obj:      hello.h hello.$(SRCSUFF) $(DUMMY)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+hello.res :      hello.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(MFCINC) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa hello
+
+clean:
+        -erase *.obj
+        -erase *.sbr
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.pdb
diff --git a/samples/mfc/makefile.nt b/samples/mfc/makefile.nt
new file mode 100644
index 0000000000..3564096b50
--- /dev/null
+++ b/samples/mfc/makefile.nt
@@ -0,0 +1,66 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds MFC/wxWin example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+EXTRALIBS=# mfc42.lib
+EXTRAINC=-Ig:\DevStudio\mfc\include
+EXTRAFLAGS=/D_AFXDLL
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\mfc
+PROGRAM=mfctest
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+clean:
+        -erase *.obj
+        -erase *.sbr
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.pdb
+
diff --git a/samples/mfc/makefile.wat b/samples/mfc/makefile.wat
new file mode 100644
index 0000000000..0958ed9530
--- /dev/null
+++ b/samples/mfc/makefile.wat
@@ -0,0 +1,47 @@
+#
+# Makefile for WATCOM
+#
+# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
+# 8 Nov 1994
+#
+
+WXDIR = ..\.. 
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB = $(WXDIR)\lib
+NAME = hello
+LNK = $(name).lnk
+OBJS = $(name).obj 
+
+# Required for multi-threaded MFC apps
+EXTRACPPFLAGS = -bm -oaxt-zp4-ei-xs-zo-w3-bm-bt=nt -d_WINDOWS -d_MBCS
+refmain = _wstart2_
+
+
+PRECOMP=
+
+all:    $(name).exe
+
+$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
+    wlink @$(LNK)
+    $(BINDCOMMAND) -d_MBCS $(name).res
+
+$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
+     $(RC) $(RESFLAGS1) $(name).rc
+
+$(LNK) : makefile.wat
+    %create $(LNK)
+    @%append $(LNK) debug all
+    @%append $(LNK) system $(LINKOPTION)
+    @%append $(LNK) $(MINDATA)
+    @%append $(LNK) $(MAXDATA)
+    @%append $(LNK) $(STACK)
+    @%append $(LNK) name $(name)
+    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
+    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
+    @for %i in ($(OBJS)) do @%append $(LNK) file %i
+
+clean:   .SYMBOLIC
+    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
+
diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp
new file mode 100644
index 0000000000..cbbcd343c2
--- /dev/null
+++ b/samples/mfc/mfctest.cpp
@@ -0,0 +1,408 @@
+// hello.cpp : Defines the class behaviors for the application.
+//           Hello is a simple program which consists of a main window
+//           and an "About" dialog which can be invoked by a menu choice.
+//           It is intended to serve as a starting-point for new
+//           applications.
+//
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) 1992 Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and Microsoft
+// WinHelp documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+
+// *** MODIFIED BY JULIAN SMART TO DEMONSTRATE CO-EXISTANCE WITH wxWINDOWS ***
+//
+// This sample pops up an initial wxWindows frame, with a menu item
+// that allows a new MFC window to be created. Note that CDummyWindow
+// is a class that allows a wxWindows window to be seen as a CWnd
+// for the purposes of specifying a valid main window to the
+// MFC initialisation.
+//
+// You can easily modify this code so that an MFC window pops up
+// initially as the main frame, and allows wxWindows frames to be
+// created subsequently:
+//
+// (1) Make MyApp::OnInit return NULL, not create a window.
+// (2) Restore the MFC code to create a window in InitInstance, and remove
+//     creation of CDummyWindow.
+//
+// IMPORTANT NOTE: to compile this sample, you must first edit
+// wx/src/msw/wx_main.cc, set NOWINMAIN to 1, and remake wxWindows
+// (it only needs to recompile wx_main.cc).
+// This eliminates the duplicate WinMain function which MFC implements.
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#ifdef new
+#undef new
+#endif
+
+#include "stdafx.h"
+
+#ifdef DrawText
+#undef DrawText
+#endif
+
+#include "resource.h"
+
+#include "mfctest.h"
+
+#include "wx/wx.h"
+
+/////////////////////////////////////////////////////////////////////////////
+
+// theApp:
+// Just creating this application object runs the whole application.
+//
+CTheApp theApp;
+
+// wxWindows elements
+
+// Define a new application type
+class MyApp: public wxApp
+{ public:
+    bool OnInit(void);
+    wxFrame *CreateFrame(void);
+ };
+
+DECLARE_APP(MyApp)
+
+class MyCanvas: public wxScrolledWindow
+{
+  public:
+    MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
+    void OnPaint(wxPaintEvent& event);
+    void OnMouseEvent(wxMouseEvent& event);
+DECLARE_EVENT_TABLE()
+};
+
+class MyChild: public wxFrame
+{
+  public:
+    MyCanvas *canvas;
+    MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
+    ~MyChild(void);
+    Bool OnClose(void);
+
+    void OnQuit(wxCommandEvent& event);
+    void OnNew(wxCommandEvent& event);
+    void OnActivate(wxActivateEvent& event);
+
+DECLARE_EVENT_TABLE()
+};
+
+// For drawing lines in a canvas
+long xpos = -1;
+long ypos = -1;
+
+// Initialise this in OnInit, not statically
+wxPen *red_pen;
+wxFont *small_font;
+
+// ID for the menu quit command
+#define HELLO_QUIT 1
+#define HELLO_NEW  2
+
+DECLARE_APP(MyApp)
+IMPLEMENT_APP(MyApp)
+
+/////////////////////////////////////////////////////////////////////////////
+
+// CMainWindow constructor:
+// Create the window with the appropriate style, size, menu, etc.
+//
+CMainWindow::CMainWindow()
+{
+	LoadAccelTable( "MainAccelTable" );
+	Create( NULL, "Hello Foundation Application",
+		WS_OVERLAPPEDWINDOW, rectDefault, NULL, "MainMenu" );
+}
+
+// OnPaint:
+// This routine draws the string "Hello, Windows!" in the center of the
+// client area.  It is called whenever Windows sends a WM_PAINT message.
+// Note that creating a CPaintDC automatically does a BeginPaint and
+// an EndPaint call is done when it is destroyed at the end of this
+// function.  CPaintDC's constructor needs the window (this).
+//
+void CMainWindow::OnPaint()
+{
+	CString s = "Hello, Windows!";
+	CPaintDC dc( this );
+	CRect rect;
+
+	GetClientRect( rect );
+	dc.SetTextAlign( TA_BASELINE | TA_CENTER );
+	dc.SetTextColor( ::GetSysColor( COLOR_WINDOWTEXT ) );
+	dc.SetBkMode(TRANSPARENT);
+	dc.TextOut( ( rect.right / 2 ), ( rect.bottom / 2 ),
+				s, s.GetLength() );
+}
+
+// OnAbout:
+// This member function is called when a WM_COMMAND message with an
+// IDM_ABOUT code is received by the CMainWindow class object.  The
+// message map below is responsible for this routing.
+//
+// We create a ClDialog object using the "AboutBox" resource (see
+// hello.rc), and invoke it.
+//
+void CMainWindow::OnAbout()
+{
+	CDialog about( "AboutBox", this );
+	about.DoModal();
+}
+
+void CMainWindow::OnTest()
+{
+  wxMessageBox("This is a wxWindows message box.\nWe're about to create a new wxWindows frame.", "wxWindows", wxOK);
+  wxGetApp().CreateFrame();
+}
+
+// CMainWindow message map:
+// Associate messages with member functions.
+//
+// It is implied that the ON_WM_PAINT macro expects a member function
+// "void OnPaint()".
+//
+// It is implied that members connected with the ON_COMMAND macro
+// receive no arguments and are void of return type, e.g., "void OnAbout()".
+//
+BEGIN_MESSAGE_MAP( CMainWindow, CFrameWnd )
+	//{{AFX_MSG_MAP( CMainWindow )
+	ON_WM_PAINT()
+	ON_COMMAND( IDM_ABOUT, OnAbout )
+	ON_COMMAND( IDM_TEST, OnTest )
+	//}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CTheApp
+
+// InitInstance:
+// When any CTheApp object is created, this member function is automatically
+// called.  Any data may be set up at this point.
+//
+// Also, the main window of the application should be created and shown here.
+// Return TRUE if the initialization is successful.
+//
+BOOL CTheApp::InitInstance()
+{
+	TRACE( "HELLO WORLD\n" );
+
+	SetDialogBkColor();     // hook gray dialogs (was default in MFC V1)
+
+    wxEntry((WXHINSTANCE) m_hInstance, (WXHINSTANCE) m_hPrevInstance, m_lpCmdLine, m_nCmdShow, FALSE);
+
+/*
+	m_pMainWnd = new CMainWindow();
+	m_pMainWnd->ShowWindow( m_nCmdShow );
+	m_pMainWnd->UpdateWindow();
+*/
+
+    if (wxTheApp && wxTheApp->GetTopWindow())
+    {
+        m_pMainWnd = new CDummyWindow((HWND) wxTheApp->GetTopWindow()->GetHWND());
+    }
+
+	return TRUE;
+}
+
+int CTheApp::ExitInstance()
+{
+  wxApp::CleanUp();
+
+  return CWinApp::ExitInstance();
+}
+
+// Override this to provide wxWindows message loop
+// compatibility
+
+BOOL CTheApp::PreTranslateMessage(MSG *msg)
+{
+  if (wxTheApp && wxTheApp->ProcessMessage((WXMSG*) msg))
+    return TRUE;
+  else
+    return CWinApp::PreTranslateMessage(msg);
+}
+
+BOOL CTheApp::OnIdle(LONG lCount)
+{
+    if (wxTheApp)
+        return wxTheApp->ProcessIdle();
+    else
+        return FALSE;
+}
+
+/*********************************************************************
+ * wxWindows elements
+ ********************************************************************/
+ 
+bool MyApp::OnInit(void)
+{
+  // Don't exit app when the top level frame is deleted
+//  SetExitOnFrameDelete(FALSE);
+  
+  // Create a red pen
+  red_pen = new wxPen("RED", 3, wxSOLID);
+
+  // Create a small font
+  small_font = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL);
+
+  wxFrame* frame = CreateFrame();
+  return TRUE;
+}
+
+wxFrame *MyApp::CreateFrame(void)
+{
+      MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300),
+                             wxDEFAULT_FRAME);
+
+      subframe->SetTitle("wxWindows canvas frame");
+
+      // Give it a status line
+      subframe->CreateStatusBar();
+
+      // Make a menubar
+      wxMenu *file_menu = new wxMenu;
+
+      file_menu->Append(HELLO_NEW, "&New MFC Window");
+      file_menu->Append(HELLO_QUIT, "&Close");
+
+      wxMenuBar *menu_bar = new wxMenuBar;
+
+      menu_bar->Append(file_menu, "&File");
+
+      // Associate the menu bar with the frame
+      subframe->SetMenuBar(menu_bar);
+
+      int width, height;
+      subframe->GetClientSize(&width, &height);
+
+      MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height));
+      wxCursor *cursor = new wxCursor(wxCURSOR_PENCIL);
+      canvas->SetCursor(cursor);
+      subframe->canvas = canvas;
+
+      // Give it scrollbars
+//      canvas->SetScrollbars(20, 20, 50, 50, 4, 4);
+
+      subframe->Show(TRUE);
+      // Return the main frame window
+      return subframe;
+}
+
+BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
+    EVT_PAINT(MyCanvas::OnPaint)
+    EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
+END_EVENT_TABLE()
+
+// Define a constructor for my canvas
+MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size):
+ wxScrolledWindow(parent, -1, pos, size)
+{
+}
+
+// Define the repainting behaviour
+void MyCanvas::OnPaint(wxPaintEvent& event)
+{
+    wxPaintDC dc(this);
+
+    dc.SetFont(small_font);
+    dc.SetPen(wxGREEN_PEN);
+    dc.DrawLine(0, 0, 200, 200);
+    dc.DrawLine(200, 0, 0, 200);
+
+    dc.SetBrush(wxCYAN_BRUSH);
+    dc.SetPen(wxRED_PEN);
+    dc.DrawRectangle(100, 100, 100, 50);
+    dc.DrawRoundedRectangle(150, 150, 100, 50, 20);
+
+    dc.DrawEllipse(250, 250, 100, 50);
+    dc.DrawSpline(50, 200, 50, 100, 200, 10);
+    dc.DrawLine(50, 230, 200, 230);
+    dc.DrawText("This is a test string", 50, 230);
+}
+
+// This implements a tiny doodling program! Drag the mouse using
+// the left button.
+void MyCanvas::OnMouseEvent(wxMouseEvent& event)
+{
+    wxClientDC dc(this);
+    dc.SetPen(wxBLACK_PEN);
+    long x, y;
+    event.Position(&x, &y);
+    if (xpos > -1 && ypos > -1 && event.Dragging())
+    {
+        dc.DrawLine(xpos, ypos, x, y);
+    }
+    xpos = x;
+    ypos = y;
+}
+
+BEGIN_EVENT_TABLE(MyChild, wxFrame)
+    EVT_MENU(HELLO_QUIT, MyChild::OnQuit)
+    EVT_MENU(HELLO_NEW, MyChild::OnNew)
+    EVT_ACTIVATE(MyChild::OnActivate)
+END_EVENT_TABLE()
+
+MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style):
+  wxFrame(frame, -1, title, pos, size, style)
+{
+  canvas = NULL;
+}
+
+MyChild::~MyChild(void)
+{
+}
+
+void MyChild::OnQuit(wxCommandEvent& event)
+{
+    Close(TRUE);
+}
+
+void MyChild::OnNew(wxCommandEvent& event)
+{
+    CMainWindow *mainWin = new CMainWindow();
+    mainWin->ShowWindow( TRUE );
+    mainWin->UpdateWindow();
+}
+ 
+void MyChild::OnActivate(wxActivateEvent& event)
+{
+  if (event.GetActive() && canvas)
+    canvas->SetFocus();
+}
+
+Bool MyChild::OnClose(void)
+{
+  return TRUE;
+}
+
+
+// Dummy MFC window for specifying a valid main window to MFC, using
+// a wxWindows HWND.
+CDummyWindow::CDummyWindow(HWND hWnd):CWnd()
+{
+  Attach(hWnd);
+}
+
+// Don't let the CWnd destructor delete the HWND
+CDummyWindow::~CDummyWindow(void)
+{
+  Detach();
+}
+
diff --git a/samples/mfc/mfctest.def b/samples/mfc/mfctest.def
new file mode 100644
index 0000000000..7c741d1059
--- /dev/null
+++ b/samples/mfc/mfctest.def
@@ -0,0 +1,21 @@
+; hello.def : Declares the module parameters for the application.
+;
+; This is a part of the Microsoft Foundation Classes C++ library.
+; Copyright (C) 1992 Microsoft Corporation
+; All rights reserved.
+;
+; This source code is only intended as a supplement to the
+; Microsoft Foundation Classes Reference and Microsoft
+; WinHelp documentation provided with the library.
+; See these sources for detailed information regarding the
+; Microsoft Foundation Classes product.
+
+NAME         Hello
+DESCRIPTION  'Hello Microsoft Foundation Classes Windows Application'
+
+EXETYPE      WINDOWS
+
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+
+HEAPSIZE     1024
diff --git a/samples/mfc/mfctest.h b/samples/mfc/mfctest.h
new file mode 100644
index 0000000000..038a08cad2
--- /dev/null
+++ b/samples/mfc/mfctest.h
@@ -0,0 +1,66 @@
+// hello.h : Declares the class interfaces for the application.
+//         Hello is a simple program which consists of a main window
+//         and an "About" dialog which can be invoked by a menu choice.
+//         It is intended to serve as a starting-point for new
+//         applications.
+//
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) 1992 Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and Microsoft
+// WinHelp documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+
+#ifndef __MFCTEST_H__
+#define __MFCTEST_H__
+
+/////////////////////////////////////////////////////////////////////////////
+
+// CMainWindow:
+// See hello.cpp for the code to the member functions and the message map.
+//
+class CMainWindow : public CFrameWnd
+{
+public:
+	CMainWindow();
+
+	//{{AFX_MSG( CMainWindow )
+	afx_msg void OnPaint();
+	afx_msg void OnAbout();
+	afx_msg void OnTest();
+	//}}AFX_MSG
+
+	DECLARE_MESSAGE_MAP()
+};
+
+// A dummy CWnd pointing to a wxWindow's HWND
+class CDummyWindow: public CWnd
+{
+  public:
+    CDummyWindow(HWND hWnd);
+    ~CDummyWindow(void);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+// CTheApp:
+// See hello.cpp for the code to the InitInstance member function.
+//
+class CTheApp : public CWinApp
+{
+public:
+	BOOL InitInstance();
+    int ExitInstance();
+
+    // Override this to provide wxWindows message loop
+    // compatibility
+    BOOL PreTranslateMessage(MSG *msg);
+    BOOL OnIdle(LONG lCount);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+
+#endif // __MFCTEST_H__
diff --git a/samples/mfc/mfctest.ico b/samples/mfc/mfctest.ico
new file mode 100644
index 0000000000000000000000000000000000000000..331b675b63ea5c7aebc8502a2b459568cedd7564
GIT binary patch
literal 766
zcmc(cF%H5o3`KttW2G`NcjOoxEl0}@dJV=Npi+6?4xs}hQk~jy`s~C`q=7NdH(6d6
z>CXH>XY`2<x?-gQ`z-|sDJ3T?E?QJ;1?=%@-|e9c|H5o3>$s)6q)1hh-NvO=qy5Co
z`COXnu|8>Zg}pwwJLvWQpL4=z|CL)s`uVx+ykXyP)c3_vA9z%I33Im=o8yxL-kcGw
dBql_1DBSqSBlEx`(MPoWeAkv98#(wac>^wsLdgIC

literal 0
HcmV?d00001

diff --git a/samples/mfc/mfctest.rc b/samples/mfc/mfctest.rc
new file mode 100644
index 0000000000..7c5da8b070
--- /dev/null
+++ b/samples/mfc/mfctest.rc
@@ -0,0 +1,108 @@
+//Microsoft App Studio generated resource script.
+//
+#include "wx/msw/wx.rc"
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+AFX_IDI_STD_FRAME       ICON    DISCARDABLE     "MFCTEST.ICO"
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+MAINMENU MENU DISCARDABLE 
+BEGIN
+    POPUP "&File"
+    BEGIN
+        MENUITEM "&Test wxWindows",         IDM_TEST
+    END
+    POPUP "&Help"
+    BEGIN
+        MENUITEM "&About Hello...\tF1",         IDM_ABOUT
+    END
+END
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+MAINACCELTABLE ACCELERATORS MOVEABLE PURE 
+BEGIN
+    VK_F1,          IDM_ABOUT,              VIRTKEY 
+END
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+ABOUTBOX DIALOG DISCARDABLE  34, 22, 144, 75
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About Hello"
+FONT 8, "Helv"
+BEGIN
+    CTEXT           "Microsoft Windows",IDC_STATIC,0,5,144,8
+    CTEXT           "Microsoft Foundation Classes",IDC_STATIC,0,14,144,8
+    CTEXT           "Hello, Windows!",IDC_STATIC,0,23,144,8
+    CTEXT           "Version 2.0",IDC_STATIC,0,36,144,8
+    DEFPUSHBUTTON   "OK",IDOK,56,53,32,14,WS_GROUP
+END
+
+#ifdef APSTUDIO_INVOKED
+//////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+/////////////////////////////////////////////////////////////////////////////////////
+#endif    // APSTUDIO_INVOKED
+
+
+#ifndef APSTUDIO_INVOKED
+////////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/samples/mfc/resource.h b/samples/mfc/resource.h
new file mode 100644
index 0000000000..e20ad76cbb
--- /dev/null
+++ b/samples/mfc/resource.h
@@ -0,0 +1,18 @@
+//{{NO_DEPENDENCIES}}
+// App Studio generated include file.
+// Used by HELLO.RC
+//
+#define IDM_ABOUT                       100
+#define IDM_TEST                        101
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+
+#define _APS_NEXT_RESOURCE_VALUE        110
+#define _APS_NEXT_COMMAND_VALUE         32768
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           112
+#endif
+#endif
diff --git a/samples/mfc/stdafx.h b/samples/mfc/stdafx.h
new file mode 100644
index 0000000000..5b9f153634
--- /dev/null
+++ b/samples/mfc/stdafx.h
@@ -0,0 +1,12 @@
+// This is a part of the Microsoft Foundation Classes C++ library.
+// Copyright (C) 1992 Microsoft Corporation
+// All rights reserved.
+//
+// This source code is only intended as a supplement to the
+// Microsoft Foundation Classes Reference and Microsoft
+// WinHelp documentation provided with the library.
+// See these sources for detailed information regarding the
+// Microsoft Foundation Classes product.
+
+
+#include <afxwin.h>
diff --git a/samples/nativdlg/aiai.ico b/samples/nativdlg/aiai.ico
new file mode 100644
index 0000000000000000000000000000000000000000..a3db6563cc0b9f4588e1e994fe54b90a3cb1d6c1
GIT binary patch
literal 766
zcmc(bJ930T3`Bcft}@v=+L+MC@X_W5#I6lE$3$=(hlEfB<Ja@?LOIyb0!^!t)JP*;
zc>4Zbw(l3|27cf@{)u1o%88L{R;n8d60briz)7fio<S#4ewC6VoX4NcpV>a{V~VK)
z)$t4e1%j>c0*T7ZEBuvb0Ndch+2BCx7U^mZHa?iIh11ZPGV>8*oPzc{HmcjEM7U^(
z*rd)gSRm_`KJo;dxt={X3#3|q&kYE;ul$En1WJC3UOX%3ev8=<z}j41;VP{UzUs~U
s)wx~DuB_~?Y=Qe|v5`BV=<&%~$Nt1hCmx0~Ul2L;AGObMz1)9;A6NK_vj6}9

literal 0
HcmV?d00001

diff --git a/samples/nativdlg/dialog1.rc b/samples/nativdlg/dialog1.rc
new file mode 100644
index 0000000000..412338aaa1
--- /dev/null
+++ b/samples/nativdlg/dialog1.rc
@@ -0,0 +1,142 @@
+//Microsoft Developer Studio generated resource script.
+//
+
+#ifndef __WINDOWS__
+#define __WINDOWS__
+#endif
+
+#ifndef __WIN32__
+#define __WIN32__
+#endif
+
+#ifndef __WIN95__
+#define __WIN95__
+#endif
+
+#ifdef __MINGW32__
+#define wxID_OK                 5100
+#define wxID_CANCEL             5101
+#define wxID_APPLY              5102
+#define wxID_YES                5103
+#define wxID_NO                 5104
+/* #include <wx/msw/gnuwin32/winresrc.h> */
+#else
+#include <wx/defs.h>
+/* #include <windows.h> */
+#endif
+
+#include "resource.h"
+
+#ifndef __MINGW32__
+#include <commctrl.h>
+#endif
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+// #include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+dialog1 DIALOG DISCARDABLE  0, 0, 271, 172
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Test Dialog"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",wxID_OK,214,7,50,14
+    PUSHBUTTON      "Cancel",wxID_CANCEL,214,24,50,14
+    GROUPBOX        "wxStaticBox",IDC_STATIC,7,7,198,158
+    EDITTEXT        IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL
+    LTEXT           "wxStaticText",IDC_STATIC,13,25,42,8
+    CONTROL         "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,14,47,57,10
+    COMBOBOX        IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    CONTROL         "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,
+                    141,47,64,10
+    LISTBOX         IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | 
+                    WS_VSCROLL | WS_TABSTOP
+    SCROLLBAR       IDC_SCROLLBAR1,111,71,76,11
+    CONTROL         "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | 
+                    TBS_NOTICKS | WS_TABSTOP,10,116,100,15
+    CONTROL         "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90,
+                    10,14
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    dialog1, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 264
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 165
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.K.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/samples/nativdlg/makefile.b32 b/samples/nativdlg/makefile.b32
new file mode 100644
index 0000000000..7c55473a6a
--- /dev/null
+++ b/samples/nativdlg/makefile.b32
@@ -0,0 +1,64 @@
+#
+# File:		makefile.b32
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds 32bit nativdlg example.
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXLIBDIR = $(WXDIR)\lib
+WXLIB = $(WXLIBDIR)\wx32.lib
+LIBS=$(WXLIB) cw32 import32
+
+TARGET=nativdlg
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = nativdlg.obj
+
+$(TARGET).exe:	$(OBJECTS) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+nativdlg.obj:	nativdlg.$(SRCSUFF) nativdlg.h # dialog1.wxr
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    brc32 -r /D__WINDOWS__ /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
+
+
diff --git a/samples/nativdlg/makefile.bcc b/samples/nativdlg/makefile.bcc
new file mode 100644
index 0000000000..19ad9c2a44
--- /dev/null
+++ b/samples/nativdlg/makefile.bcc
@@ -0,0 +1,74 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds resource example (DOS).
+
+!if "$(BCCDIR)" == ""
+!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
+!endif
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+THISDIR = $(WXDIR)\samples\resource
+WXLIB = $(WXDIR)\lib\wx.lib
+
+LIBS=$(WXLIB) mathwl cwl import
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+CFG=$(WXDIR)\src\wxwin.cfg
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+HEADERS = resource.h
+SOURCES = resource.cc
+OBJECTS = resource.obj
+
+resource:    resource.exe
+
+all:    resource.exe
+
+resource.exe:      $(WXLIB) resource.obj resource.def resource.res
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj resource.obj
+resource
+nul
+$(LIBS)
+resource.def
+!
+        rc -30 -K resource.res
+
+.cc.obj:
+	bcc $(CPPFLAGS) -c {$< }
+
+resource.obj:      resource.cc
+
+resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
diff --git a/samples/nativdlg/makefile.dos b/samples/nativdlg/makefile.dos
new file mode 100644
index 0000000000..6096ca810c
--- /dev/null
+++ b/samples/nativdlg/makefile.dos
@@ -0,0 +1,86 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds resource example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info.
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+THISDIR = $(WXDIR)\samples\resource
+WXLIB = $(WXDIR)\lib\wx.lib
+LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+DUMMY=$(WXDIR)\src\msw\dummy.obj
+
+# Set this to nothing if using MS C++ 7
+ZOPTION=/Z7
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch
+
+!if "$(FINAL)" == "0"
+CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw
+LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256
+!else
+CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw
+LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
+!endif
+
+HEADERS = resource.h
+SOURCES = resource.$(SRCSUFF)
+OBJECTS = resource.obj
+
+resource:    resource.exe
+
+all:    wx resource.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+
+resource.exe:      $(DUMMY) $(WXLIB) resource.obj resource.def resource.res
+        link $(LINKFLAGS) @<<
+$(DUMMY) resource.obj,
+resource,
+NUL,
+$(LIBS),
+resource.def
+;
+<<
+        rc -31 -K resource.res
+
+resource.obj:      resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/nativdlg/makefile.g95 b/samples/nativdlg/makefile.g95
new file mode 100644
index 0000000000..018f915f18
--- /dev/null
+++ b/samples/nativdlg/makefile.g95
@@ -0,0 +1,36 @@
+#
+# File:		makefile.g95
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for nativdlg example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/makeg95.env
+
+OBJECTS=$(OBJDIR)/nativdlg.$(OBJSUFF) $(OBJDIR)/nativdlg_resources.$(OBJSUFF)
+
+all:	$(OBJDIR) nativdlg$(GUISUFFIX)
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+$(OBJDIR)/nativdlg.$(OBJSUFF):        nativdlg.$(SRCSUFF) nativdlg.h
+	$(CC) -c $(CPPFLAGS) -o $@ nativdlg.$(SRCSUFF)
+
+nativdlg$(GUISUFFIX): $(OBJECTS) $(WXLIB)
+	$(CC) $(LDFLAGS) -o nativdlg$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
+
+$(OBJDIR)/nativdlg_resources.o:  nativdlg.rc
+	$(RESCOMP) -i nativdlg.rc -o $(OBJDIR)/nativdlg_resources.o $(RESFLAGS)
+
+clean:
+	rm -f $(OBJECTS) nativdlg$(GUISUFFIX).exe core *.rsc *.res
+
diff --git a/samples/nativdlg/makefile.nt b/samples/nativdlg/makefile.nt
new file mode 100644
index 0000000000..08261497f8
--- /dev/null
+++ b/samples/nativdlg/makefile.nt
@@ -0,0 +1,63 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds nativdlg example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\nativdlg
+PROGRAM=nativdlg
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc dialog1.rc
+    $(rc) -r /i$(WXDIR)\include /D__WINDOWS__ -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.sbr
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.pdb
+
diff --git a/samples/nativdlg/makefile.sc b/samples/nativdlg/makefile.sc
new file mode 100644
index 0000000000..235c8f8bc1
--- /dev/null
+++ b/samples/nativdlg/makefile.sc
@@ -0,0 +1,35 @@
+# Symantec C++ makefile for hello example
+# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
+
+WXDIR = $(WXWIN)
+WXLIB = $(WXDIR)\lib\wx.lib
+INCDIR = $(WXDIR)\include
+MSWINC = $(INCDIR)\msw
+BASEINC = $(INCDIR)\base
+
+CC=sc
+RC=rc
+CFLAGS = -o -ml -W -Dwx_msw
+LDFLAGS = -ml -W
+
+INCLUDE=$(BASEINC);$(MSWINC)
+
+LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
+
+.cc.obj:
+	*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
+
+.rc.res:
+	*$(RC) -r -I$(INCLUDE) $<
+
+hello.exe: hello.obj hello.def hello.res
+	*$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS)
+        *$(RC) -k hello.res
+
+clean:
+        -del *.obj
+	-del *.exe
+	-del *.res
+	-del *.map
+	-del *.rws
+
diff --git a/samples/nativdlg/makefile.unx b/samples/nativdlg/makefile.unx
new file mode 100644
index 0000000000..1967b5e242
--- /dev/null
+++ b/samples/nativdlg/makefile.unx
@@ -0,0 +1,76 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for resource example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/make.env
+
+OBJECTS=$(OBJDIR)/resource.$(OBJSUFF)
+
+.SUFFIXES:
+
+all:	$(OBJDIR) resource$(GUISUFFIX)
+
+wxmotif:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif
+
+wxxview:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
+
+wxhp:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
+
+# For SGI, include -lPW on your LDLIBS
+motif:	wxmotif
+	$(MAKE) -f makefile.unx all GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
+
+xview:	wxxview
+	$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' LDLIBS='$(XVIEWLDLIBS)'
+
+hp:	wxhp
+	$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC OPT='' DEBUG='$(DEBUG)' WARN='-w' \
+           XINCLUDE='$(HPXINCLUDE)' \
+           XLIB='$(HPXLIB)' \
+           XVIEW_LINK='' \
+           LDLIBS='$(HPLDLIBS)'
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+resource$(GUISUFFIX): $(OBJDIR)/resource.$(OBJSUFF) $(WXLIB)
+	$(CC) $(LDFLAGS) -o resource$(GUISUFFIX) $(OBJDIR)/resource.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
+
+$(OBJDIR)/resource.$(OBJSUFF):        resource.$(SRCSUFF) resource.h
+	$(CC) -c $(CPPFLAGS) -o $@ resource.$(SRCSUFF)
+
+clean_motif:
+	$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
+
+clean_ol:
+	$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
+
+clean_hp:
+	$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
+
+cleanany:
+	rm -f $(OBJECTS) resource$(GUISUFFIX) core
+
+wxclean_ol:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol
+
+wxclean_motif:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif
+
+wxclean_hp:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp
+
diff --git a/samples/nativdlg/makefile.vms b/samples/nativdlg/makefile.vms
new file mode 100644
index 0000000000..1ef109fbeb
--- /dev/null
+++ b/samples/nativdlg/makefile.vms
@@ -0,0 +1,38 @@
+#************************************************************************
+# Makefile for HELLO under VMS
+# by Stefan Hammes
+# (incomplete) update history:
+# 11.04.95
+#************************************************************************
+
+#************************************************************************
+# Definition section
+# (cave: definitions and includes must begin with ',')
+#************************************************************************
+
+APPOPTS = 
+APPDEFS = 
+APPINCS = 
+
+#************************************************************************
+# Module section
+#************************************************************************
+
+# Name of main module
+MAIN = hello
+
+# Object modules of the application.
+OBJS = hello.obj
+
+.include [--.src]makevms.env
+
+# main dependency
+$(MAIN).exe : $(MAIN).$(OBJ)
+    $(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option
+    - purge *.exe
+
+#************************************************************************
+# Header file depedencies following
+#************************************************************************
+hello.obj : hello.cc hello.h
+
diff --git a/samples/nativdlg/makefile.wat b/samples/nativdlg/makefile.wat
new file mode 100644
index 0000000000..0ad7f98a89
--- /dev/null
+++ b/samples/nativdlg/makefile.wat
@@ -0,0 +1,42 @@
+#
+# Makefile for WATCOM
+#
+# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
+# 8 Nov 1994
+#
+
+WXDIR = ..\.. 
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB = $(WXDIR)\lib
+NAME = hello
+LNK = $(name).lnk
+OBJS = $(name).obj 
+
+PRECOMP=
+
+all:    $(name).exe
+
+$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
+    wlink @$(LNK)
+    $(BINDCOMMAND) $(name).res
+
+$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
+     $(RC) $(RESFLAGS1) $(name).rc
+
+$(LNK) : makefile.wat
+    %create $(LNK)
+    @%append $(LNK) debug all
+    @%append $(LNK) system $(LINKOPTION)
+    @%append $(LNK) $(MINDATA)
+    @%append $(LNK) $(MAXDATA)
+    @%append $(LNK) $(STACK)
+    @%append $(LNK) name $(name)
+    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
+    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
+    @for %i in ($(OBJS)) do @%append $(LNK) file %i
+
+clean:   .SYMBOLIC
+    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
+
diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp
new file mode 100644
index 0000000000..32d24f893c
--- /dev/null
+++ b/samples/nativdlg/nativdlg.cpp
@@ -0,0 +1,130 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        nativdlg.cpp
+// Purpose:     Native Windows dialog sample
+// Author:      Julian Smart
+// Modified by:
+// Created:     04/01/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart and Markus Holzem
+// Licence:   	wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include "wx/resource.h"
+
+#include <ctype.h>
+#include "nativdlg.h"
+#include "resource.h"
+
+// Declare two frames
+MyFrame   *frame = NULL;
+
+IMPLEMENT_APP(MyApp)
+
+// Testing of ressources
+MyApp::MyApp()
+{
+}
+
+bool MyApp::OnInit(void)
+{
+  // Create the main frame window
+  frame = new MyFrame(NULL, -1, "wxWindows Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250));
+
+  // Give it a status line
+  frame->CreateStatusBar(2);
+
+  // Make a menubar
+  wxMenu *file_menu = new wxMenu;
+
+  file_menu->Append(RESOURCE_TEST1, "&Dialog box test",                "Test dialog box resource");
+  file_menu->Append(RESOURCE_QUIT, "E&xit",                "Quit program");
+
+  wxMenuBar *menu_bar = new wxMenuBar;
+
+  menu_bar->Append(file_menu, "&File");
+
+  // Associate the menu bar with the frame
+  frame->SetMenuBar(menu_bar);
+
+  // Make a panel
+  frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame");
+  frame->Show(TRUE);
+
+  // Return the main frame window
+  SetTopWindow(frame);
+
+  return TRUE;
+}
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+	EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
+	EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
+END_EVENT_TABLE()
+
+// Define my frame constructor
+MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
+  wxFrame(parent, id, title, pos, size)
+{
+  panel = NULL;
+}
+
+void MyFrame::OnQuit(wxCommandEvent& event)
+{
+	Close(TRUE);
+}
+
+void MyFrame::OnTest1(wxCommandEvent& event)
+{
+      MyDialog *dialog = new MyDialog;
+      if (dialog->LoadNativeDialog(this, dialog1))
+      {
+/*
+        wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
+        if (text)
+          text->SetValue("wxWindows resource demo");
+*/
+        dialog->SetModal(TRUE);
+        dialog->ShowModal();
+      }
+      dialog->Close(TRUE);
+}
+
+bool MyFrame::OnClose(void)
+{
+  Show(FALSE);
+
+  return TRUE;
+}
+
+BEGIN_EVENT_TABLE(MyDialog, wxDialog)
+	EVT_BUTTON(wxID_OK, MyDialog::OnOk)
+	EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
+END_EVENT_TABLE()
+
+
+void MyDialog::OnOk(wxCommandEvent& event)
+{
+  EndModal(wxID_OK);
+}
+
+void MyDialog::OnCancel(wxCommandEvent& event)
+{
+  EndModal(wxID_CANCEL);
+}
+
+
diff --git a/samples/nativdlg/nativdlg.def b/samples/nativdlg/nativdlg.def
new file mode 100644
index 0000000000..49791b5e6c
--- /dev/null
+++ b/samples/nativdlg/nativdlg.def
@@ -0,0 +1,9 @@
+NAME         Resource
+DESCRIPTION  'Resource'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     1024
+STACKSIZE    16192
+
diff --git a/samples/nativdlg/nativdlg.h b/samples/nativdlg/nativdlg.h
new file mode 100644
index 0000000000..25688ea5fc
--- /dev/null
+++ b/samples/nativdlg/nativdlg.h
@@ -0,0 +1,47 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        nativdlg.h
+// Purpose:     Native Windows dialog sample
+// Author:      Julian Smart
+// Modified by:
+// Created:     04/01/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart and Markus Holzem
+// Licence:   	wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+// Define a new application
+class MyApp: public wxApp
+{
+  public:
+    MyApp(void) ;
+    bool OnInit(void);
+};
+
+class MyFrame: public wxFrame
+{
+  public:
+    wxWindow *panel;
+    MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
+    bool OnClose(void);
+    void OnQuit(wxCommandEvent& event);
+    void OnTest1(wxCommandEvent& event);
+
+ DECLARE_EVENT_TABLE()
+};
+
+class MyDialog : public wxDialog
+{
+  public:
+    void OnOk(wxCommandEvent& event);
+    void OnCancel(wxCommandEvent& event);
+
+ DECLARE_EVENT_TABLE()
+};
+
+#define RESOURCE_QUIT       4
+#define RESOURCE_TEST1      2
+
diff --git a/samples/nativdlg/nativdlg.rc b/samples/nativdlg/nativdlg.rc
new file mode 100644
index 0000000000..db18d163f2
--- /dev/null
+++ b/samples/nativdlg/nativdlg.rc
@@ -0,0 +1,4 @@
+#include "wx/msw/wx.rc"
+
+#include "dialog1.rc"
+
diff --git a/samples/nativdlg/resource.h b/samples/nativdlg/resource.h
new file mode 100644
index 0000000000..a71bf8475c
--- /dev/null
+++ b/samples/nativdlg/resource.h
@@ -0,0 +1,25 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by dialog1.rc
+//
+#define dialog1                         101
+#define IDC_EDIT1                       1000
+#define IDC_CHECK1                      1001
+#define IDC_COMBO1                      1003
+#define IDC_RADIO1                      1005
+#define IDC_LIST1                       1006
+#define IDC_SCROLLBAR1                  1007
+#define IDC_SLIDER1                     1008
+#define IDC_SPIN1                       1009
+#define IDC_STATIC                      -1
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1010
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/samples/ownerdrw/bell.bmp b/samples/ownerdrw/bell.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..279b827162f2b745c005fc802938a84f0ce5890a
GIT binary patch
literal 370
zcmb7<F$%*l3`KvSkPEbT=sCLgE~Z0e=n!umbD#|Ntx`xq{gM+;p%7X6en>*HZ}&$B
zw<q<=I5RGc4ks$`b={K$(2-KTs6>=fcw0f;p=!k7u@ps`;V%cT)}F?J!_0&p#!2&%
vld<$VEqU&p<3Ns5`Nf_+KG?%$w#sLQx8`|ei8_4vBY&s8ZsYZro@o37zjK0f

literal 0
HcmV?d00001

diff --git a/samples/ownerdrw/makefile.b32 b/samples/ownerdrw/makefile.b32
new file mode 100644
index 0000000000..771353702f
--- /dev/null
+++ b/samples/ownerdrw/makefile.b32
@@ -0,0 +1,64 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds ownerdrw example (DOS).
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXLIBDIR = $(WXDIR)\lib
+WXINC = $(WXDIR)\include\msw
+WXLIB = $(WXLIBDIR)\wx32.lib
+LIBS=$(WXLIB) cw32 import32
+
+TARGET=ownerdrw
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = ownerdrw.obj
+
+$(TARGET).exe:	$(OBJECTS) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+ownerdrw.obj:      ownerdrw.$(SRCSUFF)
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
+
diff --git a/samples/ownerdrw/makefile.dos b/samples/ownerdrw/makefile.dos
new file mode 100644
index 0000000000..71c72681ac
--- /dev/null
+++ b/samples/ownerdrw/makefile.dos
@@ -0,0 +1,65 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds ownerdrw example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+THISDIR = $(WXDIR)\samples\ownerdrw
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+HEADERS =
+SOURCES = ownerdrw.$(SRCSUFF)
+OBJECTS = ownerdrw.obj
+
+all:    ownerdrw.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+ownerdrw.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) ownerdrw.obj ownerdrw.def ownerdrw.res
+        link $(LINKFLAGS) @<<
+ownerdrw.obj $(WXDIR)\src\msw\dummy.obj,
+ownerdrw,
+NUL,
+$(LIBS),
+ownerdrw.def
+;
+<<
+        rc -K ownerdrw.res
+
+ownerdrw.obj:      ownerdrw.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+ownerdrw.res :      ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc
+    rc -r /i$(WXDIR)\include ownerdrw
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/ownerdrw/makefile.g95 b/samples/ownerdrw/makefile.g95
new file mode 100644
index 0000000000..c821885cc3
--- /dev/null
+++ b/samples/ownerdrw/makefile.g95
@@ -0,0 +1,37 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for ownerdrw example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/makeg95.env
+
+OBJECTS = $(OBJDIR)/ownerdrw.$(OBJSUFF) $(OBJDIR)/ownerdrw_resources.$(OBJSUFF)
+
+all:    $(OBJDIR) ownerdrw$(GUISUFFIX)$(EXESUFF)
+
+wx:
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+ownerdrw$(GUISUFFIX)$(EXESUFF):	$(OBJECTS) $(WXLIB)
+	$(CC) $(LDFLAGS) -o ownerdrw$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
+
+$(OBJDIR)/ownerdrw.$(OBJSUFF):	ownerdrw.$(SRCSUFF)
+	$(CC) -c $(CPPFLAGS) -o $@ ownerdrw.$(SRCSUFF)
+
+$(OBJDIR)/ownerdrw_resources.o:  ownerdrw.rc
+	$(RESCOMP) -i ownerdrw.rc -o $(OBJDIR)/ownerdrw_resources.o $(RESFLAGS)
+
+clean:
+	rm -f $(OBJECTS) ownerdrw$(GUISUFFIX).exe core *.rsc *.res
diff --git a/samples/ownerdrw/makefile.nt b/samples/ownerdrw/makefile.nt
new file mode 100644
index 0000000000..5976dadeb2
--- /dev/null
+++ b/samples/ownerdrw/makefile.nt
@@ -0,0 +1,64 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds ownerdrw example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+WXUSINGDLL=0
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\ownerdrw
+PROGRAM=ownerdrw
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/ownerdrw/mondrian.ico b/samples/ownerdrw/mondrian.ico
new file mode 100644
index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53
GIT binary patch
literal 766
zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Z<M**w4TKL=5})Lnt5#WHKB$
zaDbtqp#doIAB-6O{|B*v7zjZ^AOa2W|NsACHyAJ}De?dRKnp(HN~rljcR;{k;{zQE
i@;}UZ|9Q?Fpp*~yJCwmWbLIrN`9Qm9%}2L?p!oo$cZ4ed

literal 0
HcmV?d00001

diff --git a/samples/ownerdrw/nosound.bmp b/samples/ownerdrw/nosound.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..722e2e4ced920128980723aaab87529acc7f78dc
GIT binary patch
literal 370
zcmZvWF%H5o3`Kt>q|zPkz&Y5tOT>ViEgNe#Und7c3jaG4fmA29pB?wt*V}zU*n{yx
zKhe+h2?s{t6>%>VfET5V#7IPIjad&pE_xTydDLRCui=mL)_3-O6xqmmjX@V%1&+p1
z@j_)yir0!H1u@@~GX<No+BnyJ{+ZFY^Jm^IEziN!PN1kXnbJIV&@ZX(>a#7@&T5DG
I*kKgF8+G_}MF0Q*

literal 0
HcmV?d00001

diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp
new file mode 100644
index 0000000000..2e039f2926
--- /dev/null
+++ b/samples/ownerdrw/ownerdrw.cpp
@@ -0,0 +1,293 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ownerdrw.cpp
+// Purpose:     Owner-draw sample, for Windows
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     13.11.97
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// headers & declarations
+// ============================================================================
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+  #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+  #include "wx/wx.h"
+#endif
+
+#include  "wx/ownerdrw.h"
+#include  "wx/menuitem.h"
+#include  "wx/msw/checklst.h"
+
+// Define a new application type
+class OwnerDrawnApp: public wxApp
+{
+public:
+  bool OnInit();
+};
+
+// Define a new frame type
+class OwnerDrawnFrame : public wxFrame
+{
+public:
+  // ctor & dtor
+  OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
+  ~OwnerDrawnFrame();
+
+  // notifications
+  void OnQuit             (wxCommandEvent& event);
+  void OnAbout            (wxCommandEvent& event);
+  void OnListboxSelect    (wxCommandEvent& event);
+  void OnCheckboxToggle   (wxCommandEvent& event);
+  void OnListboxDblClick  (wxCommandEvent& event);
+  bool OnClose            ()                        { return TRUE; }
+
+  DECLARE_EVENT_TABLE()
+
+private:
+  void InitMenu();
+
+  wxCheckListBox *m_pListBox;
+};
+
+enum 
+{ 
+  Menu_Quit = 1, 
+  Menu_First = 100,
+  Menu_Test1, Menu_Test2, Menu_Test3, 
+  Menu_Bitmap, Menu_Bitmap2, 
+  Menu_Submenu, Menu_Sub1, Menu_Sub2, Menu_Sub3,
+  Control_First = 1000,
+  Control_Listbox, Control_Listbox2,
+};
+
+BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame)
+  EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit)
+  EVT_LISTBOX(Control_Listbox, OwnerDrawnFrame::OnListboxSelect)
+  EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle)
+  EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 
+              OwnerDrawnFrame::OnListboxDblClick)
+END_EVENT_TABLE()
+
+IMPLEMENT_APP(OwnerDrawnApp);
+
+// init our app: create windows
+bool OwnerDrawnApp::OnInit(void)
+{
+  OwnerDrawnFrame *pFrame = new OwnerDrawnFrame(NULL, "wxWindows Ownerdraw Sample",
+                                                50, 50, 450, 340);
+  SetTopWindow(pFrame);
+
+  return TRUE;
+}
+
+// create the menu bar for the main frame
+void OwnerDrawnFrame::InitMenu()
+{
+  // Make a menubar
+  wxMenu *file_menu = new wxMenu,
+         *sub_menu  = new wxMenu;
+
+  // vars used for menu construction
+  wxMenuItem *pItem;
+  wxFont fontLarge(18, wxROMAN, wxNORMAL, wxBOLD, FALSE),
+         fontUlined(12, wxDEFAULT, wxNORMAL, wxNORMAL, TRUE),
+         fontItalic(12, wxMODERN, wxITALIC, wxBOLD, FALSE),
+         // should be at least of the size of bitmaps
+         fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE);
+
+  // sorry for my artistic skills...
+  wxBitmap bmpBell("bell"), bmpSound("sound"), bmpNoSound("nosound");
+
+  // construct submenu
+  pItem = new wxMenuItem(sub_menu, Menu_Sub1, "Submenu &first", "large", TRUE);
+  pItem->SetFont(fontLarge);
+  sub_menu->Append(pItem);
+  
+  pItem = new wxMenuItem(sub_menu, Menu_Sub2, "Submenu &second", "italic", TRUE);
+  pItem->SetFont(fontItalic);
+  sub_menu->Append(pItem);
+  
+  pItem = new wxMenuItem(sub_menu, Menu_Sub3, "Submenu &third", "underlined", TRUE);
+  pItem->SetFont(fontUlined);
+  sub_menu->Append(pItem);
+  
+  // construct menu
+  pItem = new wxMenuItem(file_menu, Menu_Test1, "&Uncheckable", "red item");
+  pItem->SetFont(*wxITALIC_FONT);
+  pItem->SetTextColour(wxColor(255, 0, 0));
+  pItem->SetMarginWidth(23);
+  file_menu->Append(pItem);
+
+  pItem = new wxMenuItem(file_menu, Menu_Test2, "&Checkable", "checkable item", TRUE);
+  pItem->SetFont(*wxSMALL_FONT);
+  file_menu->Append(pItem);
+  file_menu->Check(Menu_Test2, TRUE);
+
+  pItem = new wxMenuItem(file_menu, Menu_Test3, "&Disabled", "disabled item");
+  pItem->SetFont(*wxNORMAL_FONT);
+  file_menu->Append(pItem);
+  file_menu->Enable(Menu_Test3, FALSE);
+
+  file_menu->AppendSeparator();
+
+  pItem = new wxMenuItem(file_menu, Menu_Bitmap, "&Bell", "check/uncheck me!", TRUE);
+  pItem->SetFont(fontBmp);
+  pItem->SetBitmaps(bmpBell);
+  file_menu->Append(pItem);
+
+  pItem = new wxMenuItem(file_menu, Menu_Bitmap2, "So&und", "icon changes!", TRUE);
+  pItem->SetFont(fontBmp);
+  pItem->SetBitmaps(bmpSound, bmpNoSound);
+  file_menu->Append(pItem);
+
+  file_menu->AppendSeparator();
+
+  pItem = new wxMenuItem(file_menu, Menu_Submenu, "&Sub menu", "", TRUE, sub_menu);
+  pItem->SetFont(*wxSWISS_FONT);
+  file_menu->Append(pItem);
+
+  file_menu->AppendSeparator();
+  file_menu->Append(Menu_Quit, "&Quit", "Normal item");
+
+  wxMenuBar *menu_bar = new wxMenuBar;
+
+  menu_bar->Append(file_menu, "&File");
+  SetMenuBar(menu_bar);
+}
+
+// main frame constructor
+OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
+         : wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
+{
+  // set the icon
+  SetIcon(wxIcon("mondrian"));
+
+  // create the menu
+  InitMenu();
+
+  // make a panel with some controls
+  wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0), 
+                                wxSize(400, 200), wxTAB_TRAVERSAL);
+
+  // check list box
+  static const char* aszChoices[] = { "Hello", "world", "and", 
+                                      "goodbye", "cruel", "world",
+                                      "-------", "owner-drawn", "listbox" };
+
+  wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)];
+  uint ui;
+  for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ )
+    astrChoices[ui] = aszChoices[ui];
+
+  m_pListBox = new wxCheckListBox
+                   (                                             
+                     pPanel,             // parent               
+                     Control_Listbox,    // control id           
+                     wxPoint(10, 10),    // listbox poistion     
+                     wxSize(200, 200),   // listbox size         
+                     WXSIZEOF(aszChoices), // number of strings    
+                     astrChoices         // array of strings
+                   );                                            
+                                                                            
+  delete [] astrChoices;
+
+  for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) {
+    m_pListBox->GetItem(ui)->SetBackgroundColour(wxColor(200, 200, 200));
+  }
+
+  m_pListBox->Check(2);
+
+  // normal (but owner-drawn) listbox
+  static const char* aszColors[] = { "Red", "Blue", "Pink",
+                                     "Green", "Yellow", 
+                                     "Black", "Violet"  };
+  struct { uint r, g, b; } aColors[] = { {255,0,0}, {0,0,255}, {255,128,192},
+                                        {0,255,0}, {255,255,128}, 
+                                        {0,0,0}, {128,0,255} };
+  astrChoices = new wxString[WXSIZEOF(aszColors)];
+  for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ )
+    astrChoices[ui] = aszColors[ui];
+
+  wxListBox *pListBox = new wxListBox
+                           (                                             
+                             pPanel,              // parent               
+                             Control_Listbox2,    // control id           
+                             wxPoint(220, 10),    // listbox poistion     
+                             wxDefaultSize,       // listbox size         
+                             WXSIZEOF(aszColors),   // number of strings    
+                             astrChoices,         // array of strings
+                             wxLB_OWNERDRAW,      // owner-drawn
+                             wxDefaultValidator,  // 
+                             wxListBoxNameStr
+                           );
+
+  for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ ) {
+    pListBox->GetItem(ui)->SetTextColour(wxColor(aColors[ui].r,
+                                                aColors[ui].g, 
+                                                aColors[ui].b));
+    // yellow on white is horrible...
+    if ( ui == 4 )
+      pListBox->GetItem(ui)->SetBackgroundColour(wxColor(0, 0, 0));
+    
+  }
+
+  // create the status line
+  const int widths[] = { -1, 60 };
+  CreateStatusBar(2);
+  SetStatusWidths(2, widths);
+  SetStatusText("no selection", 0);
+
+  Show(TRUE);
+}
+
+OwnerDrawnFrame::~OwnerDrawnFrame()
+{
+}
+
+void OwnerDrawnFrame::OnQuit(wxCommandEvent& event)
+{
+  Close(TRUE);
+}
+
+void OwnerDrawnFrame::OnAbout(wxCommandEvent& event)
+{
+  wxMessageDialog dialog(this, "Demo of owner-drawn controls\n"
+                         "About wxOwnerDrawn", wxYES_NO | wxCANCEL);
+  dialog.ShowModal();
+}
+
+void OwnerDrawnFrame::OnListboxSelect(wxCommandEvent& event)
+{
+  wxString strSelection;
+  uint nSel = event.GetSelection();
+  strSelection.sprintf("item %d selected (%schecked)", nSel,
+                       m_pListBox->IsChecked(nSel) ? "" : "not ");
+  SetStatusText(strSelection);
+}
+
+void OwnerDrawnFrame::OnListboxDblClick(wxCommandEvent& event)
+{
+  wxString strSelection;
+  strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection());
+  wxMessageDialog dialog(this, strSelection);
+  dialog.ShowModal();
+}
+
+void OwnerDrawnFrame::OnCheckboxToggle(wxCommandEvent& event)
+{
+  wxString strSelection;
+  uint nItem = event.GetInt();
+  strSelection.sprintf("item %d was %schecked", nItem,
+                       m_pListBox->IsChecked(nItem) ? "" : "un");
+  SetStatusText(strSelection);
+}
\ No newline at end of file
diff --git a/samples/ownerdrw/ownerdrw.def b/samples/ownerdrw/ownerdrw.def
new file mode 100644
index 0000000000..6f2236cfe5
--- /dev/null
+++ b/samples/ownerdrw/ownerdrw.def
@@ -0,0 +1,8 @@
+NAME         OWNERDRW
+DESCRIPTION  'Owner-draw sample'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     4048
+STACKSIZE    16000
diff --git a/samples/ownerdrw/ownerdrw.rc b/samples/ownerdrw/ownerdrw.rc
new file mode 100644
index 0000000000..bbc00bdf4b
--- /dev/null
+++ b/samples/ownerdrw/ownerdrw.rc
@@ -0,0 +1,6 @@
+mondrian ICON   "mondrian.ico"
+bell BITMAP "bell.bmp"
+sound BITMAP "sound.bmp"
+nosound BITMAP "nosound.bmp"
+#include "wx/msw/wx.rc"
+
diff --git a/samples/ownerdrw/sound.bmp b/samples/ownerdrw/sound.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..26f5f1883e29c465f0243ccff4ba2766b980229e
GIT binary patch
literal 370
zcma)#K@I{T5CogVWPO1C!FTN4zYq`Vk(=M*VVkfu;|Q8;vI5gn44r1a-jaOX(F=8=
z&Q#I?l@`}6DH2Deyc-It)=IaB=0~j=QEVF_kG}LLKf`E^u%iV8dx9~Z{F&2#nOj6;
Xd)eh_c=Y<>_}B8WjGS#|+C9N5tAudn

literal 0
HcmV?d00001

diff --git a/samples/regtest/key1.ico b/samples/regtest/key1.ico
new file mode 100644
index 0000000000000000000000000000000000000000..57a5209acb6245bba40312a49354d5784d7291f0
GIT binary patch
literal 318
zcmZvXF%H5o6hmEsXeQK&nURw*cZ2b7?ba*xC>)_13`n2n6qX97wi7#vQmJ8dT_@wx
zNGCgVa)yoes1#NI360B$)ljCI=NWgA^;4#2km1O(K_SfSxvMv%QV}XQFa!lB3dO`a
xM!bvzrs;59{rGjMt$F6t?hEd?Mqsb-6QYGX-pju~NX_L(vSq^;>o@y-_5&Q8M8W_7

literal 0
HcmV?d00001

diff --git a/samples/regtest/key2.ico b/samples/regtest/key2.ico
new file mode 100644
index 0000000000000000000000000000000000000000..082ff472913fcc457f7325b084398f0f24b65d0a
GIT binary patch
literal 318
zcma)%I}*bn3`CcSi<DHUQ~HRWNkbPpAIB;2t=!3PA#FY@q!j{bR#L)p&NAjC-ORWv
zcRXn#enXKsDrFFnRIN4G57CbzoZ*;D4j)hlv~I>r>%&<7zcW1I(35UP>FQ>q*3$VM
Th7P2&H;exE3xAQlcm2`{Aev48

literal 0
HcmV?d00001

diff --git a/samples/regtest/key3.ico b/samples/regtest/key3.ico
new file mode 100644
index 0000000000000000000000000000000000000000..0cbb4c3360d74049def5417d7bf4a34ebf862c11
GIT binary patch
literal 318
zcmaJ-yAHxI5OX9XGG=0C<n!1&)MF%ud`=njDf|VM7!Et_&;@+wdn<PekR+uP7`Fsm
z>_u0uV!}!G9|%Z6ZcbJqdhhaX#85;y5+yF#{6ZZ7+9EuWKa+50emf_d(<!s*kyy{%
r#vglsq37p_k*~E98l-pST8}HYJAjvpeJAD3BdBCh|I=s9kNbfyLg-WO

literal 0
HcmV?d00001

diff --git a/samples/regtest/makefile.g95 b/samples/regtest/makefile.g95
new file mode 100644
index 0000000000..5dc5b47810
--- /dev/null
+++ b/samples/regtest/makefile.g95
@@ -0,0 +1,37 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for regtest example (UNIX).
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/makeg95.env
+
+OBJECTS = $(OBJDIR)/regtest.$(OBJSUFF) $(OBJDIR)/regtest_resources.$(OBJSUFF)
+
+all:    $(OBJDIR) regtest$(GUISUFFIX)$(EXESUFF)
+
+wx:
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+regtest$(GUISUFFIX)$(EXESUFF):	$(OBJECTS) $(WXLIB)
+	$(CC) $(LDFLAGS) -o regtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
+
+$(OBJDIR)/regtest.$(OBJSUFF):	regtest.$(SRCSUFF)
+	$(CC) -c $(CPPFLAGS) -o $@ regtest.$(SRCSUFF)
+
+$(OBJDIR)/regtest_resources.o:  regtest.rc
+	$(RESCOMP) -i regtest.rc -o $(OBJDIR)/regtest_resources.o $(RESFLAGS)
+
+clean:
+	rm -f $(OBJECTS) regtest$(GUISUFFIX).exe core *.rsc *.res
diff --git a/samples/regtest/makefile.nt b/samples/regtest/makefile.nt
new file mode 100644
index 0000000000..df589af4ee
--- /dev/null
+++ b/samples/regtest/makefile.nt
@@ -0,0 +1,64 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds regtest example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+WXUSINGDLL=0
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\regtest
+PROGRAM=regtest
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/regtest/registry.ico b/samples/regtest/registry.ico
new file mode 100644
index 0000000000000000000000000000000000000000..3ebfa3ace3528dcdfb2575240933107b298cba33
GIT binary patch
literal 1078
zcmb7@L2lbH5Jg9EK?^7lxhJqzMQ)KEg)1(_BbYz{!K>&<^)AOqRzi2|is+&s`-YP0
zv@i;E?9Z7$pTnW$kw_zV()R~Z`*tVt8Gkq|{Gk!K--$es>%kY$$Ol%8y|*oh@Rbl2
z$4V%d%LT7Osb48YBfv*fy8LC&IpsX$w56vw$LQm1*Tkl8{I|X)Mu&AJ*_Bt_#%R|>
zt#=%@@~S)IoGb;4Zrpaj=xiy@`0WDdW=JM)I`tG@8=_n1Y|hv7t@E{E(hd_>b6Fd9
zQL`;q^ASF0DoLyjheQ^t8+@D%ZK|vrFl~4as;?V3rZSfEY8$`$a1AwT*Ar`Ox!clF
zDP5#pZ=|&4fxOpSPrrBd?EOyXpnI!Laf=q;BL87wV>$#U@Cc5e1ADOh2joQcBRFzQ
zcfr5GX>s~N-A{nMl=Avi%G8u%q~u)#o&fnh@&sOs&bdy054JfE#J4Rl<0#B@b*zN{
zHRscu{mc>1DGoa1{F{C@Jo`CY!IQTRKU!~f-^7w?-Z<6Uc%KYjMxRU=Nu1B29V{6c
mWl{%g)h|pFO6t?XcVK@TVaIRb{eSCuH$REwkN6|_D)I}O#V85@

literal 0
HcmV?d00001

diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp
new file mode 100644
index 0000000000..c9396bf398
--- /dev/null
+++ b/samples/regtest/regtest.cpp
@@ -0,0 +1,834 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        registry.cpp
+// Purpose:     wxRegKey class demo
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     03.04.98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#include "wx/wxprec.h"
+
+#ifdef  __BORLANDC__
+  #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+  #include "wx/wx.h"
+#endif
+
+#include "wx/log.h"
+#include "wx/treectrl.h"
+#include "wx/msw/registry.h"
+
+// ----------------------------------------------------------------------------
+// application type
+// ----------------------------------------------------------------------------
+class RegApp : public wxApp
+{ 
+public:
+  bool OnInit(void);
+};
+
+// ----------------------------------------------------------------------------
+// image list with registry icons
+// ----------------------------------------------------------------------------
+class RegImageList : public wxImageList
+{
+public:
+  enum Icon
+  {
+    Root,
+    ClosedKey,
+    OpenedKey,
+    TextValue,
+    BinaryValue,
+  };
+
+  RegImageList();
+};
+
+// ----------------------------------------------------------------------------
+// our control
+// ----------------------------------------------------------------------------
+class RegTreeCtrl : public wxTreeCtrl
+{
+public:
+  // ctor & dtor
+  RegTreeCtrl(wxWindow *parent, wxWindowID id);
+  virtual ~RegTreeCtrl();
+
+  // notifications
+  void OnDeleteItem   (wxTreeEvent& event);
+  void OnItemExpanding(wxTreeEvent& event);
+  void OnSelChanged   (wxTreeEvent& event);
+
+  void OnRightClick   (wxMouseEvent& event);
+  void OnChar         (wxKeyEvent& event);
+
+  // forwarded notifications (by the frame)
+  void OnMenuTest();
+
+  // operations
+  void DeleteSelected();
+  void CreateNewKey(const wxString& strName);
+  void CreateNewTextValue(const wxString& strName);
+  void CreateNewBinaryValue(const wxString& strName);
+
+  // information
+  bool IsKeySelected() const;
+
+  DECLARE_EVENT_TABLE();
+
+private:
+  // array of children of the node
+  struct TreeNode;
+  WX_DEFINE_ARRAY(TreeNode *, TreeChildren);
+  
+  // structure describing a registry key/value
+  struct TreeNode
+  {
+    RegTreeCtrl  *m_pTree;     // must be !NULL
+    TreeNode     *m_pParent;    // NULL only for the root node
+    long          m_id;         // the id of the tree control item
+    wxString      m_strName;    // name of the key/value
+    TreeChildren  m_aChildren;  // array of subkeys/values
+    bool          m_bKey;       // key or value?
+    wxRegKey     *m_pKey;       // only may be !NULL if m_bKey == true
+    long          m_lDummy;     // dummy subkey (to make expansion possible)
+
+    // ctor
+    TreeNode() { m_lDummy = 0; }
+
+    // trivial accessors
+    long      Id()     const { return m_id;              }
+    bool      IsRoot() const { return m_pParent == NULL; }
+    bool      IsKey()  const { return m_bKey;            }
+    TreeNode *Parent() const { return m_pParent;         }
+
+    // notifications
+    bool OnExpand();
+    void OnCollapse();
+
+    // operations
+    void Refresh() { OnCollapse(); OnExpand(); }
+    void AddDummy();
+    void DestroyChildren();
+    const char *FullName() const;
+
+    // get the associated key: make sure the pointer is !NULL
+    wxRegKey& Key() { if ( !m_pKey ) OnExpand(); return *m_pKey; }
+
+    // dtor deletes all children
+    ~TreeNode();
+  };
+
+  wxMenu      *m_pMenuPopup;
+  TreeNode    *m_pRoot;
+  wxImageList *m_imageList;
+
+  TreeNode *GetNode(const wxTreeEvent& event)
+    { return (TreeNode *)GetItemData(event.m_item.m_itemId); }
+
+public:
+  // create a new node and insert it to the tree
+  TreeNode *InsertNewTreeNode(TreeNode *pParent, 
+                              const wxString& strName,
+                              int idImage = RegImageList::ClosedKey,
+                              const wxString *pstrValue = NULL);
+  // add standard registry keys
+  void AddStdKeys();
+};
+
+// ----------------------------------------------------------------------------
+// the main window of our application
+// ----------------------------------------------------------------------------
+class RegFrame : public wxFrame
+{ 
+public:
+  // ctor & dtor
+  RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h);
+  virtual ~RegFrame(void);
+    
+  // callbacks
+  void OnQuit (wxCommandEvent& event);
+  void OnAbout(wxCommandEvent& event);
+  void OnTest (wxCommandEvent& event);
+
+  void OnExpand  (wxCommandEvent& event);
+  void OnCollapse(wxCommandEvent& event);
+  void OnToggle  (wxCommandEvent& event);
+
+  void OnDelete   (wxCommandEvent& event);
+  void OnNewKey   (wxCommandEvent& event);
+  void OnNewText  (wxCommandEvent& event);
+  void OnNewBinary(wxCommandEvent& event);
+
+  bool OnClose  () { return TRUE; }
+
+  DECLARE_EVENT_TABLE();
+
+private:
+  RegTreeCtrl *m_treeCtrl;
+};
+
+// ----------------------------------------------------------------------------
+// various ids
+// ----------------------------------------------------------------------------
+
+enum
+{
+  Menu_Quit     = 100,
+  Menu_About,
+  Menu_Test,
+  Menu_Expand,
+  Menu_Collapse,
+  Menu_Toggle,
+  Menu_New,
+  Menu_NewKey,  
+  Menu_NewText, 
+  Menu_NewBinary,
+  Menu_Delete,
+
+  Ctrl_RegTree  = 200,
+};
+
+// ----------------------------------------------------------------------------
+// event tables
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(RegFrame, wxFrame)
+  EVT_MENU(Menu_Test,     RegFrame::OnTest)
+  EVT_MENU(Menu_About,    RegFrame::OnAbout)
+  EVT_MENU(Menu_Quit,     RegFrame::OnQuit)
+  EVT_MENU(Menu_Expand,   RegFrame::OnExpand)
+  EVT_MENU(Menu_Collapse, RegFrame::OnCollapse)
+  EVT_MENU(Menu_Toggle,   RegFrame::OnToggle)
+  EVT_MENU(Menu_Delete,   RegFrame::OnDelete)
+  EVT_MENU(Menu_NewKey,   RegFrame::OnNewKey)
+  EVT_MENU(Menu_NewText,  RegFrame::OnNewText)
+  EVT_MENU(Menu_NewBinary,RegFrame::OnNewBinary)
+END_EVENT_TABLE()
+
+BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl)
+  EVT_TREE_DELETE_ITEM   (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem)
+  EVT_TREE_ITEM_EXPANDING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
+  EVT_TREE_SEL_CHANGED   (Ctrl_RegTree, RegTreeCtrl::OnSelChanged)
+
+  EVT_CHAR      (RegTreeCtrl::OnChar)
+  EVT_RIGHT_DOWN(RegTreeCtrl::OnRightClick)
+END_EVENT_TABLE()
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// global functions
+// ----------------------------------------------------------------------------
+
+// create the "registry operations" menu
+wxMenu *CreateRegistryMenu()
+{
+  wxMenu *pMenuNew = new wxMenu;
+  pMenuNew->Append(Menu_NewKey,    "&Key",          "Create a new key");
+  pMenuNew->AppendSeparator();
+  pMenuNew->Append(Menu_NewText,   "&Text value",   "Create a new text value");
+  pMenuNew->Append(Menu_NewBinary, "&Binary value", "Create a new binary value");
+
+  wxMenu *pMenuReg = new wxMenu;
+  pMenuReg->Append(Menu_New, "&New", pMenuNew);
+  pMenuReg->Append(Menu_Delete,   "&Delete...", "Delete selected key/value");
+  pMenuReg->AppendSeparator();
+  pMenuReg->Append(Menu_Expand,   "&Expand",    "Expand current key");
+  pMenuReg->Append(Menu_Collapse, "&Collapse",  "Collapse current key");
+  pMenuReg->Append(Menu_Toggle,   "&Toggle",    "Toggle current key");
+
+  return pMenuReg;
+}
+
+// ----------------------------------------------------------------------------
+// application class
+// ----------------------------------------------------------------------------
+IMPLEMENT_APP(RegApp)
+
+// `Main program' equivalent, creating windows and returning main app frame
+bool RegApp::OnInit()
+{
+  // create the main frame window and show it
+  RegFrame *frame = new RegFrame(NULL, "wxRegKey Test", 50, 50, 600, 350);
+  frame->Show(true);
+  
+  SetTopWindow(frame);
+
+  return true;
+}
+
+// ----------------------------------------------------------------------------
+// RegFrame
+// ----------------------------------------------------------------------------
+
+RegFrame::RegFrame(wxFrame *parent, char *title, int x, int y, int w, int h)
+        : wxFrame(parent, -1, title, wxPoint(x, y), wxSize(w, h))
+{
+  // this reduces flicker effects
+  SetBackgroundColour(wxColour(255, 255, 255));
+
+  // set the icon
+  // ------------
+  SetIcon(wxIcon("app_icon"));
+
+  // create menu
+  // -----------
+  wxMenu *pMenuFile = new wxMenu;
+  pMenuFile->Append(Menu_Test, "Te&st", "Test key creation");
+  pMenuFile->AppendSeparator();
+  pMenuFile->Append(Menu_About, "&About...", "Show an extraordinarly beautiful dialog");
+  pMenuFile->AppendSeparator();
+  pMenuFile->Append(Menu_Quit,  "E&xit", "Quit this program");
+
+  wxMenuBar *pMenu = new wxMenuBar;
+  pMenu->Append(pMenuFile, "&File");
+  pMenu->Append(CreateRegistryMenu(),  "&Registry");
+  SetMenuBar(pMenu);
+
+  // create child controls
+  // ---------------------
+  m_treeCtrl = new RegTreeCtrl(this, Ctrl_RegTree);
+
+  // create the status line
+  // ----------------------
+  int aWidths[2];
+  aWidths[0] = 200;
+  aWidths[1] = -1;
+  CreateStatusBar(2);
+  SetStatusWidths(2, aWidths);
+}
+
+RegFrame::~RegFrame(void)
+{
+}
+
+void RegFrame::OnQuit(wxCommandEvent& event)
+{
+  Close(TRUE);
+}
+
+void RegFrame::OnAbout(wxCommandEvent& event)
+{
+  wxMessageDialog dialog(this, "wxRegistry sample\n(c) 1998 Vadim Zeitlin",
+                         "About wxRegistry", wxOK);
+
+  dialog.ShowModal();
+}
+
+void RegFrame::OnTest(wxCommandEvent& event)
+{
+  m_treeCtrl->OnMenuTest();
+}
+
+void RegFrame::OnExpand(wxCommandEvent& event)
+{
+  m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_EXPAND);
+}
+
+void RegFrame::OnCollapse(wxCommandEvent& event)
+{
+  m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_COLLAPSE);
+}
+
+void RegFrame::OnToggle(wxCommandEvent& event)
+{
+  m_treeCtrl->ExpandItem(m_treeCtrl->GetSelection(), wxTREE_EXPAND_TOGGLE);
+}
+
+void RegFrame::OnDelete(wxCommandEvent& event)
+{
+  m_treeCtrl->DeleteSelected();
+}
+
+void RegFrame::OnNewKey(wxCommandEvent& event)
+{
+  if ( m_treeCtrl->IsKeySelected() ) {
+    m_treeCtrl->CreateNewKey(
+      wxGetTextFromUser("Enter the name of the new key"));
+  }
+}
+
+void RegFrame::OnNewText(wxCommandEvent& event)
+{
+  if ( m_treeCtrl->IsKeySelected() ) {
+    m_treeCtrl->CreateNewTextValue(
+      wxGetTextFromUser("Enter the name for the new text value"));
+  }
+}
+
+void RegFrame::OnNewBinary(wxCommandEvent& event)
+{
+  if ( m_treeCtrl->IsKeySelected() ) {
+    m_treeCtrl->CreateNewBinaryValue(
+      wxGetTextFromUser("Enter the name for the new binary value"));
+  }
+}
+
+// ----------------------------------------------------------------------------
+// RegImageList
+// ----------------------------------------------------------------------------
+RegImageList::RegImageList() : wxImageList(16, 16, TRUE)
+{
+  // should be in sync with enum RegImageList::RegIcon
+  static const char *aszIcons[] = { "key1","key2","key3","value1","value2" };
+  wxString str = "icon_";
+  for ( uint n = 0; n < WXSIZEOF(aszIcons); n++ ) {
+    Add(wxIcon(str + aszIcons[n], wxBITMAP_TYPE_ICO_RESOURCE));
+  }
+}
+
+// ----------------------------------------------------------------------------
+// RegTreeCtrl
+// ----------------------------------------------------------------------------
+
+// create a new tree item and insert it into the tree
+RegTreeCtrl::TreeNode *RegTreeCtrl::InsertNewTreeNode(TreeNode *pParent, 
+                                                      const wxString& strName,
+                                                      int idImage,
+                                                      const wxString *pstrValue)
+{
+  // create new item & insert it
+  TreeNode *pNewNode = new TreeNode;
+  pNewNode->m_pTree  = this;
+  pNewNode->m_pParent = pParent;
+  pNewNode->m_strName = strName;
+  pNewNode->m_bKey    = pstrValue == NULL;
+  pNewNode->m_pKey    = NULL;
+  pNewNode->m_id      = InsertItem(pParent ? pParent->m_id : 0, 
+                                   pNewNode->IsKey() ? strName : *pstrValue,
+                                   idImage);
+
+  wxASSERT_MSG( pNewNode->m_id, "can't create tree control item!");
+
+  // save the pointer in the item
+  if ( !SetItemData(pNewNode->m_id, (long)pNewNode) ) {
+    wxFAIL_MSG("can't store item's data in tree control!");
+  }
+
+  // add it to the list of parent's children
+  if ( pParent != NULL ) {
+    pParent->m_aChildren.Add(pNewNode);
+  }
+
+  // force the [+] button (@@@ not very elegant...)
+  if ( pNewNode->IsKey() )
+    pNewNode->AddDummy();
+
+  return pNewNode;
+}
+
+RegTreeCtrl::RegTreeCtrl(wxWindow *parent, wxWindowID id)
+           : wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, 
+                        wxTR_HAS_BUTTONS | wxSUNKEN_BORDER)
+{
+  // create the image list
+  // ---------------------
+  m_imageList = new RegImageList;
+  SetImageList(m_imageList, wxIMAGE_LIST_NORMAL);
+
+  // create root keys
+  // ----------------
+  m_pRoot = InsertNewTreeNode(NULL, "Registry Root", RegImageList::Root);
+
+  // create popup menu
+  // -----------------
+  m_pMenuPopup = CreateRegistryMenu();
+}
+
+RegTreeCtrl::~RegTreeCtrl()
+{
+  delete m_pMenuPopup;
+  delete m_pRoot;
+  delete m_imageList;
+}
+
+void RegTreeCtrl::AddStdKeys()
+{
+  for ( uint ui = 0; ui < wxRegKey::nStdKeys; ui++ ) {
+    InsertNewTreeNode(m_pRoot, wxRegKey::GetStdKeyName(ui));
+  }
+}
+
+// ----------------------------------------------------------------------------
+// notifications
+// ----------------------------------------------------------------------------
+
+void RegTreeCtrl::OnRightClick(wxMouseEvent& event)
+{
+  int iFlags;
+  long lId = HitTest(wxPoint(event.GetX(), event.GetY()), iFlags);
+  if ( iFlags & wxTREE_HITTEST_ONITEMLABEL ) {
+    // popup menu only if an item was clicked
+    wxASSERT( lId != 0 );
+    SelectItem(lId);
+    PopupMenu(m_pMenuPopup, event.GetX(), event.GetY());
+  }
+}
+
+
+void RegTreeCtrl::OnDeleteItem(wxTreeEvent& event)
+{
+}
+
+// test the key creation functions
+void RegTreeCtrl::OnMenuTest()
+{
+  long lId = GetSelection();
+  TreeNode *pNode = (TreeNode *)GetItemData(lId);
+
+  wxCHECK( pNode != NULL );
+
+  if ( pNode->IsRoot() ) {
+    wxLogError("Can't create a subkey under the root key.");
+    return;
+  }
+  if ( !pNode->IsKey() ) {
+    wxLogError("Can't create a subkey under a value!");
+    return;
+  }
+
+  wxRegKey key1(pNode->Key(), "key1");
+  if ( key1.Create() ) {
+    wxRegKey key2a(key1, "key2a"), key2b(key1, "key2b");
+    if ( key2a.Create() && key2b.Create() ) {
+      // put some values under the newly created keys
+      key1.SetValue("first_term", "10");
+      key1.SetValue("second_term", "7");
+      key2a = "this is the unnamed value";
+      key2b.SetValue("sum", 17);
+
+      // refresh tree
+      pNode->Refresh();
+      wxLogStatus("Test keys successfully added.");
+      return;
+    }
+  }
+  
+  wxLogError("Creation of test keys failed.");
+}
+
+void RegTreeCtrl::OnChar(wxKeyEvent& event)
+{
+  if ( event.KeyCode() == WXK_DELETE )
+    DeleteSelected();
+  else
+    wxTreeCtrl::OnChar(event);
+}
+
+void RegTreeCtrl::OnSelChanged(wxTreeEvent& event)
+{
+  wxFrame *pFrame = (wxFrame *)(wxWindow::GetParent());
+  pFrame->SetStatusText(GetNode(event)->FullName(), 1);
+}
+
+void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event)
+{
+  TreeNode *pNode = GetNode(event);
+  bool bExpanding = event.m_code == wxTREE_EXPAND_EXPAND;
+
+  // expansion might take some time
+  wxSetCursor(*wxHOURGLASS_CURSOR);
+  wxLogStatus("Working...");
+  wxYield();  // to give the status line a chance to refresh itself
+
+  if ( pNode->IsKey() ) {
+    if ( bExpanding ) {
+      // expanding: add subkeys/values
+      if ( !pNode->OnExpand() )
+        return;
+    }
+    else {
+      // collapsing: clean up
+      pNode->OnCollapse();
+    }
+
+    // change icon for non root key
+    if ( !pNode->IsRoot() ) {
+      int idIcon = bExpanding ? RegImageList::OpenedKey 
+                              : RegImageList::ClosedKey;
+      SetItemImage(pNode->Id(), idIcon, idIcon);
+    }
+  }
+
+  wxLogStatus("Ok");
+  wxSetCursor(*wxSTANDARD_CURSOR);
+}
+
+// ----------------------------------------------------------------------------
+// TreeNode implementation
+// ----------------------------------------------------------------------------
+bool RegTreeCtrl::TreeNode::OnExpand()
+{
+  // remove dummy item
+  if ( m_lDummy != 0 )
+    m_pTree->DeleteItem(m_lDummy);
+
+  if ( IsRoot() ) {
+    // we're the root key
+    m_pTree->AddStdKeys();
+    return true;
+  }
+
+  if ( Parent()->IsRoot() ) {
+    // we're a standard key
+    m_pKey = new wxRegKey(m_strName);
+  }
+  else {
+    // we're a normal key
+    m_pKey = new wxRegKey(*(Parent()->m_pKey), m_strName);
+  }
+
+  if ( !m_pKey->Open() ) {
+    m_lDummy = 0;
+    wxLogError("The key '%s' can't be opened.", FullName());
+    return false;
+  }
+
+  // enumeration variables
+  long l;
+  wxString str;
+  bool bCont;
+
+  // enumerate all subkeys
+  bCont = m_pKey->GetFirstKey(str, l);
+  while ( bCont ) {
+    m_pTree->InsertNewTreeNode(this, str, RegImageList::ClosedKey);
+    bCont = m_pKey->GetNextKey(str, l);
+  }
+
+  // enumerate all values
+  bCont = m_pKey->GetFirstValue(str, l);
+  while ( bCont ) {
+    wxString strItem;
+    if (str.IsEmpty())
+        strItem = "<default>";
+    else
+        strItem = str;
+    strItem += " = ";
+
+    // determine the appropriate icon
+    RegImageList::Icon icon;
+    switch ( m_pKey->GetValueType(str) ) {
+      case wxRegKey::Type_String:
+      case wxRegKey::Type_Expand_String:
+      case wxRegKey::Type_Multi_String:
+        {
+          wxString strValue;
+          icon = RegImageList::TextValue;
+          m_pKey->QueryValue(str, strValue);
+          strItem += strValue;
+        }
+        break;
+
+      case wxRegKey::Type_None:
+        // @@ handle the error...
+        icon = RegImageList::BinaryValue;
+        break;
+
+      case wxRegKey::Type_Dword:
+        {
+          char szBuf[128];
+          long l;
+          m_pKey->QueryValue(str, &l);
+          sprintf(szBuf, "%lx", l);
+          strItem += szBuf;
+        }
+
+        // fall through
+
+      default:
+        icon = RegImageList::BinaryValue;
+    }
+
+    m_pTree->InsertNewTreeNode(this, str, icon, &strItem);
+    bCont = m_pKey->GetNextValue(str, l);
+  }
+
+  return true;
+}
+
+void RegTreeCtrl::TreeNode::OnCollapse()
+{
+  bool bHasChildren = !m_aChildren.IsEmpty();
+  DestroyChildren();
+  if ( bHasChildren )
+    AddDummy();
+  else
+    m_lDummy = 0;
+
+  delete m_pKey;
+  m_pKey = NULL;
+}
+
+void RegTreeCtrl::TreeNode::AddDummy()
+{
+  // insert dummy item forcing appearance of [+] button
+  m_lDummy = m_pTree->InsertItem(Id(), "");
+}
+
+void RegTreeCtrl::TreeNode::DestroyChildren()
+{
+  // destroy all children
+  uint nCount = m_aChildren.Count();
+  for ( uint n = 0; n < nCount; n++ ) {
+    long lId = m_aChildren[n]->Id();
+    delete m_aChildren[n];
+    m_pTree->DeleteItem(lId);
+  }
+
+  m_aChildren.Empty();
+}
+
+RegTreeCtrl::TreeNode::~TreeNode()
+{
+  DestroyChildren();
+
+  delete m_pKey;
+}
+
+const char *RegTreeCtrl::TreeNode::FullName() const
+{
+  static wxString s_strName;
+
+  if ( IsRoot() ) {
+    return "Registry Root";
+  }
+  else {
+    // our own registry key might not (yet) exist or we might be a value, 
+    // so just use the parent's and concatenate
+    s_strName = Parent()->FullName();
+    s_strName << '\\' << m_strName;
+
+    return s_strName;
+  }
+}
+
+// ----------------------------------------------------------------------------
+// operations on RegTreeCtrl
+// ----------------------------------------------------------------------------
+
+void RegTreeCtrl::DeleteSelected()
+{
+  long lCurrent = GetSelection(),
+       lParent  = GetParent(lCurrent);
+
+  if ( lParent == 0 ) {
+    wxLogError("Can't delete root key.");
+    return;
+  }
+
+  TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent),
+           *pParent  = (TreeNode *)GetItemData(lParent);
+
+  wxCHECK ( pCurrent && pParent );
+
+  if ( pParent->IsRoot() ) {
+    wxLogError("Can't delete standard key.");
+    return;
+  }
+
+  if ( pCurrent->IsKey() ) {
+    if ( wxMessageBox("Do you really want to delete this key?",
+                      "Confirmation", 
+                      wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) {
+      return;
+    }
+
+    // must close key before deleting it
+    pCurrent->OnCollapse();
+
+    if ( pParent->Key().DeleteKey(pCurrent->m_strName) )
+      pParent->Refresh();
+  }
+  else {
+    if ( wxMessageBox("Do you really want to delete this value?",
+                      "Confirmation", 
+                      wxICON_QUESTION | wxYES_NO | wxCANCEL, this) != wxYES ) {
+      return;
+    }
+
+    if ( pParent->Key().DeleteValue(pCurrent->m_strName) )
+      pParent->Refresh();
+  }
+}
+
+void RegTreeCtrl::CreateNewKey(const wxString& strName)
+{
+  long lCurrent = GetSelection();
+  TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent);
+
+  wxCHECK( pCurrent != NULL );
+  
+  wxASSERT( pCurrent->IsKey() );  // check must have been done before
+
+  if ( pCurrent->IsRoot() ) {
+    wxLogError("Can't create a new key under the root key.");
+    return;
+  }
+
+  wxRegKey key(pCurrent->Key(), strName);
+  if ( key.Create() )
+    pCurrent->Refresh();
+}
+
+void RegTreeCtrl::CreateNewTextValue(const wxString& strName)
+{
+  long lCurrent = GetSelection();
+  TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent);
+
+  wxCHECK( pCurrent != NULL );
+  
+  wxASSERT( pCurrent->IsKey() );  // check must have been done before
+
+  if ( pCurrent->IsRoot() ) {
+    wxLogError("Can't create a new value under the root key.");
+    return;
+  }
+
+  if ( pCurrent->Key().SetValue(strName, "") )
+    pCurrent->Refresh();
+}
+
+void RegTreeCtrl::CreateNewBinaryValue(const wxString& strName)
+{
+  long lCurrent = GetSelection();
+  TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent);
+
+  wxCHECK( pCurrent != NULL );
+  
+  wxASSERT( pCurrent->IsKey() );  // check must have been done before
+
+  if ( pCurrent->IsRoot() ) {
+    wxLogError("Can't create a new value under the root key.");
+    return;
+  }
+
+  if ( pCurrent->Key().SetValue(strName, 0) )
+    pCurrent->Refresh();
+}
+
+bool RegTreeCtrl::IsKeySelected() const
+{
+  long lCurrent = GetSelection();
+  TreeNode *pCurrent = (TreeNode *)GetItemData(lCurrent);
+
+  wxCHECK_RET( pCurrent != NULL, false );
+
+  return pCurrent->IsKey();
+}
\ No newline at end of file
diff --git a/samples/regtest/regtest.rc b/samples/regtest/regtest.rc
new file mode 100644
index 0000000000..8d688bba6f
--- /dev/null
+++ b/samples/regtest/regtest.rc
@@ -0,0 +1,9 @@
+#include "wx/msw/wx.rc"
+
+app_icon 	ICON "registry.ico"
+icon_key1 	ICON "key1.ico"
+icon_key2 	ICON "key2.ico"
+icon_key3 	ICON "key3.ico"
+icon_value1 	ICON "value1.ico"
+icon_value2 	ICON "value2.ico"
+
diff --git a/samples/regtest/value1.ico b/samples/regtest/value1.ico
new file mode 100644
index 0000000000000000000000000000000000000000..d03a5d07629452d96cc127801a9e84007d98649b
GIT binary patch
literal 318
zcma)2F%kkH3|z*WxhqL?t(HEI4m;C%9be)pK0!LWxB*Wa3pZpp$xavsATVN#aGV3M
zx-xxoVg^iPKs)~;I&P{CA+toSmFkA|12eCf3?Dh|SiD%0&iMkAbfcNGr9vgX+Js;)
p?Z}f#lcDzMuifX8y!XTu<DQ~JH*6gWdjj{z{)j)7e}n^b23|($T_gYi

literal 0
HcmV?d00001

diff --git a/samples/regtest/value2.ico b/samples/regtest/value2.ico
new file mode 100644
index 0000000000000000000000000000000000000000..343fd1aaf0f7d99d7cd70f206cb0f46ccf8d21b2
GIT binary patch
literal 318
zcma)2Ar8YZ47_NQS{O7uxaWms&}?P?QXWvLU+5DC2P%1IM*))xc8TxKXM-p};>kI~
z@kqeUmF3Bum2f2k5`0FS_)w$^nHH@zst+tK%-pefJaQVC-ONR%`UJGRIIPu*uE%z)
oU1_5q8aelfqHIR~qmc_V)>OJKSONn30Q-A9;!out;li4LFUas}=l}o!

literal 0
HcmV?d00001

diff --git a/samples/taskbar/makefile.b32 b/samples/taskbar/makefile.b32
new file mode 100644
index 0000000000..497d91192b
--- /dev/null
+++ b/samples/taskbar/makefile.b32
@@ -0,0 +1,64 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds tab example
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXLIBDIR = $(WXDIR)\lib
+WXINC = $(WXDIR)\include\msw
+WXLIB = $(WXLIBDIR)\wx32.lib
+LIBS=$(WXLIB) cw32 import32 ole2w32
+
+TARGET=tbtest
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = tbtest.obj
+
+$(TARGET).exe:	$(OBJECTS) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+tbtest.obj:      tbtest.$(SRCSUFF)
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
+
diff --git a/samples/taskbar/makefile.bcc b/samples/taskbar/makefile.bcc
new file mode 100644
index 0000000000..aa2c61b4a8
--- /dev/null
+++ b/samples/taskbar/makefile.bcc
@@ -0,0 +1,73 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds tbtest example (DOS).
+
+!if "$(BCCDIR)" == ""
+!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
+!endif
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makebcc.env
+
+THISDIR = $(WXDIR)\samples\taskbar
+WXLIB = $(WXDIR)\lib\wx.lib
+LIBS=$(WXLIB) mathwl cwl import
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+CFG=$(WXDIR)\src\wxwin.cfg
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS=
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = tbtest.obj
+
+tbtest:    tbtest.exe
+
+all:    tbtest.exe
+
+tbtest.exe:    $(WXLIB) tbtest.obj tbtest.def tbtest.res
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj tbtest.obj
+tbtest
+nul
+$(LIBS)
+tbtest.def
+!
+        rc -31 -K tbtest.res
+
+.$(SRCSUFF).obj:
+	bcc $(CPPFLAGS) -c {$< }
+
+tbtest.obj:      tbtest.$(SRCSUFF)
+
+tbtest.res :      tbtest.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa tbtest
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
diff --git a/samples/taskbar/makefile.dos b/samples/taskbar/makefile.dos
new file mode 100644
index 0000000000..1872f14856
--- /dev/null
+++ b/samples/taskbar/makefile.dos
@@ -0,0 +1,65 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds taskbar example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+THISDIR = $(WXDIR)\samples\taskbar
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+HEADERS =
+SOURCES = tbtest.$(SRCSUFF)
+OBJECTS = tbtest.obj
+
+all:    tbtest.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+tbtest.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) tbtest.obj tbtest.def tbtest.res
+        link $(LINKFLAGS) @<<
+tbtest.obj $(WXDIR)\src\msw\dummy.obj,
+tbtest,
+NUL,
+$(LIBS),
+tbtest.def
+;
+<<
+        rc -K tbtest.res
+
+tbtest.obj:      tbtest.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+tbtest.res :      tbtest.rc $(WXDIR)\include\wx\msw\wx.rc
+    rc -r /i$(WXDIR)\include tbtest
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/taskbar/makefile.g95 b/samples/taskbar/makefile.g95
new file mode 100644
index 0000000000..a26fef6cd7
--- /dev/null
+++ b/samples/taskbar/makefile.g95
@@ -0,0 +1,37 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for taskbar example
+
+WXDIR = ../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/makeg95.env
+
+OBJECTS = $(OBJDIR)/tbtest.$(OBJSUFF) $(OBJDIR)/tbtest_resources.$(OBJSUFF)
+
+all:    $(OBJDIR) tbtest$(GUISUFFIX)$(EXESUFF)
+
+wx:
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+tbtest$(GUISUFFIX)$(EXESUFF):	$(OBJECTS) $(WXLIB)
+	$(CC) $(LDFLAGS) -o tbtest$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
+
+$(OBJDIR)/tbtest.$(OBJSUFF):	tbtest.$(SRCSUFF)
+	$(CC) -c $(CPPFLAGS) -o $@ tbtest.$(SRCSUFF)
+
+$(OBJDIR)/tbtest_resources.o:  tbtest.rc
+	$(RESCOMP) -i tbtest.rc -o $(OBJDIR)/tbtest_resources.o $(RESFLAGS)
+
+clean:
+	rm -f $(OBJECTS) tbtest$(GUISUFFIX).exe core *.rsc *.res
diff --git a/samples/taskbar/makefile.nt b/samples/taskbar/makefile.nt
new file mode 100644
index 0000000000..459749a077
--- /dev/null
+++ b/samples/taskbar/makefile.nt
@@ -0,0 +1,64 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds tab example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+WXUSINGDLL=0
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\samples\taskbar
+PROGRAM=tbtest
+
+OBJECTS = $(PROGRAM).obj
+
+$(PROGRAM):    $(PROGRAM).exe
+
+all:    wx $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+
+$(PROGRAM).obj:      $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
diff --git a/samples/taskbar/mondrian.ico b/samples/taskbar/mondrian.ico
new file mode 100644
index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53
GIT binary patch
literal 766
zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Z<M**w4TKL=5})Lnt5#WHKB$
zaDbtqp#doIAB-6O{|B*v7zjZ^AOa2W|NsACHyAJ}De?dRKnp(HN~rljcR;{k;{zQE
i@;}UZ|9Q?Fpp*~yJCwmWbLIrN`9Qm9%}2L?p!oo$cZ4ed

literal 0
HcmV?d00001

diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp
new file mode 100644
index 0000000000..7618108bc6
--- /dev/null
+++ b/samples/taskbar/tbtest.cpp
@@ -0,0 +1,120 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        tbtest.cpp
+// Purpose:     wxTaskBarIcon demo
+// Author:      Julian Smart
+// Modified by:
+// Created:     01/02/97
+// RCS-ID:      $Id$
+// Copyright:   (c)
+// Licence:   	wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx.h"
+#endif
+
+#include "wx/msw/taskbar.h"
+#include "tbtest.h"
+
+// Declare two frames
+MyDialog   *dialog = NULL;
+
+IMPLEMENT_APP(MyApp)
+
+bool MyApp::OnInit(void)
+{
+    wxIcon icon("mondrian_icon");
+
+    if (!m_taskBarIcon.SetIcon(icon, "wxTaskBarIcon Sample"))
+        wxMessageBox("Could not set icon.");
+
+    // Create the main frame window
+    dialog = new MyDialog(NULL, -1, "wxTaskBarIcon Test Dialog", wxPoint(-1, -1), wxSize(365, 290), wxDIALOG_MODELESS|wxDEFAULT_DIALOG_STYLE);
+
+    dialog->Show(TRUE);
+
+    return TRUE;
+}
+
+BEGIN_EVENT_TABLE(MyDialog, wxDialog)
+    EVT_BUTTON(wxID_OK, MyDialog::OnOK)
+    EVT_BUTTON(wxID_EXIT, MyDialog::OnExit)
+END_EVENT_TABLE()
+
+MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
+    const wxPoint& pos, const wxSize& size, const long windowStyle):
+  wxDialog(parent, id, title, pos, size, windowStyle)
+{
+    Init();
+}
+
+void MyDialog::OnOK(wxCommandEvent& event)
+{
+    Show(FALSE);
+}
+
+void MyDialog::OnExit(wxCommandEvent& event)
+{
+    Close(TRUE);
+}
+
+void MyDialog::OnCloseWindow(wxCloseEvent& event)
+{
+    Destroy();
+}
+
+void MyDialog::Init(void)
+{
+  int dialogWidth = 365;
+  int dialogHeight = 290;
+
+  wxStaticText* stat = new wxStaticText(this, -1, "Press OK to hide me, Exit to quit.",
+    wxPoint(10, 20));
+  
+  wxStaticText* stat2 = new wxStaticText(this, -1, "Double-click on the taskbar icon to show me again.",
+    wxPoint(10, 40));
+
+  wxButton *okButton = new wxButton(this, wxID_OK, "OK", wxPoint(100, 230), wxSize(80, 25));
+  wxButton *exitButton = new wxButton(this, wxID_EXIT, "Exit", wxPoint(185, 230), wxSize(80, 25));
+  okButton->SetDefault();
+  this->Centre(wxBOTH);
+}
+
+// Overridables
+void MyTaskBarIcon::OnMouseMove(void)
+{
+}
+
+void MyTaskBarIcon::OnLButtonDown(void)
+{
+}
+
+void MyTaskBarIcon::OnLButtonUp(void)
+{
+}
+
+void MyTaskBarIcon::OnRButtonDown(void)
+{
+}
+
+void MyTaskBarIcon::OnRButtonUp(void)
+{
+}
+
+void MyTaskBarIcon::OnLButtonDClick(void)
+{
+    dialog->Show(TRUE);
+}
+
+void MyTaskBarIcon::OnRButtonDClick(void)
+{
+}
+
+
diff --git a/samples/taskbar/tbtest.def b/samples/taskbar/tbtest.def
new file mode 100644
index 0000000000..db80cc854b
--- /dev/null
+++ b/samples/taskbar/tbtest.def
@@ -0,0 +1,8 @@
+NAME         TBTest
+DESCRIPTION  'wxTaskBarIcon test'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     1024
+STACKSIZE    16192
diff --git a/samples/taskbar/tbtest.h b/samples/taskbar/tbtest.h
new file mode 100644
index 0000000000..a1a01e3a56
--- /dev/null
+++ b/samples/taskbar/tbtest.h
@@ -0,0 +1,50 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        tbtest.h
+// Purpose:     wxTaskBarIcon sample
+// Author:      Julian Smart
+// Modified by:
+// Created:     01/02/97
+// RCS-ID:      $Id$
+// Copyright:   (c)
+// Licence:   	wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+class MyTaskBarIcon: public wxTaskBarIcon
+{
+public:
+	MyTaskBarIcon() {};
+
+    virtual void OnMouseMove(void);
+    virtual void OnLButtonDown(void);
+    virtual void OnLButtonUp(void);
+    virtual void OnRButtonDown(void);
+    virtual void OnRButtonUp(void);
+    virtual void OnLButtonDClick(void);
+    virtual void OnRButtonDClick(void);
+};
+
+
+// Define a new application
+class MyApp: public wxApp
+{
+public:
+    bool OnInit(void);
+protected:
+    MyTaskBarIcon   m_taskBarIcon;
+};
+
+class MyDialog: public wxDialog
+{
+public:
+    MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
+        const wxPoint& pos, const wxSize& size, const long windowStyle = wxDEFAULT_DIALOG_STYLE);
+
+    void OnOK(wxCommandEvent& event);
+    void OnExit(wxCommandEvent& event);
+    void OnCloseWindow(wxCloseEvent& event);
+    void Init(void);
+
+DECLARE_EVENT_TABLE()
+};
+
+
diff --git a/samples/taskbar/tbtest.rc b/samples/taskbar/tbtest.rc
new file mode 100644
index 0000000000..a05f21065a
--- /dev/null
+++ b/samples/taskbar/tbtest.rc
@@ -0,0 +1,3 @@
+mondrian_icon ICON "mondrian.ico"
+#include "wx/msw/wx.rc"
+
diff --git a/src/msw/ctl3d/borland/makefile.b32 b/src/msw/ctl3d/borland/makefile.b32
new file mode 100644
index 0000000000..1783689b82
--- /dev/null
+++ b/src/msw/ctl3d/borland/makefile.b32
@@ -0,0 +1,25 @@
+#
+# File:		makefile.b32
+# Author:       Andre Beltman
+# Created:	1995
+# Updated:	
+# Copyright:    (c) 1995, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Imports 32bit ctl3d library for Windows 95
+# and Borland C++ 4.x
+
+WXDIR = $(WXWIN)
+WXLIB = $(WXDIR)\lib
+
+LIBTARGET= $(WXLIB)\ctl3d32.lib
+
+all:    $(LIBTARGET)
+
+$(LIBTARGET):
+	erase $(LIBTARGET)
+        implib $(LIBTARGET) ..\ctl3d32.dll
+
+clean:
+        -erase $(LIBTARGET)
diff --git a/src/msw/ctl3d/borland/makefile.bcc b/src/msw/ctl3d/borland/makefile.bcc
new file mode 100644
index 0000000000..6a0bcdb158
--- /dev/null
+++ b/src/msw/ctl3d/borland/makefile.bcc
@@ -0,0 +1,25 @@
+#
+# File:		makefile.b32
+# Author:       Andre Beltman
+# Created:	1995
+# Updated:	
+# Copyright:    (c) 1995, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Imports ctl3d library
+# and Borland C++ 4.x
+
+WXDIR = $(WXWIN)
+WXLIB = $(WXDIR)\lib
+
+LIBTARGET= $(WXLIB)\ctl3dv2.lib
+
+all:    $(LIBTARGET)
+
+$(LIBTARGET):
+	erase $(LIBTARGET)
+        implib $(LIBTARGET) ..\ctl3dv2.dll
+
+clean:
+        -erase $(LIBTARGET)
diff --git a/src/msw/ctl3d/ctl3d.dll b/src/msw/ctl3d/ctl3d.dll
new file mode 100644
index 0000000000000000000000000000000000000000..74f3db72c6fe19728eb98fd0a72ca30c5cfbe6a4
GIT binary patch
literal 20964
zcmeHve_T}8weLQ2hG7`^05OIrQ5=m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dNkSK!$e2(%b5`-Y}xCun{-1T*Bgwm`B2n+zBd*)V#D2L^TP
z`C9x%;8sa<<dPgR_lD4J;`yR9ojLMX;*YN7FI<wla$&Brg#FI^x1g}JXlF6wmr@f<
zLh(ZfQv>&$i7>VDE6QPjC>u7GEG%7H2Ga{=>C@9^q)*S8PAyY$5QINSwrO?gw{urN
zUBdeRwqSNyIjj}fFZ}PHO~FABVVPI5c}@9-O}sR_Vq?ZUJO1l`hR~iZ{zl$r;JpI}
zU<B_dDc?*O?wgv<`x}Y!g)q#@OIL5?9RgN_92mPFheV4?)~(){UAF1l<r~(muRxvg
zYX9G1fA^4Rn`)mnW5#_`W@O-q>2{V^URGSWrh=oyU+Wu0(J1_3G#$nuiQP9jee(3l
g>FAX)$LjJBlZJ!81?8(tH*XZ9k1<~(hKGLsFFx8ar~m)}

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/ctl3d32.dll b/src/msw/ctl3d/ctl3d32.dll
new file mode 100644
index 0000000000000000000000000000000000000000..a4d26ed9232e1ff1805ce699f41e999d60017f0a
GIT binary patch
literal 26623
zcmeHw4SZD9weOyfkRi#B8E|5w1{trDHcG&m%p~)b2?+@pCFta9LM;lBOqfhVl1|PT
zq)`(mK;j{lXT7cWR$D0Aa{Z{(>lLh`;X^>BUi<*5QjOn36Kh(ngknASzxFxvk$~QJ
zfA_ujd%yR3aPM>W-fOSD*4k^Yz4kgM<I?LkGYw-*izG>m?ZTa|GM;~Z){EvDbAB^}
zJwE-nm+Vqi|MrslU~8ADGu*K{+_c8Ds;RxbLonSKFoh%Srq*^-<+XLDH66`?`575z
z1+#AvW7R4hd*g7LB|g{)n|4X2O6_1Js3E|5#)cQ;Zb0%OF}8v~s~J<Fpk{M8`Mkw|
z8sY^PnsK2M{@XG~epG508)59X1aO40%{tu28CyA>TBlwr7E43j4#sk)HvKos^M$}#
z0sZHDkbyqVt3r1itqCN}zp<-}%FbG3K6*O)>V<gbhnt&(CdPCm5YWn*FT*|MD#NVK
zm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zg}lz7q1f{xJk!PbK|C40DZf-qYou5-PIyXLjyKas
z(R8U<rkdi>{KE^mipQq^NqGhpMv7lgQ_33LDK4IRWH+U>6BxzI>3mNY4MQ>RbY(mh
z%QRBldoypP@iR0OV~@*^$}3Ucq4d?DY(U(c;wf~2UL(cP@dA%uRHn&{(?jz?G56b*
zb`9PSQOrJ056Pcm@fR!YB=d2Ue}Rr9qcoOf++t$vXLu%F@nwd(>=MABoqx>3rfV!_
z#*Xqf%2X=)Td_g#mqjJeOL2b-I+M(_EZuknlkXx>T%-^9Eo}BHz~euRk#5BIWBh;l
zLhZx{z6WDh;x6lhhT;3MNo9P`#mGIPi{SBn7<-<VsGMQM_h3qdP{D`t7}^P+7V;Xw
zWIv;nN#0wo!1ozSS;eMl3>M%A{pqMnXL_U0hS(DZYCswDVWjsTuR$JAYtCP<2l@$k
zEEBY68iz|UzQP~YgV9jN@P<^rh=wwh=cB(4&!AUB?@?0Q>77c249;mjg2K;$k9ei|
nruQw?C}WwTeVS$%i}yI5QHAlRtF}OR^fLr>=`f%2Q!@V#Wj+fD

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/ctl3dv2.dll b/src/msw/ctl3d/ctl3dv2.dll
new file mode 100644
index 0000000000000000000000000000000000000000..7db141d43faf23bba0e6bd7699700c002a020a72
GIT binary patch
literal 27620
zcmeHwe|%KcweLQ2W+uZVpGgQm1cWdmq-X$v&?sW~oe5M7fxrZ{22sKfg@ooOVjF^E
z!;FU@^;xdY?e$8r+S~SWz1D{VcrpAaL7*0p(iE+w!Qu=_(=?`GOyivUU3;H1b0!J2
zz3;ux=l#*>oc(L<wbx#I?X}lld!NGt51o@tj4?BQs>)aZA^pwf&znDLQS2Cf(81mw
z@blXO(xRW=wrt({a_6S9(zRu)Hag3Szfrlqthn6y!1~9_O3O>vR5%OQm#i+WE}vu{
zt6|Q|vD|k}YgF=p2>kzAip)#ROlBWRv)Q9;2m6rynvDUSBRQca+gxV00!W_EZez2P
zZet7B_j2+_eJ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GU^mS#)%$!nd|EGjGw~1u
zs0LGO^D>&JTf^1i@Q5f3!<kzQ2AYRps;^gj!}sej#OD|c7g^K*pS|H-QJ6Ow^oHJ+
z7ifr{?bWI`{9+X526(oH!_7L(oBh+X9W?(-6sF&PZH8orH|a1WvIcsH2Re1@_+0#9
z_-4W7_$k?M>PJGmiRY^lKB!r+694>7!NSFPD;MUu7PJ2{{}End35VZeRnfy)T1C1x
z(0jd^0wcSiq70^|YyF1eg(YiB85@PX$<roJpFAxGFG4UJdJm<4m}S$dlBe=kZ7gQ7
ze_Lu^X&LNPe$oWEi8!7oEc1)YA1_<KiO!$cyowE(^PTu#`)8<}^TfYvR1Wyzu(1i=
zU0ha9uu~^xPMHK-o!Yz=R}~h*EH5irwShN^Jl*AWFDP16ymr-wd8M14DqFvH9d3I>
zqt1Ub{M%PV-z4Xh>C>l9!~^&3aNs|P<(HMNu6(?LqwSBfQJ_nM(Me-dCuB~UFnI!}
dZ7lG(SCvH>Hkg^&va(er<r@Si2ADrJ|2IW#tn~l@

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/msvc/ctl3d.h b/src/msw/ctl3d/msvc/ctl3d.h
new file mode 100644
index 0000000000..de7e67aa50
--- /dev/null
+++ b/src/msw/ctl3d/msvc/ctl3d.h
@@ -0,0 +1,61 @@
+/*-----------------------------------------------------------------------
+|	CTL3D.DLL
+|	
+|	Adds 3d effects to Windows controls
+|
+|	See ctl3d.doc for info
+|		
+-----------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD);
+BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD);
+WORD WINAPI Ctl3dGetVer(void);
+BOOL WINAPI Ctl3dEnabled(void);
+HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG);	// ARCHAIC, use Ctl3dCtlColorEx
+HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam);
+BOOL WINAPI Ctl3dColorChange(void);
+BOOL WINAPI Ctl3dSubclassCtl(HWND);
+LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM);
+
+BOOL WINAPI Ctl3dAutoSubclass(HANDLE);
+
+BOOL WINAPI Ctl3dRegister(HANDLE);
+BOOL WINAPI Ctl3dUnregister(HANDLE);
+
+//begin DBCS: far east short cut key support
+VOID WINAPI Ctl3dWinIniChange(void);
+//end DBCS
+
+
+/* Ctl3dSubclassDlg3d flags */
+#define CTL3D_BUTTONS		0x0001
+#define CTL3D_LISTBOXES		0x0002		
+#define CTL3D_EDITS			0x0004	
+#define CTL3D_COMBOS			0x0008		
+#define CTL3D_STATICTEXTS	0x0010		
+#define CTL3D_STATICFRAMES	0x0020
+
+#define CTL3D_NODLGWINDOW       0x00010000
+#define CTL3D_ALL				0xffff
+
+#define WM_DLGBORDER (WM_USER+3567)
+/* WM_DLGBORDER *(int FAR *)lParam return codes */
+#define CTL3D_NOBORDER		0
+#define CTL3D_BORDER			1
+
+#define WM_DLGSUBCLASS (WM_USER+3568)
+/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */
+#define CTL3D_NOSUBCLASS	0
+#define CTL3D_SUBCLASS		1
+
+/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */
+#define CTL3D_3DCHECK 26567
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/msw/ctl3d/msvc/ctl3d.lib b/src/msw/ctl3d/msvc/ctl3d.lib
new file mode 100644
index 0000000000000000000000000000000000000000..2bd74e2114e2909f073a5ef6e7467e8b215a71fe
GIT binary patch
literal 2560
zcmeH}OK;Oa5Xb)^4Ue>HUIjsUMHL5B^?;NfIOG5%;UVP^5tW=cIEfW3xptMf5{Qd0
zNEV-hFT(fX2;YG5%x=7E`^W{sN_oxt_urY>+1dQ816P47P$RCPIvY)pw197wO8UJv
zi2UC2M-^YUPwA(DxQ<<(f8|E++%=Lr%$YXfD=6pNXfi*&oG*N5vl;p;BoA1m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?m`^rnpl
zGW+@P-a98)xTgJ@LU<@)ng4YDa}`X2`Dhu=I{Ep!P;gs0F3TVJKbU(;BS`%>q{48?
zW{3zs^j0N!Ln`>o1$-U5z3^-rY6jfl2wGxcxMDIy4eX7Tqr90$aF+>exiD<&42k`m
zzhienZX^|~=U=3P-O;g043qO2e-bP+hV*<(E*#Wxl0Cw=(BSu;ovToK0Pz8PP}B%V
zT{yD(qrOQhz^uPiD5!>@B>S5EWCT~*-~(da{#-6BO`Ro+-`G`S_0gx|)#E2p!O~R8
zedqY?qsji0sV|n!nLBd4Kq0=z0Vq)k)4t8L_9+rRi6!wSF6n%RO8Bn+hEMV{@q*WZ
zCk?9SN7o43HDUYtHIMb*`;DT*7o{h;Zgg;nA<*YvT}<?GzF`f_x;X$TFIMM1K%qsB
zQcPN(U8I~+F8#D9j7+^@YyRK<XauNG={iIgZ`Zu-6MB9^>*zf_7xd{5@j3Y$P$@2I
z+6Ly1rcR~_xt3{r>pILOMJv)=I&Eu-+%F9Eht`;WR5CW7q;-~$tfyte<rPw_-nhqW
I@Bg{`FRw|wz5oCK

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/readme.txt b/src/msw/ctl3d/readme.txt
new file mode 100644
index 0000000000..58c656ba7d
--- /dev/null
+++ b/src/msw/ctl3d/readme.txt
@@ -0,0 +1,31 @@
+
+CTL3D
+-----
+
+CTL3D gives 3D controls to 16-bit Windows 3.1 applications.
+Its use in wxWindows is controlled by the CTL3D symbol
+in include/base/wx_setup.h.
+
+If using a 16-bit compiler, copy ctl3dv2.lib to your compiler
+library directory, and remember to distribute ctl3dv2.dll
+with your applications. The DLL should be copied to
+windows/system and DELETED from the application installation
+directory.
+
+If using Watcom C++ in 386 mode, things are slightly more complex: you need
+to link with Patrick Halke's ctl3d32.obj which provides an interface
+from 32-bits to the 16-bit CTL3DV2 library. Link your application
+with ctl3d32.obj file instead of ctl3dv2.lib, distributing
+ctl3dv2.dll as above.
+
+ctl3d.dll           ; Version 1 of the CTL3D library DLL: obsolete
+ctl3dv2.dll         ; Version 2 of the CTL3D library DLL
+readme.txt          ; This file
+
+msvc/ctl3d.h        ; Header file for either version of CTL3D
+msvc/ctl3d.lib      ; Import library for 16-bit compilers
+watcom/import32.zip ; Import libraries for Watcom WIN32 compilation
+wat386/             ; Source & objects for Watcom 386 object file to
+                    ; interface 16<->32 bit modes
+borland/            ; Makefiles for making import libraries for Borland
+
diff --git a/src/msw/ctl3d/wat32/import32.zip b/src/msw/ctl3d/wat32/import32.zip
new file mode 100644
index 0000000000000000000000000000000000000000..69f318ccbd57f63d280ea7bd996529795ce21f6a
GIT binary patch
literal 22993
zcmeFYW0Ni2wys^XT%#(=wr$(SEZeqi+qP|MmTlX%?W!}^*?T=}$By?8yb))7$&r~Y
zBBNzoz2)6|znh#C2q-cT5D+BLjh6u4r!2fuItUODJ`@lT;O|uh5dmQt5n3fRr7Pt=
zn@v{uF6ddl$!b8ssHJT*;q}nj9~xGAgFGE4x-PjzvoTr`0I{)1s+XrJxp`u9AZq)Q
z91f~R!o&8YCzDc+wad!|7ko=dXh$wv-Hwl%uD=b}2@$%s`yLCpSypIQ*nG45^D$N~
z_e3LKKyamlGhmu&w9!>Y7%pfHBfq)@qRgp?gejo0F8}Ep;R`9CObgG{r;b+el<Rk#
zpbm20m6p(j1+^Y@bW1<{q5lCrqmvS(4xZ9v<7qHAc$sJb9!>v^H>4R1%(wuR#eU8%
z@MZJYl~!8)WFwA%dJ;PD7uh|$H(jBN%X}4zSdA3**vwrtYno|vDatR`mlygxu`-YO
zKgR&}zQNL2r!!`+oqW{-=m(dasj%im??_evY4E9*0DJs-N)21{SIn3=7S4pK)!=XQ
z07zjhInMQ4GdWPu6?*C}?w9U7XF%8=l6e6!Fxk_A^8WF;@vMpCrwd~wTGb=U_WPlJ
z=P?Q|x79DfG{O?bo^=Z^)Fk{1?MflSj{Jlyma2MY?`Y>7`6Y?~WP4|liB|?vQH-fS
zzkkrFD8-any0Wb?l2Rz;v8-cHAFR&!=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-0#F^u%$+_bUAl
rfARcroxf?0U-Ex4_x|Y>e>LOP6frLquNNIOLQwz3BwD{X3k3Q<;EQZd

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/wat386/ctl3d.h b/src/msw/ctl3d/wat386/ctl3d.h
new file mode 100644
index 0000000000..de7e67aa50
--- /dev/null
+++ b/src/msw/ctl3d/wat386/ctl3d.h
@@ -0,0 +1,61 @@
+/*-----------------------------------------------------------------------
+|	CTL3D.DLL
+|	
+|	Adds 3d effects to Windows controls
+|
+|	See ctl3d.doc for info
+|		
+-----------------------------------------------------------------------*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+BOOL WINAPI Ctl3dSubclassDlg(HWND, WORD);
+BOOL WINAPI Ctl3dSubclassDlgEx(HWND, DWORD);
+WORD WINAPI Ctl3dGetVer(void);
+BOOL WINAPI Ctl3dEnabled(void);
+HBRUSH WINAPI Ctl3dCtlColor(HDC, LONG);	// ARCHAIC, use Ctl3dCtlColorEx
+HBRUSH WINAPI Ctl3dCtlColorEx(UINT wm, WPARAM wParam, LPARAM lParam);
+BOOL WINAPI Ctl3dColorChange(void);
+BOOL WINAPI Ctl3dSubclassCtl(HWND);
+LONG WINAPI Ctl3dDlgFramePaint(HWND, UINT, WPARAM, LPARAM);
+
+BOOL WINAPI Ctl3dAutoSubclass(HANDLE);
+
+BOOL WINAPI Ctl3dRegister(HANDLE);
+BOOL WINAPI Ctl3dUnregister(HANDLE);
+
+//begin DBCS: far east short cut key support
+VOID WINAPI Ctl3dWinIniChange(void);
+//end DBCS
+
+
+/* Ctl3dSubclassDlg3d flags */
+#define CTL3D_BUTTONS		0x0001
+#define CTL3D_LISTBOXES		0x0002		
+#define CTL3D_EDITS			0x0004	
+#define CTL3D_COMBOS			0x0008		
+#define CTL3D_STATICTEXTS	0x0010		
+#define CTL3D_STATICFRAMES	0x0020
+
+#define CTL3D_NODLGWINDOW       0x00010000
+#define CTL3D_ALL				0xffff
+
+#define WM_DLGBORDER (WM_USER+3567)
+/* WM_DLGBORDER *(int FAR *)lParam return codes */
+#define CTL3D_NOBORDER		0
+#define CTL3D_BORDER			1
+
+#define WM_DLGSUBCLASS (WM_USER+3568)
+/* WM_DLGSUBCLASS *(int FAR *)lParam return codes */
+#define CTL3D_NOSUBCLASS	0
+#define CTL3D_SUBCLASS		1
+
+/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */
+#define CTL3D_3DCHECK 26567
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/msw/ctl3d/wat386/ctl3d32.c b/src/msw/ctl3d/wat386/ctl3d32.c
new file mode 100644
index 0000000000..67f845071e
--- /dev/null
+++ b/src/msw/ctl3d/wat386/ctl3d32.c
@@ -0,0 +1,285 @@
+/*
+ * File:	ctl3d32.c
+ * Purpose:	32bit interface to CTL3D functions for Watcom C/C++
+ * Author:	Patrick Halke
+ * Created:	1995
+ * Updated:	
+ * Copyright:	(c) 1995
+ */
+
+#include <malloc.h>
+
+#include <windows.h>
+
+#include "ctl3d.h"
+
+#if defined(__WINDOWS_386__)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef FAR
+#define FAR
+
+#define INDIR_INT INDIR_WORD
+#define INDIR_UINT INDIR_WORD
+#define INDIR_WPARAM INDIR_UINT
+#define INDIR_LPARAM INDIR_DWORD
+#define INDIR_LONG INDIR_DWORD
+#define INDIR_ULONG INDIR_DWORD
+
+#ifdef STRICT
+#define INDIR_HANDLE INDIR_PTR
+#define INDIR_HWND INDIR_PTR
+#define INDIR_HDC INDIR_PTR
+#else
+#define INDIR_HANDLE INDIR_UINT
+#define INDIR_HWND INDIR_UINT
+#define INDIR_HDC INDIR_UINT
+#endif
+
+typedef struct tagCTL3DFUNCTIONS {
+    HINSTANCE	dll;
+    /* Function Handles */
+    HINDIR	_Ctl3dSubclassDlg;
+    HINDIR	_Ctl3dSubclassDlgEx;
+    HINDIR	_Ctl3dGetVer;
+    HINDIR	_Ctl3dEnabled;
+    HINDIR	_Ctl3dCtlColor;
+    HINDIR	_Ctl3dCtlColorEx;
+    HINDIR	_Ctl3dColorChange;
+    HINDIR	_Ctl3dSubclassCtl;
+    HINDIR	_Ctl3dDlgFramePaint;
+    HINDIR	_Ctl3dAutoSubclass;
+    HINDIR	_Ctl3dRegister;
+    HINDIR	_Ctl3dUnregister;
+    HINDIR	_Ctl3dWinIniChange;
+} CTL3DFUNCTIONS;
+
+static CTL3DFUNCTIONS	Ctl3dFunc = { 0 };
+
+static BOOL load_functions( CTL3DFUNCTIONS* functions )
+{
+    FARPROC		proc;
+    HINSTANCE		dll;
+
+    dll = LoadLibrary( "CTL3D.DLL" );
+    if( dll < HINSTANCE_ERROR ) {
+	return( FALSE );
+    }
+
+    /* Function thunks */
+    
+    proc = GetProcAddress(dll, "Ctl3dSubclassDlg");
+    functions->_Ctl3dSubclassDlg = GetIndirectFunctionHandle( proc,
+	INDIR_HWND,
+	INDIR_WORD,
+	INDIR_ENDLIST );
+    
+    proc = GetProcAddress( dll, "Ctl3dSubclassDlgEx" );
+    functions->_Ctl3dSubclassDlgEx = GetIndirectFunctionHandle( proc,
+	INDIR_HWND,
+	INDIR_DWORD,
+	INDIR_ENDLIST );
+    
+    proc = GetProcAddress( dll, "Ctl3dGetVer" );
+    functions->_Ctl3dGetVer = GetIndirectFunctionHandle( proc,
+	INDIR_ENDLIST );
+    
+    proc = GetProcAddress( dll, "Ctl3dEnabled" );
+    functions->_Ctl3dEnabled = GetIndirectFunctionHandle( proc,
+	INDIR_ENDLIST );
+    
+    proc = GetProcAddress( dll, "Ctl3dCtlColor" );
+    functions->_Ctl3dCtlColor = GetIndirectFunctionHandle( proc,
+	INDIR_HDC,
+	INDIR_LONG,
+	INDIR_ENDLIST );
+    
+    proc = GetProcAddress( dll, "Ctl3dCtlColorEx" );
+    functions->_Ctl3dCtlColorEx = GetIndirectFunctionHandle( proc,
+	INDIR_UINT,
+	INDIR_WPARAM,
+	INDIR_LPARAM,
+	INDIR_ENDLIST );
+
+    proc = GetProcAddress( dll, "Ctl3dColorChange" );
+    functions->_Ctl3dColorChange = GetIndirectFunctionHandle( proc,
+	INDIR_ENDLIST );
+
+    proc = GetProcAddress( dll, "Ctl3dSubclassCtl" );
+    functions->_Ctl3dSubclassCtl = GetIndirectFunctionHandle( proc,
+	INDIR_HWND,
+	INDIR_ENDLIST );
+  
+    proc = GetProcAddress( dll, "Ctl3dDlgFramePaint" );
+    functions->_Ctl3dDlgFramePaint = GetIndirectFunctionHandle( proc,
+	INDIR_HWND,
+	INDIR_UINT,
+	INDIR_WPARAM,
+	INDIR_LPARAM,
+	INDIR_ENDLIST );
+  
+    proc = GetProcAddress( dll, "Ctl3dAutoSubclass" );
+    functions->_Ctl3dAutoSubclass = GetIndirectFunctionHandle( proc,
+	INDIR_HANDLE,
+	INDIR_ENDLIST );
+  
+    proc = GetProcAddress( dll, "Ctl3dRegister" );
+    functions->_Ctl3dRegister = GetIndirectFunctionHandle( proc,
+	INDIR_HANDLE,
+	INDIR_ENDLIST );
+  
+    proc = GetProcAddress( dll, "Ctl3dUnregister" );
+    functions->_Ctl3dUnregister = GetIndirectFunctionHandle( proc,
+	INDIR_HANDLE,
+	INDIR_ENDLIST );
+  
+    proc = GetProcAddress( dll, "Ctl3dWinIniChange" );
+    functions->_Ctl3dWinIniChange = GetIndirectFunctionHandle( proc,
+	INDIR_ENDLIST );
+
+    functions->dll = dll;
+    return( TRUE );
+}
+
+static void unload_functions( CTL3DFUNCTIONS * functions )
+{
+    FreeLibrary( functions->dll );
+    functions->dll = 0;
+}
+
+/* Function Definitions */
+
+BOOL WINAPI Ctl3dSubclassDlg(HWND hwnd, WORD w)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlg,
+				      hwnd, w);
+}
+
+BOOL WINAPI Ctl3dSubclassDlgEx(HWND hwnd, DWORD dw)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassDlgEx,
+				      hwnd, dw);
+}
+
+WORD WINAPI Ctl3dGetVer(void)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+      return FALSE;
+  
+  return (WORD)InvokeIndirectFunction(Ctl3dFunc._Ctl3dGetVer);
+}
+
+BOOL WINAPI Ctl3dEnabled(void)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+      return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dEnabled);
+}
+
+HBRUSH WINAPI Ctl3dCtlColor(HDC hdc, LONG l)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColor,
+				        hdc, l);
+}
+
+HBRUSH WINAPI Ctl3dCtlColorEx(UINT ui, WPARAM wp, LPARAM lp)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (HBRUSH)InvokeIndirectFunction(Ctl3dFunc._Ctl3dCtlColorEx,
+				        ui, wp, lp);
+}
+
+BOOL WINAPI Ctl3dColorChange(void)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dColorChange);
+}
+
+BOOL WINAPI Ctl3dSubclassCtl(HWND hwnd)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dSubclassCtl,
+				      hwnd);
+}
+
+LONG WINAPI Ctl3dDlgFramePaint(HWND hwnd, UINT ui, WPARAM wp, LPARAM lp)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (LONG)InvokeIndirectFunction(Ctl3dFunc._Ctl3dDlgFramePaint,
+				      hwnd, ui, wp, lp);
+}
+
+BOOL WINAPI Ctl3dAutoSubclass(HANDLE hnd)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dAutoSubclass,
+				      hnd);
+}
+
+BOOL WINAPI Ctl3dRegister(HANDLE hnd)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dRegister,
+				      hnd);
+}
+
+BOOL WINAPI Ctl3dUnregister(HANDLE hnd)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+    return FALSE;
+  
+  return (BOOL)InvokeIndirectFunction(Ctl3dFunc._Ctl3dUnregister,
+				      hnd);
+}
+
+VOID WINAPI Ctl3dWinIniChange(void)
+{
+  if (!Ctl3dFunc.dll)
+    if (!load_functions(&Ctl3dFunc))
+      return;
+  
+  InvokeIndirectFunction(Ctl3dFunc._Ctl3dWinIniChange);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif	// __WINDOWS_386__
diff --git a/src/msw/ctl3d/wat386/ctl3d32.lnk b/src/msw/ctl3d/wat386/ctl3d32.lnk
new file mode 100644
index 0000000000..2ada8d2a55
--- /dev/null
+++ b/src/msw/ctl3d/wat386/ctl3d32.lnk
@@ -0,0 +1 @@
++-ctl3d32.obj
diff --git a/src/msw/ctl3d/wat386/ctl3d32.obj b/src/msw/ctl3d/wat386/ctl3d32.obj
new file mode 100644
index 0000000000000000000000000000000000000000..2fe304562567eadf6b2bb277e5d5920a5796537b
GIT binary patch
literal 6699
zcmbVR4Ro7T8GgSnX_Ee&CQI9NTgRwdQwAK$)(T^DQ<8k&*JS&egd|;7D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FKX(O)ZWAq`M)9?J^%dg>7^=fRsTUYZIy;d(3%)e1r
z3(S}4YMwC)zek_mrlZAsNO}fQI<?@Qb%u7q2S%Y-n&qclolbKv;H#_Ay>e*$XKpL;
zH<w&q%?aGeX?r0jFm6^->2gl*D_OdWrTE;E_&#l)zg{_3-{U7)s?^z-+8c@|)EMto
zqt5n+O(yS7qedn}Vf<Gqv@UExn!E2Jq?<+h2XyR`4Xj#;1@+QuV1u*{=#(}BU6Kl<
zqE0e@U5Yz-b)wMZF2OUig2sCUz3}E!=~MkOL>Cpe5L@?u{yX<b6G_(U=NKO7=Hhy?
zt;LChcc$~ayqZOqfjbT3s||UyScg9~pf5k^*A?+l{!I|`f7ijb`uB7_O?`TAs*vfq
dY-8?jL1ib>dnZ9oPuD^Q-{KD{-?^P9{x5Z>mO20c

literal 0
HcmV?d00001

diff --git a/src/msw/ctl3d/wat386/ctl3d32.txt b/src/msw/ctl3d/wat386/ctl3d32.txt
new file mode 100644
index 0000000000..8e6b8b6e6b
--- /dev/null
+++ b/src/msw/ctl3d/wat386/ctl3d32.txt
@@ -0,0 +1,11 @@
+Using this package should be no big problem. You only need to change your
+wx_setup.h for including the CTL3D stuff, compile ctl3d32.c and add
+ctl3d32.obj to wx.lib (or just link it with your application).
+
+Please send bug reports to 'patrick@zaphod.ruhr.de'.
+
+
+Good luck
+
+- patrick
+
diff --git a/src/msw/ctl3d/wat386/makefile.wat b/src/msw/ctl3d/wat386/makefile.wat
new file mode 100644
index 0000000000..1f0858491a
--- /dev/null
+++ b/src/msw/ctl3d/wat386/makefile.wat
@@ -0,0 +1,23 @@
+CC	= wcc386
+CXX	= wpp386
+LIB     = wlib
+IFLAGS  = -i=..\\..\\include\\base;..\\..\\include\\msw
+CFLAGS  = $(IFLAGS) -zq -zW -w1 -d2 -ot -3 -dwx_msw
+
+WXDIR   = ..\\..
+LIBTARGET = $(WXDIR)\\lib\\wx.lib
+
+C_SRCS = ctl3d32.c
+
+OBJECTS = $(C_SRCS:.c=.obj) $(CC_SRCS:.cc=.obj)
+
+.c.obj:
+	$(CC) $(CFLAGS) $<
+
+.cc.obj:
+	$(CXX) $(CFLAGS) $< 
+
+all: $(OBJECTS) $(LIBTARGET)
+
+$(LIBTARGET): $(OBJECTS)
+	$(LIB) /P=256 $(LIBTARGET) @ctl3d32.lnk
diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp
new file mode 100644
index 0000000000..7ff89237d5
--- /dev/null
+++ b/src/msw/ole/droptgt.cpp
@@ -0,0 +1,459 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ole/droptgt.cpp
+// Purpose:     wxDropTarget implementation
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// Declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+#pragma implementation "droptgt.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#define IN_WX_MAIN_CPP
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+#pragma hdrstop
+#endif
+
+#include  <wx/setup.h>
+
+#if USE_DRAG_AND_DROP
+
+#include  <wx/log.h>
+
+#ifdef __WIN32__
+#ifndef __GNUWIN32__
+#include  <shlobj.h>            // for DROPFILES structure
+#endif
+#else
+#include <shellapi.h>
+#endif
+
+#include  <wx/msw/ole/droptgt.h>
+
+#ifndef __WIN32__
+#include <ole2.h>
+#include <olestd.h>
+#endif
+
+#include  <wx/msw/ole/oleutils.h>
+
+// ----------------------------------------------------------------------------
+// IDropTarget interface: forward all interesting things to wxDropTarget
+// (the name is unfortunate, but wx_I_DropTarget is not at all the same thing
+//  as wxDropTarget which is 'public' class, while this one is private)
+// ----------------------------------------------------------------------------
+
+class wxIDropTarget : public IDropTarget
+{
+public:
+  wxIDropTarget(wxDropTarget *p);
+ ~wxIDropTarget();
+
+  // IDropTarget methods
+  STDMETHODIMP DragEnter(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
+  STDMETHODIMP DragOver(DWORD, POINTL, LPDWORD);
+  STDMETHODIMP DragLeave(void);
+  STDMETHODIMP Drop(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
+
+  // @@ we assume that if QueryGetData() returns S_OK, than we can really
+  //    get data in this format, so we remember here the format for which
+  //    QueryGetData() succeeded
+  void SetSupportedFormat(wxDataFormat cfFormat) { m_cfFormat = cfFormat; }
+
+  DECLARE_IUNKNOWN_METHODS;
+
+protected:
+  IDataObject   *m_pIDataObject;  // !NULL between DragEnter and DragLeave/Drop
+  wxDropTarget  *m_pTarget;       // the real target (we're just a proxy)
+
+  wxDataFormat   m_cfFormat;      // the format in which to ask for data
+
+private:
+  static inline DWORD GetDropEffect(DWORD flags);
+};
+
+// ============================================================================
+// wxIDropTarget implementation
+// ============================================================================
+
+// Name    : static wxDropTarget::GetDropEffect
+// Purpose : determine the drop operation from keyboard/mouse state.
+// Returns : DWORD combined from DROPEFFECT_xxx constants 
+// Params  : [in] DWORD flags       kbd & mouse flags as passed to
+//                                  IDropTarget methods
+// Notes   : We do "move" normally and "copy" if <Ctrl> is pressed,
+//           which is the standard behaviour (currently there is no 
+//           way to redefine it)
+DWORD wxIDropTarget::GetDropEffect(DWORD flags)
+{
+  return flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE;
+}
+
+wxIDropTarget::wxIDropTarget(wxDropTarget *pTarget)
+{ 
+  m_cRef         = 0; 
+  m_pTarget      = pTarget;
+  m_cfFormat     = 0;
+  m_pIDataObject = NULL; 
+}
+
+wxIDropTarget::~wxIDropTarget() 
+{ 
+}
+
+BEGIN_IID_TABLE(wxIDropTarget)
+  ADD_IID(Unknown)
+  ADD_IID(DropTarget)
+END_IID_TABLE;
+
+IMPLEMENT_IUNKNOWN_METHODS(wxIDropTarget)
+
+#if 0
+  STDMETHODIMP wxIDropTarget::QueryInterface(REFIID riid, void **ppv)
+  {                                                                           
+//    wxLogQueryInterface(wxIDropTarget, riid);                                    
+                                                                              
+    if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) {                  
+      *ppv = this;
+      AddRef();                                                               
+                                                                              
+      return S_OK;                                                            
+    }                                                                         
+    else {                                                                    
+      *ppv = NULL;                                                            
+                                                                              
+      return (HRESULT) E_NOINTERFACE;
+    }                                                                         
+  }                                                                           
+                                                                              
+  STDMETHODIMP_(ULONG) wxIDropTarget::AddRef()                                    
+  {                                                                           
+    wxLogAddRef(wxIDropTarget, m_cRef);                                          
+                                                                              
+    return ++m_cRef;                                                          
+  }                                                                           
+                                                                              
+  STDMETHODIMP_(ULONG) wxIDropTarget::Release()                                   
+  {                                                                           
+    wxLogRelease(wxIDropTarget, m_cRef);                                         
+                                                                              
+    if ( --m_cRef == 0 ) {                                                    
+      delete this;                                                            
+      return 0;                                                               
+    }                                                                         
+    else                                                                      
+      return m_cRef;                                                          
+  }
+#endif
+
+// Name    : wxIDropTarget::DragEnter
+// Purpose : Called when the mouse enters the window (dragging something)
+// Returns : S_OK
+// Params  : [in] IDataObject *pIDataSource : source data
+//           [in] DWORD        grfKeyState  : kbd & mouse state
+//           [in] POINTL       pt           : mouse coordinates
+//           [out]DWORD       *pdwEffect    : effect flag
+// Notes   : 
+STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource,
+                                      DWORD        grfKeyState,
+                                      POINTL       pt,
+                                      DWORD       *pdwEffect)
+{
+  wxLogDebug("IDropTarget::DragEnter");
+
+  wxASSERT( m_pIDataObject == NULL );
+
+  if ( !m_pTarget->IsAcceptedData(pIDataSource) ) {
+    // we don't accept this kind of data
+    *pdwEffect = DROPEFFECT_NONE;
+
+    return S_OK;
+  }
+
+  // @@ should check the point also?
+  
+  *pdwEffect = GetDropEffect(grfKeyState);
+
+  // get hold of the data object
+  m_pIDataObject = pIDataSource;
+  m_pIDataObject->AddRef();
+
+  // give some visual feedback
+  m_pTarget->OnEnter();
+
+  return S_OK;
+}
+
+// Name    : wxIDropTarget::DragOver
+// Purpose : Indicates that the mouse was moved inside the window represented
+//           by this drop target.
+// Returns : S_OK
+// Params  : [in] DWORD   grfKeyState     kbd & mouse state
+//           [in] POINTL  pt              mouse coordinates
+//           [out]LPDWORD pdwEffect       effect flag
+// Notes   : We're called on every WM_MOUSEMOVE, so this function should be 
+//           very efficient.
+STDMETHODIMP wxIDropTarget::DragOver(DWORD   grfKeyState,
+                                     POINTL  pt,
+                                     LPDWORD pdwEffect)
+{
+  // there are too many of them... wxLogDebug("IDropTarget::DragOver");
+
+  *pdwEffect = m_pIDataObject == NULL ? DROPEFFECT_NONE 
+                                      : GetDropEffect(grfKeyState);
+  return S_OK;
+}
+
+// Name    : wxIDropTarget::DragLeave
+// Purpose : Informs the drop target that the operation has left its window.
+// Returns : S_OK
+// Notes   : good place to do any clean-up
+STDMETHODIMP wxIDropTarget::DragLeave()
+{
+  wxLogDebug("IDropTarget::DragLeave");
+
+  // remove the UI feedback
+  m_pTarget->OnLeave();
+
+  // release the held object
+  RELEASE_AND_NULL(m_pIDataObject);
+    
+  return S_OK;
+}
+
+// Name    : wxIDropTarget::Drop
+// Purpose : Instructs the drop target to paste data that was just now 
+//           dropped on it.
+// Returns : S_OK
+// Params  : [in] IDataObject *pIDataSource     the data to paste
+//           [in] DWORD        grfKeyState      kbd & mouse state
+//           [in] POINTL       pt               where the drop occured?
+//           [ouy]DWORD       *pdwEffect        operation effect
+// Notes   : 
+STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource, 
+                                 DWORD        grfKeyState, 
+                                 POINTL       pt, 
+                                 DWORD       *pdwEffect)
+{
+  wxLogDebug("IDropTarget::Drop");
+
+  // @@ I don't know why there is this parameter, but so far I assume
+  //    that it's the same we've already got in DragEnter
+  wxASSERT( m_pIDataObject == pIDataSource );
+
+  STGMEDIUM stm;
+  *pdwEffect = DROPEFFECT_NONE; 
+  
+  // should be set by SetSupportedFormat() call
+  wxASSERT( m_cfFormat != 0 );
+
+  FORMATETC fmtMemory;
+  fmtMemory.cfFormat  = m_cfFormat;
+  fmtMemory.ptd       = NULL; 
+  fmtMemory.dwAspect  = DVASPECT_CONTENT;
+  fmtMemory.lindex    = -1;
+  fmtMemory.tymed     = TYMED_HGLOBAL;  // @@@@ to add other media
+
+  HRESULT hr = pIDataSource->GetData(&fmtMemory, &stm);
+  if ( SUCCEEDED(hr) ) {
+    if ( stm.hGlobal != NULL ) {
+      if ( m_pTarget->OnDrop(pt.x, pt.y, GlobalLock(stm.hGlobal)) )
+        *pdwEffect = GetDropEffect(grfKeyState);
+      //else: DROPEFFECT_NONE
+
+      GlobalUnlock(stm.hGlobal);
+      ReleaseStgMedium(&stm);
+    }
+  }
+  else
+  {
+    // wxLogApiError("GetData", hr);
+  }
+
+  // release the held object
+  RELEASE_AND_NULL(m_pIDataObject);
+
+  return S_OK;
+}
+
+// ============================================================================
+// wxDropTarget implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// ctor/dtor
+// ----------------------------------------------------------------------------
+
+wxDropTarget::wxDropTarget()
+{
+  // create an IDropTarget implementation which will notify us about 
+  // d&d operations.
+  m_pIDropTarget = new wxIDropTarget(this);
+  m_pIDropTarget->AddRef();
+}
+
+wxDropTarget::~wxDropTarget()
+{
+  ReleaseInterface(m_pIDropTarget);
+}
+
+// ----------------------------------------------------------------------------
+// [un]register drop handler
+// ----------------------------------------------------------------------------
+
+bool wxDropTarget::Register(WXHWND hwnd)
+{
+  HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
+  if ( FAILED(hr) ) {
+    // wxLogApiError("CoLockObjectExternal", hr);
+    return FALSE;
+  }
+
+  hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget);
+  if ( FAILED(hr) ) {
+    ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
+
+    // wxLogApiError("RegisterDragDrop", hr);
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+void wxDropTarget::Revoke(WXHWND hwnd)
+{
+  HRESULT hr = ::RevokeDragDrop((HWND) hwnd);
+
+  if ( FAILED(hr) )
+  {
+    // wxLogApiError("RevokeDragDrop", hr);
+  }
+
+  ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);
+}
+
+// ----------------------------------------------------------------------------
+// determine if we accept data of this type
+// ----------------------------------------------------------------------------
+bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const
+{
+  // this strucutre describes a data of any type (first field will be
+  // changing) being passed through global memory block.
+  static FORMATETC s_fmtMemory = { 
+    0,
+    NULL, 
+    DVASPECT_CONTENT, 
+    -1, 
+    TYMED_HGLOBAL 
+  };
+
+  // cycle thorugh all supported formats
+  for ( size_t n = 0; n < GetFormatCount(); n++ ) {
+    s_fmtMemory.cfFormat = GetFormat(n);
+    // @ don't use SUCCEEDED macro here: QueryGetData returns 1 (whatever it
+    //   means) for file drag and drop
+    if ( pIDataSource->QueryGetData(&s_fmtMemory) == S_OK ) {
+      // remember this format: we'll later ask for data in it
+      m_pIDropTarget->SetSupportedFormat(s_fmtMemory.cfFormat);
+      return TRUE;
+    }
+  }
+
+  return FALSE;
+}
+
+// ============================================================================
+// wxTextDropTarget
+// ============================================================================
+
+bool wxTextDropTarget::OnDrop(long x, long y, const void *pData)
+{
+  return OnDropText(x, y, (const char *)pData);
+}
+
+size_t wxTextDropTarget::GetFormatCount() const
+{
+  return 1;
+}
+
+wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const
+{
+  return CF_TEXT;
+}
+
+// ============================================================================
+// wxFileDropTarget
+// ============================================================================
+
+bool wxFileDropTarget::OnDrop(long x, long y, const void *pData)
+{
+  // the documentation states that the first member of DROPFILES structure
+  // is a "DWORD offset of double NUL terminated file list". What they mean by 
+  // this (I wonder if you see it immediately) is that the list starts at
+  // ((char *)&(pDropFiles.pFiles)) + pDropFiles.pFiles. We're also advised to
+  // use DragQueryFile to work with this structure, but not told where and how
+  // to get HDROP.
+  HDROP hdrop = (HDROP)pData;   // @@ it works, but I'm not sure about it
+
+  // get number of files (magic value -1)
+  UINT nFiles = ::DragQueryFile(hdrop, -1, NULL, 0);
+  
+  // for each file get the length, allocate memory and then get the name
+  char **aszFiles = new char *[nFiles];
+  UINT len, n;
+  for ( n = 0; n < nFiles; n++ ) {
+    // +1 for terminating NUL
+    len = ::DragQueryFile(hdrop, n, NULL, 0) + 1;
+
+    aszFiles[n] = new char[len];
+
+    UINT len2 = ::DragQueryFile(hdrop, n, aszFiles[n], len);
+    if ( len2 != len - 1 ) {
+      wxLogDebug("In wxFileDropTarget::OnDrop DragQueryFile returned %d "
+                 "characters, %d expected.", len2, len - 1);
+    }
+  }
+
+  bool bResult = OnDropFiles(x, y, nFiles, (const char**) aszFiles);
+
+  // free memory
+  for ( n = 0; n < nFiles; n++ ) {
+    delete [] aszFiles[n];
+  }
+  delete [] aszFiles;
+
+  return bResult;
+}
+
+size_t wxFileDropTarget::GetFormatCount() const
+{
+  return 1;
+}
+
+wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const
+{
+#ifdef __WIN32__
+  return CF_HDROP;
+#else
+  // TODO: how to implement this in WIN16?
+  return CF_TEXT;
+#endif
+}
+
+#endif
+ // USE_DRAG_AND_DROP
diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp
new file mode 100644
index 0000000000..39165f2aac
--- /dev/null
+++ b/src/msw/ole/oleutils.cpp
@@ -0,0 +1,193 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ole/oleutils.cpp
+// Purpose:     implementation of OLE helper functions
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     19.02.98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// Declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+#pragma implementation "oleutils.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#define IN_WX_MAIN_CPP
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+#pragma hdrstop
+#endif
+
+#include  <wx/setup.h>
+
+#if USE_DRAG_AND_DROP
+
+#include  <wx/log.h>
+
+#include <windows.h>
+
+// OLE
+#include  <wx/msw/ole/uuid.h>
+#include  <wx/msw/ole/oleutils.h>
+
+#ifndef __BORLANDC__
+#include  <docobj.h>
+#endif
+
+// ============================================================================
+// Implementation
+// ============================================================================
+
+// return TRUE if the iid is in the array
+bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
+{
+  for ( size_t i = 0; i < nCount; i++ ) {
+    if ( riid == *aIids[i] )
+      return TRUE;
+  }
+
+  return FALSE;
+}
+
+// ----------------------------------------------------------------------------
+// Debug support
+// ----------------------------------------------------------------------------
+
+#ifdef  __DEBUG__
+
+const char *GetIidName(REFIID riid)
+{
+  // an association between symbolic name and numeric value of an IID
+  struct KNOWN_IID {
+    const IID  *pIid;
+    const char *szName;
+  };
+
+  // construct the table containing all known interfaces
+  #define ADD_KNOWN_IID(name) { &IID_I##name, #name }
+
+  static const KNOWN_IID aKnownIids[] = {
+    ADD_KNOWN_IID(AdviseSink),
+    ADD_KNOWN_IID(AdviseSink2),
+    ADD_KNOWN_IID(BindCtx),
+    ADD_KNOWN_IID(ClassFactory),
+    ADD_KNOWN_IID(ContinueCallback),
+    ADD_KNOWN_IID(EnumOleDocumentViews),
+    ADD_KNOWN_IID(OleCommandTarget),
+    ADD_KNOWN_IID(OleDocument),
+    ADD_KNOWN_IID(OleDocumentSite),
+    ADD_KNOWN_IID(OleDocumentView),
+    ADD_KNOWN_IID(Print),
+    ADD_KNOWN_IID(DataAdviseHolder),
+    ADD_KNOWN_IID(DataObject),
+    ADD_KNOWN_IID(Debug),
+    ADD_KNOWN_IID(DebugStream),
+    ADD_KNOWN_IID(DfReserved1),
+    ADD_KNOWN_IID(DfReserved2),
+    ADD_KNOWN_IID(DfReserved3),
+    ADD_KNOWN_IID(Dispatch),
+    ADD_KNOWN_IID(DropSource),
+    ADD_KNOWN_IID(DropTarget),
+    ADD_KNOWN_IID(EnumCallback),
+    ADD_KNOWN_IID(EnumFORMATETC),
+    ADD_KNOWN_IID(EnumGeneric),
+    ADD_KNOWN_IID(EnumHolder),
+    ADD_KNOWN_IID(EnumMoniker),
+    ADD_KNOWN_IID(EnumOLEVERB),
+    ADD_KNOWN_IID(EnumSTATDATA),
+    ADD_KNOWN_IID(EnumSTATSTG),
+    ADD_KNOWN_IID(EnumString),
+    ADD_KNOWN_IID(EnumUnknown),
+    ADD_KNOWN_IID(EnumVARIANT),
+    ADD_KNOWN_IID(ExternalConnection),
+    ADD_KNOWN_IID(InternalMoniker),
+    ADD_KNOWN_IID(LockBytes),
+    ADD_KNOWN_IID(Malloc),
+    ADD_KNOWN_IID(Marshal),
+    ADD_KNOWN_IID(MessageFilter),
+    ADD_KNOWN_IID(Moniker),
+    ADD_KNOWN_IID(OleAdviseHolder),
+    ADD_KNOWN_IID(OleCache),
+    ADD_KNOWN_IID(OleCache2),
+    ADD_KNOWN_IID(OleCacheControl),
+    ADD_KNOWN_IID(OleClientSite),
+    ADD_KNOWN_IID(OleContainer),
+    ADD_KNOWN_IID(OleInPlaceActiveObject),
+    ADD_KNOWN_IID(OleInPlaceFrame),
+    ADD_KNOWN_IID(OleInPlaceObject),
+    ADD_KNOWN_IID(OleInPlaceSite),
+    ADD_KNOWN_IID(OleInPlaceUIWindow),
+    ADD_KNOWN_IID(OleItemContainer),
+    ADD_KNOWN_IID(OleLink),
+    ADD_KNOWN_IID(OleManager),
+    ADD_KNOWN_IID(OleObject),
+    ADD_KNOWN_IID(OlePresObj),
+    ADD_KNOWN_IID(OleWindow),
+    ADD_KNOWN_IID(PSFactory),
+    ADD_KNOWN_IID(ParseDisplayName),
+    ADD_KNOWN_IID(Persist),
+    ADD_KNOWN_IID(PersistFile),
+    ADD_KNOWN_IID(PersistStorage),
+    ADD_KNOWN_IID(PersistStream),
+    ADD_KNOWN_IID(ProxyManager),
+    ADD_KNOWN_IID(RootStorage),
+    ADD_KNOWN_IID(RpcChannel),
+    ADD_KNOWN_IID(RpcProxy),
+    ADD_KNOWN_IID(RpcStub),
+    ADD_KNOWN_IID(RunnableObject),
+    ADD_KNOWN_IID(RunningObjectTable),
+    ADD_KNOWN_IID(StdMarshalInfo),
+    ADD_KNOWN_IID(Storage),
+    ADD_KNOWN_IID(Stream),
+    ADD_KNOWN_IID(StubManager),
+    ADD_KNOWN_IID(Unknown),
+    ADD_KNOWN_IID(ViewObject),
+    ADD_KNOWN_IID(ViewObject2),
+  };
+
+  // don't clobber preprocessor name space
+  #undef ADD_KNOWN_IID
+
+  // try to find the interface in the table
+  for ( uint ui = 0; ui < WXSIZEOF(aKnownIids); ui++ ) {
+    if ( riid == *aKnownIids[ui].pIid ) {
+      return aKnownIids[ui].szName;
+    }
+  }
+
+  // unknown IID, just transform to string
+  static Uuid s_uuid;
+  s_uuid.Set(riid);
+  return s_uuid;
+}
+
+void wxLogQueryInterface(const char *szInterface, REFIID riid)
+{
+  wxLogTrace("%s::QueryInterface (iid = %s)", szInterface, GetIidName(riid));
+}
+
+void wxLogAddRef(const char *szInterface, ULONG cRef)
+{
+  wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1);
+}
+
+void wxLogRelease(const char *szInterface, ULONG cRef)
+{
+  wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1);
+}
+
+#endif  //DEBUG
+
+#endif
+  // USE_DRAG_AND_DROP
diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp
new file mode 100644
index 0000000000..31e73a27fd
--- /dev/null
+++ b/src/msw/ole/uuid.cpp
@@ -0,0 +1,153 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        ole/uuid.cpp
+// Purpose:     implements Uuid class, see uuid.h for details
+// Author:      Vadim Zeitlin
+// Modified by: 
+// Created:     12.09.96
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// Declarations
+// ============================================================================
+
+#ifdef __GNUG__
+#pragma implementation "uuid.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#define IN_WX_MAIN_CPP
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+#pragma hdrstop
+#endif
+
+#include  <wx/setup.h>
+
+#if USE_DRAG_AND_DROP
+
+// standard headers
+#include  <rpc.h>                       // UUID related functions
+
+#include  <wx/msw/ole/uuid.h>
+
+
+
+// ============================================================================
+// Implementation
+// ============================================================================
+
+// length of UUID in C format
+#define   UUID_CSTRLEN  100     // real length is 66
+
+// copy ctor
+Uuid::Uuid(const Uuid& uuid)
+{
+  // bitwise copy Ok for UUIDs 
+  m_uuid = uuid.m_uuid;              
+
+  // force the string to be allocated by RPC
+  // (we free it later with RpcStringFree)
+  UuidToString(&m_uuid, &m_pszUuid);
+
+  // allocate new buffer
+  m_pszCForm = new char[UUID_CSTRLEN];
+  // and fill it
+  memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN);
+}
+
+// assignment operator
+Uuid& Uuid::operator=(const Uuid& uuid)
+{
+  m_uuid = uuid.m_uuid;
+
+  // force the string to be allocated by RPC
+  // (we free it later with RpcStringFree)
+  UuidToString(&m_uuid, &m_pszUuid);
+
+  // allocate new buffer if not done yet
+  if ( !m_pszCForm )
+    m_pszCForm = new char[UUID_CSTRLEN];
+
+  // and fill it
+  memcpy(m_pszCForm, uuid.m_pszCForm, UUID_CSTRLEN);
+
+  return *this;
+}
+
+// dtor
+Uuid::~Uuid() 
+{ 
+  // this string must be allocated by RPC!
+  // (otherwise you get a debug breakpoint deep inside RPC DLL)
+  if ( m_pszUuid ) 
+    RpcStringFree(&m_pszUuid);
+
+  // perhaps we should just use a static buffer and not bother
+  // with new and delete?
+  if ( m_pszCForm )
+    delete [] m_pszCForm;
+}
+
+// update string representation of new UUID
+void Uuid::Set(const UUID &uuid)
+{
+  m_uuid = uuid;
+
+  // get string representation
+  UuidToString(&m_uuid, &m_pszUuid);
+
+  // cache UUID in C format
+  UuidToCForm();
+}
+
+// create a new UUID
+void Uuid::Create()
+{
+  UUID uuid;
+
+  // can't fail
+  UuidCreate(&uuid);
+  
+  Set(uuid);
+}
+
+// set the value
+bool Uuid::Set(const char *pc)
+{
+  // get UUID from string
+  if ( UuidFromString((uchar *)pc, &m_uuid) != RPC_S_OK)
+    // failed: probably invalid string
+    return FALSE;
+
+  // transform it back to string to normalize it
+  UuidToString(&m_uuid, &m_pszUuid);
+
+  // update m_pszCForm
+  UuidToCForm();
+
+  return TRUE;
+}
+
+// stores m_uuid in m_pszCForm in a format required by
+// DEFINE_GUID macro: i.e. something like
+//  0x7D8A2281L,0x4C61,0x11D0,0xBA,0xBD,0x00,0x00,0xC0,0x18,0xBA,0x27
+// m_pszUuid is of the form (no, it's not quite the same UUID :-)
+//  6aadc650-67b0-11d0-bac8-0000c018ba27
+void Uuid::UuidToCForm()
+{
+  if ( m_pszCForm == NULL )
+    m_pszCForm = new char[UUID_CSTRLEN];
+
+  wsprintf(m_pszCForm, "0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X,"
+           "0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X",
+           m_uuid.Data1, m_uuid.Data2, m_uuid.Data3,
+           m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4],
+           m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]);
+}
+
+#endif
+  // USE_DRAG_AND_DROP
diff --git a/utils/nplugin/docs/notes.txt b/utils/nplugin/docs/notes.txt
new file mode 100644
index 0000000000..ee3d1412ea
--- /dev/null
+++ b/utils/nplugin/docs/notes.txt
@@ -0,0 +1,32 @@
+Notes about plugins
+
+
+ I have users that want to visit my pages with tclets, but they do not
+    have the plugin. What can I do?
+
+	Add a pluginspage=http://www.sunlabs.com/tcl/plugin/ name=value
+	pair to the embed statement. This will cause Navigator to find
+	the plugin for your user and suggest they install it. The user
+	is then prompted to download and install the plugin, and then she
+	has to restart the browser and revisit your page. Very inconvenient
+	and only slightly better than giving your users the broken image
+	icon. Netscape says they are working on a more automatic solution.
+
+
+
+
+14. Your demos work just fine, but when I visit my own pages with tclets in
+    them, at http://www.myserver.com/~mypages/mypage.html, I still get the
+    broken image icon. Why doesn't it work for me?
+
+	This is likely because your web server -- the program that sends
+	the pages to your browser when you click on a URL -- is not
+	sending the right mime-type when it sends the '.tcl' file. You
+	can work around this by adding a type=application/x-tcl name=value
+	pair to the embed statement, which will cause Navigator to infer
+	that it should use the Tcl plugin anyways. A better solution is
+	to ask your system administrator to configure the web server to
+	send the mime type application/x-tcl when it sends files with a
+	'.tcl' extension. Nearly all web servers in the world nowadays
+	are already configured to do this, the only ones we are aware of
+	that do not are some older versions of Apache.
diff --git a/utils/nplugin/lib/dummy b/utils/nplugin/lib/dummy
new file mode 100644
index 0000000000..bfdf726d49
--- /dev/null
+++ b/utils/nplugin/lib/dummy
@@ -0,0 +1 @@
+I'm just here to force the creation of a LIB directory.
diff --git a/utils/nplugin/samples/gui/gui.cpp b/utils/nplugin/samples/gui/gui.cpp
new file mode 100644
index 0000000000..3ae118fda0
--- /dev/null
+++ b/utils/nplugin/samples/gui/gui.cpp
@@ -0,0 +1,186 @@
+/*
+ * File:	simple.cpp
+ * Purpose:	Minimal wxWindows plugin
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:	
+ * Copyright:   (c) Julian Smart
+ */
+
+/* static const char sccsid[] = "%W% %G%"; */
+
+#ifdef __GNUG__
+#pragma implementation
+#pragma interface
+#endif
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include <fstream.h>
+
+#include "NPApp.h"
+#include "NPFrame.h"
+
+#define ID_HELLO    10
+
+// Define a new application type
+class MyApp: public wxPluginApp
+{ public:
+    virtual wxFrame *OnInit(void);
+    virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
+};
+
+// Define a new frame type
+class MyFrame: public wxPluginFrame
+{ public:
+    MyFrame(const wxPluginData& data);
+    
+ public:
+    // Let's paint directly onto the 'frame'; we don't need a subwindow
+    void OnPaint(wxPaintEvent& event);
+    void OnMouseEvent(wxMouseEvent& event);
+    void OnHello(wxCommandEvent& event);
+
+    // Called when the file has been downloaded
+    virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
+
+    void CentreStrings(wxDC& dc);
+
+   DECLARE_EVENT_TABLE()
+
+ protected:
+    wxStringList    m_strings;
+    float           m_xpos;
+    float           m_ypos;
+};
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+	EVT_SIZE(MyFrame::OnSize)
+	EVT_PAINT(MyFrame::OnPaint)
+	EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent)
+	EVT_BUTTON(ID_HELLO, MyFrame::OnHello)
+END_EVENT_TABLE()
+
+IMPLEMENT_APP(MyApp)
+
+// No app initialisation necessary, and for a plugin there is no
+// top frame.
+wxFrame *MyApp::OnInit(void)
+{
+    return NULL;
+}
+
+// Called whenever a new plugin instance is called. We could check
+// various things here in 'data' but we won't bother.
+wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data)
+{
+    // Implicitly added to list of plugin frames
+    return new MyFrame(data);
+}
+
+// My frame constructor
+MyFrame::MyFrame(const wxPluginData& data):
+  wxPluginFrame(data)
+{
+    m_xpos = -1;
+    m_ypos = -1;
+
+    wxMenuBar *menuBar = new wxMenuBar;
+    wxMenu *menu = new wxMenu;
+    menu->Append(1, "E&xit");
+    menuBar->Append(menu, "&File");
+
+    SetMenuBar(menuBar);
+
+    new wxTextCtrl(this, -1, "", wxPoint(10, 30), wxSize(200, 25), wxSUNKEN_BORDER);
+    new wxButton(this, ID_HELLO, "Hello", wxPoint(10, 70));
+}
+
+void MyFrame::OnPaint(wxPaintEvent& event)
+{
+    wxPaintDC dc(this);
+
+    dc.SetBrush(*wxCYAN_BRUSH);
+    dc.SetPen(*wxRED_PEN);
+
+    int w, h;
+    GetClientSize(&w, &h);
+
+    dc.DrawRectangle(0, 0, w, h);
+
+    wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL);
+    dc.SetFont(swissFont);
+    dc.SetBackgroundMode(wxTRANSPARENT);
+
+    CentreStrings(dc);
+}
+
+// Called when the file has been downloaded
+void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
+{
+    ifstream str(fname);
+    char buf[201];
+
+    while ( !str.eof() )
+    {
+        buf[0] = 0;
+        str.getline(buf, 200);
+
+        if ( buf[0] != 0 )
+            m_strings.Add(buf);
+    }
+    Refresh();
+}
+
+void MyFrame::CentreStrings(wxDC& dc)
+{
+    int y = 5;
+    int cw, ch;
+    GetClientSize(&cw, &ch);
+
+    wxNode *node = m_strings.First();
+    while ( node )
+    {
+        char *s = (char *)node->Data();
+        float w, h;
+        dc.GetTextExtent(s, &w, &h);
+
+        int x = wxMax(0, (cw - w)/2);
+        dc.DrawText(s, x, y);
+
+        y += h + (h/2);
+
+        node = node->Next();
+    }
+}
+
+// This implements a tiny doodling program. Drag the mouse using
+// the left button.
+void MyFrame::OnMouseEvent(wxMouseEvent& event)
+{
+  float x, y;
+  event.Position(&x, &y);
+  wxClientDC dc(this);
+
+  if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown())
+  {
+    dc.SetPen(wxBLACK_PEN);
+    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.DrawLine(m_xpos, m_ypos, x, y);
+  }
+  m_xpos = x;
+  m_ypos = y;
+}
+
+void MyFrame::OnHello(wxCommandEvent& event)
+{
+    wxMessageBox("Hello!");
+}
diff --git a/utils/nplugin/samples/gui/gui.h b/utils/nplugin/samples/gui/gui.h
new file mode 100644
index 0000000000..01e46d64b6
--- /dev/null
+++ b/utils/nplugin/samples/gui/gui.h
@@ -0,0 +1,59 @@
+/*
+ * File:	gui.h
+ * Purpose:	wxWindows plugin with a few GUI elements
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:	
+ * Copyright:   (c) Julian Smart
+ */
+
+#ifndef __GUIH__
+#define __GUIH__
+
+// Define a new application type
+class MyApp: public wxPluginApp
+{ public:
+    virtual wxFrame *OnInit(void);
+    virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
+};
+
+class MyApp;
+class MyFrame;
+class MyCanvas;
+
+class MyFrame: public wxPluginFrame
+{
+public:
+	MyFrame(const wxPluginData& data);
+	virtual ~MyFrame();
+
+	void OldOnMenuCommand(int id);
+
+private:
+	wxMenu*		fileMenu;
+	wxMenuBar*	menuBar;
+	MyCanvas*	leftCanvas;
+	MyCanvas*	rightCanvas;
+    wxSplitterWindow* splitter;
+};
+
+class MyCanvas: public wxScrolledWindow
+{
+public:
+	MyCanvas(wxWindow* parent, int x, int y, int w, int h);
+	virtual ~MyCanvas();
+
+	void OnPaint(wxPaintEvent& event);
+
+DECLARE_EVENT_TABLE()
+};
+
+// ID for the menu quit command
+#define SPLIT_QUIT          1
+#define SPLIT_HORIZONTAL    2
+#define SPLIT_VERTICAL      3
+#define SPLIT_UNSPLIT       4
+
+
+#endif
+
diff --git a/utils/nplugin/samples/gui/makefile.nt b/utils/nplugin/samples/gui/makefile.nt
new file mode 100644
index 0000000000..2487d04e37
--- /dev/null
+++ b/utils/nplugin/samples/gui/makefile.nt
@@ -0,0 +1,70 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1997
+# Updated:	
+# Copyright:	(c) 1997, Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile : Builds gui plugin example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+# Application is a DLL
+DLL=1
+
+EXTRAINC=/I$(WXDIR)\utils\nplugin\src
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\utils\nplugin\examples\gui
+PROGRAM=npgui32
+PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib
+
+OBJECTS = gui.obj
+
+all:    $(PROGRAM).dll
+
+$(PROGRAM):    $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt dllnp FINAL=$(FINAL)
+        cd $(THISDIR)
+
+# Update the dynamic link library
+
+$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
+    $(link) $(LINKFLAGS) \
+    -out:$(PROGRAM).dll   \
+    -def:$(PROGRAM).def \
+    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
+    $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib
+
+gui.obj:      gui.$(SRCSUFF) gui.h $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+copy:
+	copy npgui32.dll "c:\program files\Netscape\Navigator\program\plugins"
+	copy npgui32.dll "c:\program files\Internet Explorer\plugins"
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
+        -erase *.dll
+        -erase *.exp
+        -erase *.lib
+        -erase *.ilk
diff --git a/utils/nplugin/samples/gui/npgui32.def b/utils/nplugin/samples/gui/npgui32.def
new file mode 100644
index 0000000000..1107bb98f5
--- /dev/null
+++ b/utils/nplugin/samples/gui/npgui32.def
@@ -0,0 +1,9 @@
+LIBRARY   NPGUI32
+
+CODE	  PRELOAD MOVEABLE DISCARDABLE
+DATA	  PRELOAD SINGLE
+
+EXPORTS
+	NP_GetEntryPoints   @1
+	NP_Initialize       @2
+	NP_Shutdown         @3
diff --git a/utils/nplugin/samples/gui/npgui32.rc b/utils/nplugin/samples/gui/npgui32.rc
new file mode 100644
index 0000000000..cafee455df
--- /dev/null
+++ b/utils/nplugin/samples/gui/npgui32.rc
@@ -0,0 +1,44 @@
+#include "wx/msw/wx.rc"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904e4"
+        BEGIN
+            VALUE "CompanyName",     "Julian Smart\0"
+            VALUE "FileDescription", "wxWindows GUI example plugin file\0"
+            VALUE "FileVersion",     "0.0.0.1\0"
+            VALUE "InternalName",    "wxWindows GUI Plugin\0"
+            VALUE "LegalCopyright",  "Copyright Julian Smart 1997\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename","npgui32.dll\0"
+            VALUE "ProductName",     "wxWindows GUI Plugin Sample\0"
+            VALUE "ProductVersion",  "0.0.0.1\0"
+            VALUE "MIMEType",        "wxgui/mime-type\0"
+            VALUE "FileExtents",     "gui\0"
+            VALUE "FileOpenName",    "wxWindows GUI (*.gui)\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
+
diff --git a/utils/nplugin/samples/simple/makefile.nt b/utils/nplugin/samples/simple/makefile.nt
new file mode 100644
index 0000000000..66e55eee46
--- /dev/null
+++ b/utils/nplugin/samples/simple/makefile.nt
@@ -0,0 +1,70 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1997
+# Updated:	
+# Copyright:	(c) 1997, Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile : Builds simple plugin example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+# Application is a DLL
+DLL=1
+
+EXTRAINC=/I$(WXDIR)\utils\nplugin\src
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+THISDIR = $(WXDIR)\utils\nplugin\smples\simple
+PROGRAM=npsimple32
+PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib
+
+OBJECTS = simple.obj
+
+all:    $(PROGRAM).dll
+
+$(PROGRAM):    $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt dllnp FINAL=$(FINAL)
+        cd $(THISDIR)
+
+# Update the dynamic link library
+
+$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
+    $(link) $(LINKFLAGS) \
+    -out:$(PROGRAM).dll   \
+    -def:$(PROGRAM).def \
+    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
+    $(guilibsdll) msvcrt.lib shell32.lib comctl32.lib ctl3d32.lib
+
+simple.obj:      simple.$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+copy:
+	copy npsimple32.dll "c:\program files\Netscape\Navigator\program\plugins"
+	copy npsimple32.dll "c:\program files\Internet Explorer\plugins"
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
+        -erase *.dll
+        -erase *.exp
+        -erase *.lib
+        -erase *.ilk
diff --git a/utils/nplugin/samples/simple/npsimple32.def b/utils/nplugin/samples/simple/npsimple32.def
new file mode 100644
index 0000000000..e3af3116fe
--- /dev/null
+++ b/utils/nplugin/samples/simple/npsimple32.def
@@ -0,0 +1,9 @@
+LIBRARY   NPSIMPLE32
+
+CODE	  PRELOAD MOVEABLE DISCARDABLE
+DATA	  PRELOAD SINGLE
+
+EXPORTS
+	NP_GetEntryPoints   @1
+	NP_Initialize       @2
+	NP_Shutdown         @3
diff --git a/utils/nplugin/samples/simple/npsimple32.rc b/utils/nplugin/samples/simple/npsimple32.rc
new file mode 100644
index 0000000000..f2d4903226
--- /dev/null
+++ b/utils/nplugin/samples/simple/npsimple32.rc
@@ -0,0 +1,44 @@
+#include "wx/msw/wx.rc"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904e4"
+        BEGIN
+            VALUE "CompanyName",     "Julian Smart\0"
+            VALUE "FileDescription", "wxWindows simple example plugin file\0"
+            VALUE "FileVersion",     "0.0.0.1\0"
+            VALUE "InternalName",    "wxWindows Simple Plugin\0"
+            VALUE "LegalCopyright",  "Copyright Julian Smart 1997\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename","npsimple32.dll\0"
+            VALUE "ProductName",     "wxWindows Simple Plugin Sample\0"
+            VALUE "ProductVersion",  "0.0.0.1\0"
+            VALUE "MIMEType",        "wxsimple/mime-type\0"
+            VALUE "FileExtents",     "smp\0"
+            VALUE "FileOpenName",    "wxWindows Simple (*.smp)\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
+
diff --git a/utils/nplugin/samples/simple/simple.cpp b/utils/nplugin/samples/simple/simple.cpp
new file mode 100644
index 0000000000..137e7b0585
--- /dev/null
+++ b/utils/nplugin/samples/simple/simple.cpp
@@ -0,0 +1,174 @@
+/*
+ * File:	simple.cpp
+ * Purpose:	Minimal wxWindows plugin
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:	
+ * Copyright:   (c) Julian Smart
+ */
+
+/* static const char sccsid[] = "%W% %G%"; */
+
+#ifdef __GNUG__
+#pragma implementation
+#pragma interface
+#endif
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include <fstream.h>
+
+#include "NPApp.h"
+#include "NPFrame.h"
+
+// Define a new application type
+class MyApp: public wxPluginApp
+{ public:
+    virtual wxFrame *OnInit(void);
+    virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
+};
+
+// Define a new frame type
+class MyFrame: public wxPluginFrame
+{ public:
+    MyFrame(const wxPluginData& data);
+    
+ public:
+    // Let's paint directly onto the 'frame'; we don't need a subwindow
+    void OnPaint(wxPaintEvent& event);
+    void OnDraw(wxDC& dc);
+    void OnMouseEvent(wxMouseEvent& event);
+
+    // Called when the file has been downloaded
+    virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
+
+    void CentreStrings(wxDC& dc);
+
+   DECLARE_EVENT_TABLE()
+
+ protected:
+    wxStringList    m_strings;
+    long            m_xpos;
+    long            m_ypos;
+};
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+	EVT_SIZE(MyFrame::OnSize)
+	EVT_PAINT(MyFrame::OnPaint)
+	EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent)
+END_EVENT_TABLE()
+
+IMPLEMENT_APP(MyApp)
+
+// No app initialisation necessary, and for a plugin there is no
+// top frame.
+wxFrame *MyApp::OnInit(void)
+{
+    return NULL;
+}
+
+// Called whenever a new plugin instance is called. We could check
+// various things here in 'data' but we won't bother.
+wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data)
+{
+    // Implicitly added to list of plugin frames
+    return new MyFrame(data);
+}
+
+// My frame constructor
+MyFrame::MyFrame(const wxPluginData& data):
+  wxPluginFrame(data)
+{
+    m_xpos = -1;
+    m_ypos = -1;
+}
+
+void MyFrame::OnPaint(wxPaintEvent& event)
+{
+    wxPaintDC dc(this);
+
+    OnDraw(dc);
+}
+
+void MyFrame::OnDraw(wxDC& dc)
+{
+    dc.SetBrush(*wxCYAN_BRUSH);
+    dc.SetPen(*wxRED_PEN);
+
+    int w, h;
+    GetClientSize(&w, &h);
+
+    dc.DrawRectangle(0, 0, w, h);
+
+    wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL);
+    dc.SetFont(swissFont);
+    dc.SetBackgroundMode(wxTRANSPARENT);
+
+    CentreStrings(dc);
+}
+
+// Called when the file has been downloaded
+void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
+{
+    ifstream str(fname);
+    char buf[201];
+
+    while ( !str.eof() )
+    {
+        buf[0] = 0;
+        str.getline(buf, 200);
+
+        if ( buf[0] != 0 )
+            m_strings.Add(buf);
+    }
+    Refresh();
+}
+
+void MyFrame::CentreStrings(wxDC& dc)
+{
+    int y = 5;
+    int cw, ch;
+    GetClientSize(&cw, &ch);
+
+    wxNode *node = m_strings.First();
+    while ( node )
+    {
+        char *s = (char *)node->Data();
+        long w, h;
+        dc.GetTextExtent(s, &w, &h);
+
+        int x = wxMax(0, (cw - w)/2);
+        dc.DrawText(s, x, y);
+
+        y += h + (h/2);
+
+        node = node->Next();
+    }
+}
+
+// This implements a tiny doodling program. Drag the mouse using
+// the left button.
+void MyFrame::OnMouseEvent(wxMouseEvent& event)
+{
+  long x, y;
+  event.Position(&x, &y);
+  wxClientDC dc(this);
+
+  if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown())
+  {
+    dc.SetPen(wxBLACK_PEN);
+    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.DrawLine(m_xpos, m_ypos, x, y);
+  }
+  m_xpos = x;
+  m_ypos = y;
+}
+
diff --git a/utils/nplugin/src/makefile.nt b/utils/nplugin/src/makefile.nt
new file mode 100644
index 0000000000..b3e4491221
--- /dev/null
+++ b/utils/nplugin/src/makefile.nt
@@ -0,0 +1,78 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds controls example (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+# Application is a DLL
+DLL=1
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+PLUGINDIR = $(WXDIR)\utils\nplugin
+THISDIR = $(PLUGINDIR)\src
+LIBTARGET=$(PLUGINDIR)\lib\nplugin.lib
+
+OBJECTS = npwin.obj npshell.obj NPFrame.obj NPApp.obj
+
+all:    $(LIBTARGET)
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(LIBTARGET): $(OBJECTS)
+	-erase $(LIBTARGET)
+	$(implib) @<<
+-out:$(LIBTARGET)
+-machine:$(CPU)
+$(OBJECTS)
+<<
+
+npwin.obj:      npwin.cpp npapi.h npupp.h
+        $(cc) @<<
+$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
+<<
+
+npshell.obj:      npshell.cpp npapi.h NPApp.h NPFrame.h
+        $(cc) @<<
+$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
+<<
+
+NPFrame.obj:      NPFrame.cpp NPFrame.h NPApp.h npapi.h
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+NPApp.obj:      NPApp.cpp NPApp.h NPFrame.h npapi.h
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
+        -erase *.dll
+        -erase *.exp
+        -erase *.ilk
+        -erase $(LIBTARGET)
diff --git a/utils/nplugin/src/npapi.h b/utils/nplugin/src/npapi.h
new file mode 100644
index 0000000000..bbb631c3d4
--- /dev/null
+++ b/utils/nplugin/src/npapi.h
@@ -0,0 +1,258 @@
+/*
+ *  npapi.h $Revision$
+ *  Netscape client plug-in API spec
+ */
+
+#ifndef _NPAPI_H_
+#define _NPAPI_H_
+
+
+/* XXX this needs to get out of here */
+#if defined(__MWERKS__)
+#ifndef XP_MAC
+#define XP_MAC
+#endif
+#endif
+
+
+/*
+ *  Version constants
+ */
+
+#define NP_VERSION_MAJOR 0
+#define NP_VERSION_MINOR 6
+
+
+
+/* 
+ *  Basic types
+ */
+ 
+#ifndef _UINT16
+typedef unsigned short uint16;
+#endif
+#ifndef _UINT32
+typedef unsigned long uint32;
+#endif
+#ifndef _INT16
+typedef short int16;
+#endif
+#ifndef _INT32
+typedef long int32;
+#endif
+
+#ifndef FALSE
+#define FALSE (0)
+#endif
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef NULL
+#define NULL (0L)
+#endif
+
+typedef unsigned char   NPBool;
+typedef void*           NPEvent;
+typedef int16           NPError;
+typedef char*           NPMIMEType;
+
+
+/*
+ *  NPP is a plug-in's opaque instance handle
+ */
+typedef struct _NPP
+{
+    void*   pdata;                /* plug-in private data */
+    void*   ndata;                /* netscape private data */
+} NPP_t;
+
+typedef NPP_t*  NPP;
+
+
+
+typedef struct _NPStream
+{
+    void*       pdata;                /* plug-in private data */
+    void*       ndata;                /* netscape private data */
+    const char* url;
+    uint32      end;
+    uint32      lastmodified;
+} NPStream;
+
+typedef struct _NPByteRange
+{
+    int32                   offset;                /* negative offset means from the end */
+    uint32                  length;
+    struct _NPByteRange*    next;
+} NPByteRange;
+
+
+typedef struct _NPSavedData
+{
+    int32   len;
+    void*   buf;
+} NPSavedData;
+
+
+
+typedef struct _NPRect
+{
+    uint16  top;
+    uint16  left;
+    uint16  bottom;
+    uint16  right;
+} NPRect;
+
+typedef struct _NPWindow 
+{
+    void*   window;                 /* platform specific window handle */
+    uint32  x;                      /* position of top left corner relative to a netscape page */
+    uint32  y;                   
+    uint32  width;                  /* maximum window size */
+    uint32  height;
+    NPRect  clipRect;               /* clipping rectangle in port coordinates */
+} NPWindow;
+
+
+
+typedef struct _NPFullPrint
+{
+    NPBool      pluginPrinted;      /* Set TRUE if plugin handled fullscreen printing */
+    NPBool      printOne;           /* TRUE if plugin should print one copy to default printer */
+    void*       platformPrint;      /* Platform-specific printing info */
+} NPFullPrint;
+
+typedef struct _NPEmbedPrint
+{
+    NPWindow    window;
+    void*       platformPrint;      /* Platform-specific printing info */
+} NPEmbedPrint;
+
+typedef struct _NPPrint
+{
+    uint16              mode;       /* NP_FULL or NP_EMBED */
+    union
+    {
+        NPFullPrint     fullPrint;  /* if mode is NP_FULL */
+        NPEmbedPrint    embedPrint; /* if mode is NP_EMBED */
+    } print;
+} NPPrint;
+
+
+
+
+#ifdef XP_MAC
+
+/*
+ *  Mac-specific structures and definitions.
+ */
+ 
+#include <Quickdraw.h>
+#include <Events.h>
+
+typedef struct NP_Port
+{
+    CGrafPtr    port;           /* Grafport */
+    int32       portx;          /* position inside the topmost window */
+    int32       porty;
+} NP_Port;
+
+/*
+ *  Non-standard event types that can be passed to HandleEvent
+ */
+#define getFocusEvent       (osEvt + 16)
+#define loseFocusEvent      (osEvt + 17)
+#define adjustCursorEvent   (osEvt + 18)
+
+#endif /* XP_MAC */
+
+
+
+
+#define NP_EMBED        1
+#define NP_FULL         2
+#define NP_BACKGROUND   3
+
+#define NP_NORMAL       1
+#define NP_SEEK         2
+#define NP_ASFILE       3
+
+#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
+
+
+/*
+ *  Error and reason code definitions.
+ */
+
+#define NP_NOERR  0
+#define NP_EINVAL 1
+#define NP_EABORT 2
+
+#define NPERR_BASE                      0
+#define NPERR_NO_ERROR                  (NPERR_BASE + 0)
+#define NPERR_GENERIC_ERROR             (NPERR_BASE + 1)
+#define NPERR_INVALID_INSTANCE_ERROR    (NPERR_BASE + 2)
+#define NPERR_INVALID_FUNCTABLE_ERROR   (NPERR_BASE + 3)
+#define NPERR_MODULE_LOAD_FAILED_ERROR  (NPERR_BASE + 4)
+#define NPERR_OUT_OF_MEMORY_ERROR       (NPERR_BASE + 5)
+#define NPERR_INVALID_PLUGIN_ERROR      (NPERR_BASE + 6)
+#define NPERR_INVALID_PLUGIN_DIR_ERROR  (NPERR_BASE + 7)
+#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
+
+#define NPRES_BASE                      0
+#define NPRES_NETWORK_ERR               (NPRES_BASE + 0)
+#define NPRES_USER_BREAK                (NPRES_BASE + 1)
+#define NPRES_DONE                      (NPRES_BASE + 3)
+
+
+
+/*
+ *  Function prototypes.
+ *  Functions beginning with 'NPP' are functions provided by the plugin that Netscape will call.
+ *  Functions beginning with 'NPN' are functions provided by Netscape that the plugin will call.
+ */
+
+#if defined(_WINDOWS) && !defined(__WIN32__)
+#define NP_LOADDS  _loadds
+#else
+#define NP_LOADDS
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+NPError               NPP_Initialize(void);
+void                  NPP_Shutdown(void);
+NPError     NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
+NPError     NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
+NPError     NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
+NPError     NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
+NPError     NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason);
+int32       NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
+int32       NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
+void        NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
+void        NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
+int16                 NPP_HandleEvent(NPP instance, void* event);
+
+void        NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor);
+NPError     NPN_GetURL(NPP instance, const char* url, const char* window);
+NPError     NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);
+NPError     NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
+NPError     NPN_NewStream(NPP instance, NPMIMEType type, NPStream* stream);
+int32       NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer);
+NPError     NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason);
+void        NPN_Status(NPP instance, const char* message);
+const char* NPN_UserAgent(NPP instance);
+void*       NPN_MemAlloc(uint32 size);
+void        NPN_MemFree(void* ptr);
+uint32      NPN_MemFlush(uint32 size);
+void		NPN_ReloadPlugins(NPBool reloadPages);
+
+#ifdef __cplusplus
+}  /* end extern "C" */
+#endif
+
+
+#endif /* _NPAPI_H_ */
+
diff --git a/utils/nplugin/src/npapp.cpp b/utils/nplugin/src/npapp.cpp
new file mode 100644
index 0000000000..e9c43029c3
--- /dev/null
+++ b/utils/nplugin/src/npapp.cpp
@@ -0,0 +1,277 @@
+/*
+ * File:	NPApp.cc
+ * Purpose:	wxPluginApp implementation
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:
+ * Copyright:   (c) Julian Smart
+ */
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "NPApp.h"
+#include "NPFrame.h"
+
+#include <windows.h>
+
+IMPLEMENT_ABSTRACT_CLASS(wxPluginApp, wxApp)
+
+wxPluginApp *wxGetPluginApp(void)
+{
+    if ( wxTheApp && wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
+        return (wxPluginApp *)wxTheApp;
+    else
+        return NULL;
+}
+
+wxPluginApp::wxPluginApp(void)
+{
+  m_data.m_argc = NULL;
+  m_data.m_argn = NULL;
+  m_data.m_argv = NULL;
+  m_data.m_type = 0;
+  m_data.m_instance = 0;
+  m_data.m_mode = 0;
+  m_data.m_window = 0;
+}
+
+wxPluginApp::~wxPluginApp(void)
+{
+    if ( m_data.m_argn )
+        delete[] m_data.m_argn;
+    if ( m_data.m_argv )
+        delete[] m_data.m_argv;
+}
+
+// Add a frame
+void wxPluginApp::AddFrame(wxPluginFrame *frame)
+{
+    m_frames.Append(frame);
+}
+
+// Remove a frame
+void wxPluginApp::RemoveFrame(wxPluginFrame *frame)
+{
+    m_frames.DeleteObject(frame);
+}
+
+// Find a frame given a NP instance
+wxPluginFrame *wxPluginApp::FindFrame(NPP instance)
+{
+    wxNode *node = m_frames.First();
+    while ( node )
+    {
+        wxPluginFrame *frame = (wxPluginFrame *)node->Data();
+        if ( frame->GetInstance() == instance )
+        {
+            return frame;
+        }
+        node = node->Next();
+    }
+    return NULL;
+}
+
+void wxPluginApp::SetAttributeValues(const int n, char *argn[], char *argv[])
+{
+    if ( m_data.m_argn )
+        delete[] m_data.m_argn;
+    if ( m_data.m_argv )
+        delete[] m_data.m_argv;
+
+    m_data.m_argc = n;
+
+    m_data.m_argn = new wxString[n];
+    m_data.m_argv = new wxString[n];
+    int i;
+    for ( i = 0; i < n ; i ++)
+    {
+        m_data.m_argn[i] = argn[i];
+        m_data.m_argv[i] = argv[i];
+    }
+}
+
+///////////////////////////////////////////////////////////////
+// Netscape Plugin API calls routed via wxPluginApp
+
+NPError   wxPluginApp::NPP_Destroy(NPP instance, NPSavedData** save)
+{
+    wxPluginFrame *frame = FindFrame(instance);
+    if ( frame )
+    {
+        frame->OnClose();
+        delete frame;
+    }
+    return NPERR_NO_ERROR;
+}
+
+NPError   wxPluginApp::NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason)
+{
+   return NPERR_NO_ERROR;
+}
+
+/*
+jref      wxPluginApp::NPP_GetJavaClass(void)
+{
+   return 0;
+}
+*/
+
+NPError   wxPluginApp::NPP_Initialize(void)
+{
+    static int init = FALSE;
+
+    if ( init == TRUE )
+        MessageBox(NULL, "wxPluginApp::NPP_Initialize:\nabout to call wxEntry for 2nd time!!!", "wxPlugin", MB_OK);
+
+    wxEntry((WXHINSTANCE) GetModuleHandle(NULL));
+
+    init = TRUE;
+
+//    MessageBox(NULL, "wxPluginApp::NPP_Initialize: have called wxEntry", "wxPlugin", MB_OK);
+    return NPERR_NO_ERROR;
+}
+
+NPError   wxPluginApp::NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode,
+                        int16 argc, char* argn[], char* argv[], NPSavedData* saved)
+{
+//    MessageBox(NULL, "wxPluginApp::NPP_New", "wxPlugin", MB_OK);
+
+    // Save values so frame can be created in first NPP_SetWindow
+    if ( m_data.m_instance != 0 )
+    {
+        MessageBox(NULL, "wxPluginApp::NPP_New: whoops, 2 NPP_New calls in succession without NPP_SetWindow.\n Need to modify my code!", "wxPlugin", MB_OK);
+        return NPERR_NO_ERROR;
+    }
+
+    m_data.m_instance = instance;
+    m_data.m_type = pluginType;
+    m_data.m_mode = mode;
+
+    SetAttributeValues(argc, argn, argv);
+
+    // Unfortunately, we may get a stream event before we've got a valid window
+    // handle, so we just have to go ahead and create a new instance.
+    wxPluginFrame *frame = OnNewInstance(m_data);
+
+    m_data.m_instance = NULL;
+    m_data.m_window = NULL;
+    delete[] m_data.m_argv;
+    delete[] m_data.m_argn;
+    m_data.m_argv = NULL;
+    m_data.m_argn = NULL;
+
+    return NPERR_NO_ERROR;
+}
+
+NPError   wxPluginApp::NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
+                        NPBool seekable, uint16* stype)
+{
+    // By default, we want to receive a file instead of a stream.
+    wxPluginFrame *frame = FindFrame(instance);
+    if ( frame )
+    {
+        return frame->OnNPNewStream(type, stream, seekable, stype);
+    }
+    return NPERR_NO_ERROR;
+}
+
+void wxPluginApp::NPP_Print(NPP instance, NPPrint* printInfo)
+{
+    if (instance == NULL)
+        return;
+
+    wxPluginFrame *frame = FindFrame(instance);
+    if ( frame )
+    {
+        frame->OnNPPrint(printInfo);
+    }
+}
+
+NPError      wxPluginApp::NPP_SetWindow(NPP instance, NPWindow* window)
+{
+//    MessageBox(NULL, "wxPluginApp::NPP_SetWindow", "wxPlugin", MB_OK);
+
+    if ( window )
+        wxDebugMsg("%d\n", (int) window->window);
+
+    wxPluginFrame *frame = FindFrame(instance);
+    if ( frame )
+    {
+        frame->SetNPWindow(window);
+    }
+    else
+    {
+#if 0
+        // No such frame: must make it.
+        if ( m_data.m_instance == NULL )
+        {
+            MessageBox(NULL, "wxPluginApp::NPP_SetWindow: whoops, no data to create window. SetWindow called in funny order?", "wxPlugin", MB_OK);
+            return NPERR_NO_ERROR;
+        }
+
+        if ( window->window == NULL )
+        {
+            // We're receiving a NULL window before we've even received
+            // a valid window. Ignore this silly thing.
+            return NPERR_NO_ERROR;
+        }
+
+        m_data.m_window = window;
+        m_data.m_instance = instance;
+
+//        wxPluginFrame *frame = OnNewInstance(m_data);
+
+        m_data.m_instance = NULL;
+        m_data.m_window = NULL;
+        delete[] m_data.m_argv;
+        delete[] m_data.m_argn;
+        m_data.m_argv = NULL;
+        m_data.m_argn = NULL;
+#endif
+    }
+    return NPERR_NO_ERROR;
+}
+
+void      wxPluginApp::NPP_Shutdown(void)
+{
+    // Clean up wxWindows
+    CleanUp();
+}
+
+void      wxPluginApp::NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname)
+{
+    wxPluginFrame *frame = FindFrame(instance);
+    if ( frame )
+    {
+        wxString str(fname);
+        frame->OnNPNewFile(stream, str);
+    }
+}
+
+/*
+void      wxPluginApp::NPP_URLNotify(NPP instance, const char* url, NPReason reason,
+                        void* notifyData)
+{
+}
+*/
+
+int32     wxPluginApp::NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
+                        void* buf)
+{
+    return len;              // The number of bytes accepted
+}
+
+static int32 STREAMBUFSIZE = 0X0FFFFFFF;   // If we are reading from a file in NPAsFile
+                                    // mode so we can take any size stream in our
+                                    // write call (since we ignore it)
+
+int32     wxPluginApp::NPP_WriteReady(NPP instance, NPStream* stream)
+{
+    return STREAMBUFSIZE;   // Number of bytes ready to accept in NPP_Write()
+}
+
diff --git a/utils/nplugin/src/npapp.h b/utils/nplugin/src/npapp.h
new file mode 100644
index 0000000000..238a612313
--- /dev/null
+++ b/utils/nplugin/src/npapp.h
@@ -0,0 +1,91 @@
+/*
+ * File:	NPApp.h
+ * Purpose:	wxPluginApp declaration
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:	
+ * Copyright:   (c) Julian Smart
+ */
+
+#ifndef __PLUGINAPP__
+#define __PLUGINAPP__
+
+#include "wx/wx.h"
+#include "npapi.h"
+
+class wxPluginFrame;
+
+// Data passed to OnNewInstance
+class wxPluginData
+{
+public:
+    NPP         m_instance;
+    NPMIMEType  m_type;
+    NPWindow*   m_window;
+    int         m_mode;
+    int         m_argc;
+    wxString*   m_argn;
+    wxString*   m_argv;
+};
+
+class WXDLLEXPORT wxPluginApp: public wxApp
+{
+  DECLARE_ABSTRACT_CLASS(wxPluginApp)
+
+public:
+  wxPluginApp(void);
+  ~wxPluginApp(void);
+
+  // Find a frame given a NP instance
+  wxPluginFrame *FindFrame(NPP instance);
+
+  // Add a frame
+  void AddFrame(wxPluginFrame *frame);
+
+  // Remove a frame
+  void RemoveFrame(wxPluginFrame *frame);
+
+  // Set attribute/values for the last instance
+  void SetAttributeValues(const int n, char *argn[], char *argv[]);
+
+  ///////////////////////////////////////////////////////////////
+  // Higher-level API than NP API
+  virtual wxPluginFrame *OnNewInstance(const wxPluginData& data) = 0;
+
+  ///////////////////////////////////////////////////////////////
+  // Netscape Plugin API calls routed via wxPluginApp
+
+  virtual NPError   NPP_Destroy(NPP instance, NPSavedData** save);
+  virtual NPError   NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason);
+//  virtual jref      NPP_GetJavaClass(void);
+  virtual NPError   NPP_Initialize(void);
+  virtual NPError   NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode,
+                        int16 argc, char* argn[], char* argv[], NPSavedData* saved);
+  virtual NPError   NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
+                        NPBool seekable, uint16* stype);
+  virtual void      NPP_Print(NPP instance, NPPrint* platformPrint);
+  virtual NPError   NPP_SetWindow(NPP instance, NPWindow* window);
+  virtual void      NPP_Shutdown(void);
+  virtual void      NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname);
+/*
+  virtual void      NPP_URLNotify(NPP instance, const char* url, NPReason reason,
+                        void* notifyData);
+*/
+  virtual int32     NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
+                        void* buf);
+  virtual int32     NPP_WriteReady(NPP instance, NPStream* stream);
+
+protected:
+
+  // List of plugin frames
+  wxList        m_frames;
+
+  // Temporary NPP_New arguments so we can wait until NPP_SetWindow is called
+  // before creating a frame
+  wxPluginData  m_data;
+};
+
+wxPluginApp *wxGetPluginApp(void);
+
+#endif
+
diff --git a/utils/nplugin/src/npframe.cpp b/utils/nplugin/src/npframe.cpp
new file mode 100644
index 0000000000..e3e3f63661
--- /dev/null
+++ b/utils/nplugin/src/npframe.cpp
@@ -0,0 +1,293 @@
+/*
+ * File:	NPFrame.cc
+ * Purpose:	wxPluginFrame implementation
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:
+ * Copyright:   (c) Julian Smart
+ */
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/frame.h"
+#endif
+
+#include "wx/dcprint.h"
+
+#include "NPFrame.h"
+#include "NPApp.h"
+
+#include <windows.h>
+
+extern wxList wxModelessWindows;
+extern char wxFrameClassName[];
+
+IMPLEMENT_DYNAMIC_CLASS(wxPluginFrame, wxFrame)
+
+wxPluginFrame::wxPluginFrame(void)
+{
+    m_npWindow = NULL;
+    m_npInstance = NULL;
+    m_nAttributes = 0;
+    m_names = NULL;
+    m_values = NULL;
+}
+
+bool wxPluginFrame::Create(const wxPluginData& data)
+{
+    SetName("pluginFrame");
+
+    m_npWindow = NULL;
+    m_npInstance = NULL;
+    m_nAttributes = 0;
+    m_names = NULL;
+    m_values = NULL;
+    m_npWindow = data.m_window;
+    m_npInstance = data.m_instance;
+
+    SetAttributeValues(data.m_argc, data.m_argn, data.m_argv);
+    SetNPWindow(data.m_window);
+
+    wxModelessWindows.Append(this);
+
+    if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
+    {
+        ((wxPluginApp *)wxTheApp)->AddFrame(this);
+    }
+    return TRUE;
+}
+
+wxPluginFrame::~wxPluginFrame(void)
+{
+    if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
+    {
+        ((wxPluginApp *)wxTheApp)->RemoveFrame(this);
+    }
+
+    if ( GetHWND() )
+        UnsubclassWin();
+    m_hWnd = 0;
+
+    if ( m_names )
+        delete[] m_names;
+    if ( m_values )
+        delete[] m_values;
+}
+
+// Get size *available for subwindows* i.e. excluding menu bar etc.
+// For XView, this is the same as GetSize
+void wxPluginFrame::GetClientSize(int *x, int *y) const
+{
+    if ( !m_hWnd )
+    {
+        *x = 0; *y = 0;
+        return;
+    }
+    wxFrame::GetClientSize(x, y);
+}
+
+// Set the client size (i.e. leave the calculation of borders etc.
+// to wxWindows)
+void wxPluginFrame::SetClientSize(const int width, const int height)
+{
+    if ( !m_hWnd )
+        return ;
+
+    wxFrame::SetClientSize(width, height);
+}
+
+void wxPluginFrame::GetSize(int *width, int *height) const
+{
+    if ( !m_hWnd )
+    {
+        *width = 0; *height = 0;
+        return;
+    }
+    wxFrame::GetSize(width, height);
+}
+
+void wxPluginFrame::GetPosition(int *x, int *y) const
+{
+    if ( !m_hWnd )
+    {
+        *x = 0; *y = 0;
+        return;
+    }
+    wxFrame::GetPosition(x, y);
+}
+
+void wxPluginFrame::SetAttributeValues(const int n, const char *argn[], const char *argv[])
+{
+    if ( m_names )
+        delete[] m_names;
+    if ( m_values )
+        delete[] m_values;
+
+    m_nAttributes = n;
+
+    m_names = new wxString[n];
+    m_values = new wxString[n];
+    int i;
+    for ( i = 0; i < n ; i ++)
+    {
+        m_names[i] = argn[i];
+        m_values[i] = argv[i];
+    }
+}
+
+void wxPluginFrame::SetAttributeValues(const int n, const wxString* argn, const wxString* argv)
+{
+    if ( m_names )
+        delete[] m_names;
+    if ( m_values )
+        delete[] m_values;
+
+    m_nAttributes = n;
+
+    m_names = new wxString[n];
+    m_values = new wxString[n];
+    int i;
+    for ( i = 0; i < n ; i ++)
+    {
+        m_names[i] = argn[i];
+        m_values[i] = argv[i];
+    }
+}
+
+void wxPluginFrame::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags)
+{
+    // Can't allow app to set the size.
+    return;
+}
+
+// Sets and subclasses the platform-specific window handle
+bool wxPluginFrame::SetNPWindow(NPWindow *window)
+{
+    if ( !window || !window->window)
+    {
+        if ( m_hWnd )
+        {
+            wxMessageBox("Unsubclassing window prematurely");
+            UnsubclassWin();
+            m_hWnd = 0;
+        }
+        m_npWindow = NULL;
+    }
+    else
+    {
+        if ( m_hWnd )
+        {
+            if ( m_hWnd == (WXHWND) window->window )
+            {
+                // Does this mean a resize?
+                return TRUE;
+            }
+        }
+
+        m_npWindow = window;
+        m_hWnd = (WXHWND) window->window;
+        SubclassWin(m_hWnd);
+        m_windowId = ::GetWindowLong((HWND) m_hWnd, GWL_ID);
+    }
+    return TRUE;
+}
+
+NPError wxPluginFrame::OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype)
+{
+    *stype = NP_ASFILE;
+    return NPERR_NO_ERROR;
+}
+
+void wxPluginFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
+{
+}
+
+void wxPluginFrame::OnNPPrint(NPPrint* printInfo)
+{
+        if (printInfo->mode == NP_FULL)
+        {
+            //
+            // *Developers*: If your plugin would like to take over
+            // printing completely when it is in full-screen mode,
+            // set printInfo->pluginPrinted to TRUE and print your
+            // plugin as you see fit.  If your plugin wants Netscape
+            // to handle printing in this case, set printInfo->pluginPrinted
+            // to FALSE (the default) and do nothing.  If you do want
+            // to handle printing yourself, printOne is true if the
+            // print button (as opposed to the print menu) was clicked.
+            // On the Macintosh, platformPrint is a THPrint; on Windows,
+            // platformPrint is a structure (defined in npapi.h) containing
+            // the printer name, port, etc.
+            //
+            void* platformPrint = printInfo->print.fullPrint.platformPrint;
+            NPBool printOne = printInfo->print.fullPrint.printOne;
+            
+            printInfo->print.fullPrint.pluginPrinted = FALSE; // Do the default
+        
+        }
+        else    // If not fullscreen, we must be embedded
+        {
+            //
+            // *Developers*: If your plugin is embedded, or is full-screen
+            // but you returned false in pluginPrinted above, NPP_Print
+            // will be called with mode == NP_EMBED.  The NPWindow
+            // in the printInfo gives the location and dimensions of
+            // the embedded plugin on the printed page.  On the Macintosh,
+            // platformPrint is the printer port; on Windows, platformPrint
+            // is the handle to the printing device context.
+            //
+            NPWindow* printWindow = &(printInfo->print.embedPrint.window);
+            void* platformPrint = printInfo->print.embedPrint.platformPrint;
+
+            HDC hDC = (HDC) platformPrint;
+            wxRectangle rect;
+            rect.x = printWindow->x;
+            rect.y = printWindow->y;
+            rect.width = printWindow->width;
+            rect.height = printWindow->height;
+
+			int saveIt = ::SaveDC(hDC);
+
+            wxPrinterDC *printerDC = new wxPrinterDC((WXHDC) hDC);
+
+            OnPrint(*printerDC, rect);
+
+            printerDC->SetHDC(0);
+			delete printerDC;
+
+			::RestoreDC(hDC, saveIt);
+        }
+ }
+
+void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRectangle& rect)
+{
+    // We must do some transformations here
+	RECT winRect;
+/*
+	winRect.left = rect.x;
+	winRect.top = rect.y;
+	winRect.right = rect.x + rect.right;
+	winRect.bottom = rect.y + rect.height;
+*/
+	POINT winPoint[2];
+	winPoint[0].x = rect.x;
+	winPoint[0].y = rect.y;
+	winPoint[1].x = rect.x + rect.width;
+	winPoint[1].y = rect.y + rect.height;
+
+	if (!LPtoDP((HDC) dc.GetHDC(), winPoint, 2))
+		wxMessageBox("LPtoDP failed.");
+
+    OnDraw(dc);
+}
+
+void wxPluginFrame::OnDraw(wxDC& dc)
+{
+}
+
diff --git a/utils/nplugin/src/npframe.h b/utils/nplugin/src/npframe.h
new file mode 100644
index 0000000000..23a45da355
--- /dev/null
+++ b/utils/nplugin/src/npframe.h
@@ -0,0 +1,81 @@
+/*
+ * File:	NPFrame.h
+ * Purpose:	wxPluginFrame declaration
+ * Author:	Julian Smart
+ * Created:	1997
+ * Updated:	
+ * Copyright:   (c) Julian Smart
+ */
+
+#ifndef __PLUGINFRAME__
+#define __PLUGINFRAME__
+
+#include "wx/frame.h"
+#include "NPApp.h"
+#include "npapi.h"
+
+WXDLLEXPORT extern const char *wxFrameNameStr;
+
+class wxPrinterDC;
+class WXDLLEXPORT wxPluginFrame: public wxFrame
+{
+  DECLARE_DYNAMIC_CLASS(wxPluginFrame)
+
+public:
+  wxPluginFrame(void);
+  inline wxPluginFrame(const wxPluginData& data)
+  {
+      m_npWindow = NULL;
+      m_npInstance = NULL;
+      m_nAttributes = 0;
+      m_names = NULL;
+      m_values = NULL;
+
+      Create(data);
+  }
+
+  ~wxPluginFrame(void);
+
+  bool Create(const wxPluginData& data);
+
+  // Sets and subclasses the platform-specific window handle
+  virtual bool SetNPWindow(NPWindow *window);
+  inline NPWindow *GetNPWindow(void) { return m_npWindow; }
+
+  void SetClientSize(const int width, const int height);
+  void GetClientSize(int *width, int *height) const;
+
+  void GetSize(int *width, int *height) const ;
+  void GetPosition(int *x, int *y) const ;
+  void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
+
+  // Accessors
+  inline int GetAttributeCount(void) const { return m_nAttributes; }
+  inline wxString GetAttributeName(const int n) { return m_names[n]; }
+  inline wxString GetAttributeValue(const int n) { return m_values[n]; }
+
+  void SetAttributeValues(const int n, const char* argn[], const char *argv[]);
+  void SetAttributeValues(const int n, const wxString* argn, const wxString* argv);
+  inline void SetInstance(const NPP instance) { m_npInstance = instance; };
+  inline NPP GetInstance(void) { return m_npInstance; }
+
+  // Overridables: low-level
+  virtual NPError OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype);
+  virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
+  virtual void OnNPPrint(NPPrint* printInfo);
+
+  // Overridables: high-level
+  virtual void OnPrint(wxPrinterDC& dc, wxRectangle& rect);
+  virtual void OnDraw(wxDC& dc);
+
+protected:
+
+  wxString*     m_names;
+  wxString*     m_values;
+  int           m_nAttributes;
+  NPP           m_npInstance;
+  NPWindow*     m_npWindow;
+};
+
+#endif
+
diff --git a/utils/nplugin/src/npshell.cpp b/utils/nplugin/src/npshell.cpp
new file mode 100644
index 0000000000..fa040054de
--- /dev/null
+++ b/utils/nplugin/src/npshell.cpp
@@ -0,0 +1,278 @@
+//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+//
+// npshell.cpp
+//
+// This file defines a "shell" plugin that plugin developers can use
+// as the basis for a real plugin.  This shell just provides empty
+// implementations of all functions that the plugin can implement
+// that will be called by Netscape (the NPP_xxx methods defined in 
+// npapi.h). 
+//
+//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+#ifndef _NPAPI_H_
+#include "npapi.h"
+#endif
+
+#include <windows.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "NPApp.h"
+
+//
+// Instance state information about the plugin.
+//
+// *Developers*: Use this struct to hold per-instance
+//               information that you'll need in the
+//               various functions in this file.
+//
+typedef struct _PluginInstance
+{
+    NPWindow*       fWindow;
+    uint16          fMode;
+    
+} PluginInstance;
+
+
+
+//------------------------------------------------------------------------------------
+// NPP_Initialize:
+//------------------------------------------------------------------------------------
+NPError NPP_Initialize(void)
+{
+//    MessageBox(NULL, "NPP_Initialize", "NPTest", MB_OK);
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_Initialize();
+    else
+        return NPERR_NO_ERROR;
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_Shutdown:
+//------------------------------------------------------------------------------------
+void NPP_Shutdown(void)
+{
+//    MessageBox(NULL, "NPP_Shutdown", "wxPlugin", MB_OK);
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        app->NPP_Shutdown();
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_New:
+//------------------------------------------------------------------------------------
+NPError NP_LOADDS
+NPP_New(NPMIMEType pluginType,
+                NPP instance,
+                uint16 mode,
+                int16 argc,
+                char* argn[],
+                char* argv[],
+                NPSavedData* saved)
+{
+//    MessageBox(NULL, "NPP_New", "NPTest", MB_OK);
+
+    if (instance == NULL)
+        return NPERR_INVALID_INSTANCE_ERROR;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
+    else
+        return NPERR_NO_ERROR;
+}
+
+//------------------------------------------------------------------------------------
+// NPP_Destroy:
+//------------------------------------------------------------------------------------
+NPError NP_LOADDS
+NPP_Destroy(NPP instance, NPSavedData** save)
+{
+//    MessageBox(NULL, "NPP_Destroy", "NPTest", MB_OK);
+
+    if (instance == NULL)
+        return NPERR_INVALID_INSTANCE_ERROR;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_Destroy(instance, save);
+    else
+        return NPERR_NO_ERROR;
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_SetWindow:
+//------------------------------------------------------------------------------------
+NPError NP_LOADDS
+NPP_SetWindow(NPP instance, NPWindow* window)
+{
+//    MessageBox(NULL, "NPP_SetWindow", "NPTest", MB_OK);
+
+    if (instance == NULL)
+        return NPERR_INVALID_INSTANCE_ERROR;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_SetWindow(instance, window);
+    else
+        return NPERR_NO_ERROR;
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_NewStream:
+//------------------------------------------------------------------------------------
+NPError NP_LOADDS
+NPP_NewStream(NPP instance,
+                            NPMIMEType type,
+                            NPStream *stream, 
+                            NPBool seekable,
+                            uint16 *stype)
+{
+//    MessageBox(NULL, "NPP_NewStream", "NPTest", MB_OK);
+
+    if (instance == NULL)
+        return NPERR_INVALID_INSTANCE_ERROR;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_NewStream(instance, type, stream, seekable, stype);
+    else
+        return NPERR_NO_ERROR;
+}
+
+
+
+//
+// *Developers*: 
+// These next 2 functions are directly relevant in a plug-in which handles the
+// data in a streaming manner.  If you want zero bytes because no buffer space
+// is YET available, return 0.  As long as the stream has not been written
+// to the plugin, Navigator will continue trying to send bytes.  If the plugin
+// doesn't want them, just return some large number from NPP_WriteReady(), and
+// ignore them in NPP_Write().  For a NP_ASFILE stream, they are still called
+// but can safely be ignored using this strategy.
+//
+
+static int32 STREAMBUFSIZE = 0X0FFFFFFF;   // If we are reading from a file in NPAsFile
+                                    // mode so we can take any size stream in our
+                                    // write call (since we ignore it)
+
+//------------------------------------------------------------------------------------
+// NPP_WriteReady:
+//------------------------------------------------------------------------------------
+int32 NP_LOADDS
+NPP_WriteReady(NPP instance, NPStream *stream)
+{
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_WriteReady(instance, stream);
+    else
+        return STREAMBUFSIZE;
+
+    return STREAMBUFSIZE;   // Number of bytes ready to accept in NPP_Write()
+}
+
+
+
+//------------------------------------------------------------------------------------
+// NPP_Write:
+//------------------------------------------------------------------------------------
+int32 NP_LOADDS
+NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
+{
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_Write(instance, stream, offset, len, buffer);
+    else
+        return len;              // The number of bytes accepted
+}
+
+
+
+//------------------------------------------------------------------------------------
+// NPP_DestroyStream:
+//------------------------------------------------------------------------------------
+NPError NP_LOADDS
+NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)
+{
+    if (instance == NULL)
+        return NPERR_INVALID_INSTANCE_ERROR;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        return app->NPP_DestroyStream(instance, stream, reason);
+    else
+        return NPERR_NO_ERROR;
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_StreamAsFile:
+//------------------------------------------------------------------------------------
+void NP_LOADDS
+NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
+{
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        app->NPP_StreamAsFile(instance, stream, fname);
+}
+
+
+
+//------------------------------------------------------------------------------------
+// NPP_Print:
+//------------------------------------------------------------------------------------
+void NP_LOADDS
+NPP_Print(NPP instance, NPPrint* printInfo)
+{
+    if (printInfo == NULL)   // trap invalid parm
+        return;
+    if ( instance == NULL )
+        return;
+
+    wxPluginApp *app = wxGetPluginApp();
+    if ( app )
+        app->NPP_Print(instance, printInfo);
+}
+
+
+//------------------------------------------------------------------------------------
+// NPP_HandleEvent:
+// Mac-only.
+//------------------------------------------------------------------------------------
+int16 NPP_HandleEvent(NPP instance, void* event)
+{
+    NPBool eventHandled = FALSE;
+    if (instance == NULL)
+        return eventHandled;
+        
+    PluginInstance* This = (PluginInstance*) instance->pdata;
+    
+    //
+    // *Developers*: The "event" passed in is a Macintosh
+    // EventRecord*.  The event.what field can be any of the
+    // normal Mac event types, or one of the following additional
+    // types defined in npapi.h: getFocusEvent, loseFocusEvent,
+    // adjustCursorEvent.  The focus events inform your plugin
+    // that it will become, or is no longer, the recepient of
+    // key events.  If your plugin doesn't want to receive key
+    // events, return false when passed at getFocusEvent.  The
+    // adjustCursorEvent is passed repeatedly when the mouse is
+    // over your plugin; if your plugin doesn't want to set the
+    // cursor, return false.  Handle the standard Mac events as
+    // normal.  The return value for all standard events is currently
+    // ignored except for the key event: for key events, only return
+    // true if your plugin has handled that particular key event. 
+    //
+    
+    return eventHandled;
+}
+
diff --git a/utils/nplugin/src/npupp.h b/utils/nplugin/src/npupp.h
new file mode 100644
index 0000000000..1c352d2245
--- /dev/null
+++ b/utils/nplugin/src/npupp.h
@@ -0,0 +1,799 @@
+/*
+ *  npupp.h $Revision$
+ *  function call mecahnics needed by platform specific glue code.
+ */
+
+
+#ifndef _NPUPP_H_
+#define _NPUPP_H_
+
+#ifndef GENERATINGCFM
+#define GENERATINGCFM 0
+#endif
+
+#ifndef _NPAPI_H_
+#include "npapi.h"
+#endif
+
+/******************************************************************************************
+   plug-in function table macros
+ 	        for each function in and out of the plugin API we define
+                    typedef NPP_FooUPP
+					#define NewNPP_FooProc
+					#define CallNPP_FooProc
+			for mac, define the UPP magic for PPC/68K calling
+ *******************************************************************************************/
+
+
+/* NPP_Initialize */
+
+#if GENERATINGCFM
+typedef UniversalProcPtr NPP_InitializeUPP;
+
+enum {
+	uppNPP_InitializeProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))		
+		| RESULT_SIZE(SIZE_CODE(0))
+};
+
+#define NewNPP_InitializeProc(FUNC)		\
+		(NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture())
+#define CallNPP_InitializeProc(FUNC)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo)
+		
+#else
+
+typedef void (*NPP_InitializeUPP)(void);
+#define NewNPP_InitializeProc(FUNC)		\
+		((NPP_InitializeUPP) (FUNC))
+#define CallNPP_InitializeProc(FUNC)		\
+		(*(FUNC))()
+
+#endif
+
+
+/* NPP_Shutdown */
+
+#if GENERATINGCFM
+typedef UniversalProcPtr NPP_ShutdownUPP;
+
+enum {
+	uppNPP_ShutdownProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))		
+		| RESULT_SIZE(SIZE_CODE(0))
+};
+
+#define NewNPP_ShutdownProc(FUNC)		\
+		(NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture())
+#define CallNPP_ShutdownProc(FUNC)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo)
+		
+#else
+
+typedef void (*NPP_ShutdownUPP)(void);
+#define NewNPP_ShutdownProc(FUNC)		\
+		((NPP_ShutdownUPP) (FUNC))
+#define CallNPP_ShutdownProc(FUNC)		\
+		(*(FUNC))()
+
+#endif
+
+
+/* NPP_New */
+
+#if GENERATINGCFM
+typedef UniversalProcPtr NPP_NewUPP;
+
+enum {
+	uppNPP_NewProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16)))
+		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **)))
+		| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **)))
+		| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+
+#define NewNPP_NewProc(FUNC)		\
+		(NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture())
+#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \
+								   (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
+#else
+
+typedef NPError	(*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
+#define NewNPP_NewProc(FUNC)		\
+		((NPP_NewUPP) (FUNC))
+#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7)		\
+		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
+
+#endif
+
+
+/* NPP_Destroy */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_DestroyUPP;
+enum {
+	uppNPP_DestroyProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPP_DestroyProc(FUNC)		\
+		(NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture())
+#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2))
+#else
+
+typedef NPError	(*NPP_DestroyUPP)(NPP instance, NPSavedData** save);
+#define NewNPP_DestroyProc(FUNC)		\
+		((NPP_DestroyUPP) (FUNC))
+#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)		\
+		(*(FUNC))((ARG1), (ARG2))
+
+#endif
+
+
+/* NPP_SetWindow */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_SetWindowUPP;
+enum {
+	uppNPP_SetWindowProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPP_SetWindowProc(FUNC)		\
+		(NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture())
+#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2))
+
+#else
+
+typedef NPError	(*NPP_SetWindowUPP)(NPP instance, NPWindow* window);
+#define NewNPP_SetWindowProc(FUNC)		\
+		((NPP_SetWindowUPP) (FUNC))
+#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)		\
+		(*(FUNC))((ARG1), (ARG2))
+
+#endif
+
+
+/* NPP_NewStream */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_NewStreamUPP;
+enum {
+	uppNPP_NewStreamProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))
+		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPP_NewStreamProc(FUNC)		\
+		(NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture())
+#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
+#else
+
+typedef NPError	(*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
+#define NewNPP_NewStreamProc(FUNC)		\
+		((NPP_NewStreamUPP) (FUNC))
+#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
+		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
+#endif
+
+
+/* NPP_DestroyStream */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_DestroyStreamUPP;
+enum {
+	uppNPP_DestroyStreamProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPP_DestroyStreamProc(FUNC)		\
+		(NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture())
+#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPErrorArg)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPErrorArg))
+
+#else
+
+typedef NPError	(*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason);
+#define NewNPP_DestroyStreamProc(FUNC)		\
+		((NPP_DestroyStreamUPP) (FUNC))
+#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPErrorArg)		\
+		(*(FUNC))((NPParg), (NPStreamPtr), (NPErrorArg))
+
+#endif
+
+
+/* NPP_WriteReady */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_WriteReadyUPP;
+enum {
+	uppNPP_WriteReadyProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(int32)))
+};
+#define NewNPP_WriteReadyProc(FUNC)		\
+		(NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture())
+#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)		\
+		(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr))
+
+#else
+
+typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream);
+#define NewNPP_WriteReadyProc(FUNC)		\
+		((NPP_WriteReadyUPP) (FUNC))
+#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)		\
+		(*(FUNC))((NPParg), (NPStreamPtr))
+
+#endif
+
+
+/* NPP_Write */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_WriteUPP;
+enum {
+	uppNPP_WriteProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32)))
+		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(int32)))
+};
+#define NewNPP_WriteProc(FUNC)		\
+		(NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture())
+#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)		\
+		(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))
+
+#else
+
+typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
+#define NewNPP_WriteProc(FUNC)		\
+		((NPP_WriteUPP) (FUNC))
+#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)		\
+		(*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))
+
+#endif
+
+
+/* NPP_StreamAsFile */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_StreamAsFileUPP;
+enum {
+	uppNPP_StreamAsFileProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))
+		| RESULT_SIZE(SIZE_CODE(0))
+};
+#define NewNPP_StreamAsFileProc(FUNC)		\
+		(NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture())
+#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3))
+
+#else
+
+typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname);
+#define NewNPP_StreamAsFileProc(FUNC)		\
+		((NPP_StreamAsFileUPP) (FUNC))
+#define CallNPP_StreamAsFileProc(FUNC,  ARG1, ARG2, ARG3)		\
+		(*(FUNC))((ARG1), (ARG2), (ARG3))
+#endif
+
+
+/* NPP_Print */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_PrintUPP;
+enum {
+	uppNPP_PrintProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *)))
+		| RESULT_SIZE(SIZE_CODE(0))
+};
+#define NewNPP_PrintProc(FUNC)		\
+		(NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture())
+#define CallNPP_PrintProc(FUNC,  NPParg, voidPtr)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr))
+
+#else
+
+typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint);
+#define NewNPP_PrintProc(FUNC)		\
+		((NPP_PrintUPP) (FUNC))
+#define CallNPP_PrintProc(FUNC,  NPParg, NPPrintArg)		\
+		(*(FUNC))((NPParg), (NPPrintArg))
+
+#endif
+
+
+/* NPP_HandleEvent */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_HandleEventUPP;
+enum {
+	uppNPP_HandleEventProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(int16)))
+};
+#define NewNPP_HandleEventProc(FUNC)		\
+		(NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture())
+#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)		\
+		(int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr))
+
+#else
+
+typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event);
+#define NewNPP_HandleEventProc(FUNC)		\
+		((NPP_HandleEventUPP) (FUNC))
+#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)		\
+		(*(FUNC))((NPParg), (voidPtr))
+
+#endif
+
+
+
+
+/*
+ *  Netscape entry points
+ */
+
+
+/* NPN_GetUrl */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_GetURLUPP;
+enum {
+	uppNPN_GetURLProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPN_GetURLProc(FUNC)		\
+		(NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture())
+#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3))
+#else
+
+typedef NPError	(*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);
+#define NewNPN_GetURLProc(FUNC)		\
+		((NPN_GetURLUPP) (FUNC))
+#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3)		\
+		(*(FUNC))((ARG1), (ARG2), (ARG3))
+#endif
+
+
+/* NPN_PostUrl */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_PostURLUPP;
+enum {
+	uppNPN_PostURLProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))
+		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))
+		| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPN_PostURLProc(FUNC)		\
+		(NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture())
+#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
+#else
+
+typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);
+#define NewNPN_PostURLProc(FUNC)		\
+		((NPN_PostURLUPP) (FUNC))
+#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
+		(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
+#endif
+
+
+/* NPN_RequestRead */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_RequestReadUPP;
+enum {
+	uppNPN_RequestReadProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPN_RequestReadProc(FUNC)		\
+		(NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture())
+#define CallNPN_RequestReadProc(FUNC,  stream, range)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range))
+
+#else
+
+typedef NPError	(*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);
+#define NewNPN_RequestReadProc(FUNC)		\
+		((NPN_RequestReadUPP) (FUNC))
+#define CallNPN_RequestReadProc(FUNC, stream, range)		\
+		(*(FUNC))((stream), (range))
+
+#endif
+
+
+/* NPN_NewStream */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_NewStreamUPP;
+enum {
+	uppNPN_NewStreamProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))
+		| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16*)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPN_NewStreamProc(FUNC)		\
+		(NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture())
+#define CallNPN_NewStreamProc(FUNC, npp, type, stream)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (stream))	
+
+#else
+
+typedef NPError	(*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream);
+#define NewNPN_NewStreamProc(FUNC)		\
+		((NPN_NewStreamUPP) (FUNC))
+#define CallNPN_NewStreamProc(FUNC, npp, type, stream)		\
+		(*(FUNC))((npp), (type), (stream))
+
+#endif
+
+
+/* NPN_Write */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_WriteUPP;
+enum {
+	uppNPN_WriteProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))
+		| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(int32)))
+};
+#define NewNPN_WriteProc(FUNC)		\
+		(NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture())
+#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)		\
+		(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer))	
+
+#else
+
+typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer);
+#define NewNPN_WriteProc(FUNC)		\
+		((NPN_WriteUPP) (FUNC))
+#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)		\
+		(*(FUNC))((npp), (stream), (len), (buffer))
+
+#endif
+
+
+/* NPN_DestroyStream */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_DestroyStreamUPP;
+enum {
+	uppNPN_DestroyStreamProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPN_DestroyStreamProc(FUNC)		\
+		(NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture())
+#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err)		\
+		(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (err))	
+
+#else
+
+typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason);
+#define NewNPN_DestroyStreamProc(FUNC)		\
+		((NPN_DestroyStreamUPP) (FUNC))
+#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err)		\
+		(*(FUNC))((npp), (stream), (err))
+
+#endif
+
+
+/* NPN_Status */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_StatusUPP;
+enum {
+	uppNPN_StatusProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
+};
+
+#define NewNPN_StatusProc(FUNC)		\
+		(NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture())
+#define CallNPN_StatusProc(FUNC, npp, msg)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg))	
+
+#else
+
+typedef void (*NPN_StatusUPP)(NPP instance, const char* message);
+#define NewNPN_StatusProc(FUNC)		\
+		((NPN_StatusUPP) (FUNC))
+#define CallNPN_StatusProc(FUNC, npp, msg)		\
+		(*(FUNC))((npp), (msg))	
+
+#endif
+
+
+/* NPN_UserAgent */
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_UserAgentUPP;
+enum {
+        uppNPN_UserAgentProcInfo = kThinkCStackBased
+                | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
+                | RESULT_SIZE(SIZE_CODE(sizeof(const char *)))
+};
+
+#define NewNPN_UserAgentProc(FUNC)              \
+                (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture())
+#define CallNPN_UserAgentProc(FUNC, ARG1)               \
+                (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1))
+
+#else
+
+typedef const char*	(*NPN_UserAgentUPP)(NPP instance);
+#define NewNPN_UserAgentProc(FUNC)              \
+                ((NPN_UserAgentUPP) (FUNC))
+#define CallNPN_UserAgentProc(FUNC, ARG1)               \
+                (*(FUNC))((ARG1))
+
+#endif
+
+
+/* NPN_MemAlloc */
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_MemAllocUPP;
+enum {
+	uppNPN_MemAllocProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(void *)))
+};
+
+#define NewNPN_MemAllocProc(FUNC)		\
+		(NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture())
+#define CallNPN_MemAllocProc(FUNC, ARG1)		\
+		(void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1))	
+
+#else
+
+typedef void* (*NPN_MemAllocUPP)(uint32 size);
+#define NewNPN_MemAllocProc(FUNC)		\
+		((NPN_MemAllocUPP) (FUNC))
+#define CallNPN_MemAllocProc(FUNC, ARG1)		\
+		(*(FUNC))((ARG1))	
+
+#endif
+
+
+/* NPN__MemFree */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_MemFreeUPP;
+enum {
+	uppNPN_MemFreeProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
+};
+
+#define NewNPN_MemFreeProc(FUNC)		\
+		(NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture())
+#define CallNPN_MemFreeProc(FUNC, ARG1)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1))
+
+#else
+
+typedef void (*NPN_MemFreeUPP)(void* ptr);
+#define NewNPN_MemFreeProc(FUNC)		\
+		((NPN_MemFreeUPP) (FUNC))
+#define CallNPN_MemFreeProc(FUNC, ARG1)		\
+		(*(FUNC))((ARG1))	
+
+#endif
+
+
+/* NPN_MemFlush */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_MemFlushUPP;
+enum {
+	uppNPN_MemFlushProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(uint32)))
+};
+
+#define NewNPN_MemFlushProc(FUNC)		\
+		(NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture())
+#define CallNPN_MemFlushProc(FUNC, ARG1)		\
+		(uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1))	
+
+#else
+
+typedef uint32 (*NPN_MemFlushUPP)(uint32 size);
+#define NewNPN_MemFlushProc(FUNC)		\
+		((NPN_MemFlushUPP) (FUNC))
+#define CallNPN_MemFlushProc(FUNC, ARG1)		\
+		(*(FUNC))((ARG1))	
+
+#endif
+
+
+
+/* NPN_ReloadPlugins */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPN_ReloadPluginsUPP;
+enum {
+	uppNPN_ReloadPluginsProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool)))
+		| RESULT_SIZE(SIZE_CODE(0))
+};
+
+#define NewNPN_ReloadPluginsProc(FUNC)		\
+		(NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture())
+#define CallNPN_ReloadPluginsProc(FUNC, ARG1)		\
+		(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1))	
+
+#else
+
+typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);
+#define NewNPN_ReloadPluginsProc(FUNC)		\
+		((NPN_ReloadPluginsUPP) (FUNC))
+#define CallNPN_ReloadPluginsProc(FUNC, ARG1)		\
+		(*(FUNC))((ARG1))	
+
+#endif
+
+
+
+
+/******************************************************************************************
+ * The actual plugin function table definitions
+ *******************************************************************************************/
+
+typedef struct _NPPluginFuncs {
+	uint16 size;
+	uint16 version;
+    NPP_NewUPP newp;
+    NPP_DestroyUPP destroy;
+    NPP_SetWindowUPP setwindow;
+    NPP_NewStreamUPP newstream;
+    NPP_DestroyStreamUPP destroystream;
+	NPP_StreamAsFileUPP asfile;
+    NPP_WriteReadyUPP writeready;
+    NPP_WriteUPP write;
+    NPP_PrintUPP print;
+    NPP_HandleEventUPP event;
+} NPPluginFuncs;
+
+typedef struct _NPNetscapeFuncs {
+	uint16 size;
+	uint16 version;
+    NPN_GetURLUPP geturl;
+    NPN_PostURLUPP posturl;
+    NPN_RequestReadUPP requestread;
+    NPN_NewStreamUPP newstream;
+    NPN_WriteUPP write;
+    NPN_DestroyStreamUPP destroystream;
+    NPN_StatusUPP status;
+    NPN_UserAgentUPP uagent;
+	NPN_MemAllocUPP memalloc;
+	NPN_MemFreeUPP memfree;
+	NPN_MemFlushUPP memflush;
+	NPN_ReloadPluginsUPP reloadplugins;
+} NPNetscapeFuncs;
+
+
+
+#ifdef XP_MAC
+/******************************************************************************************
+ * Mac platform-specific plugin glue stuff
+ *******************************************************************************************/
+
+/*
+ * Main entry point of the plugin.
+ * This routine will be called when the plugin is loaded. The function
+ * tables are passed in and the plugin fills in the NPPluginFuncs table
+ * and NPPShutdownUPP for Netscape's use.
+ */
+
+#if GENERATINGCFM
+
+typedef UniversalProcPtr NPP_MainEntryUPP;
+enum {
+	uppNPP_MainEntryProcInfo = kThinkCStackBased
+		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*)))
+		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*)))
+		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*)))
+		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
+};
+#define NewNPP_MainEntryProc(FUNC)		\
+		(NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture())
+#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)		\
+		CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP))
+
+#else
+
+typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*);
+#define NewNPP_MainEntryProc(FUNC)		\
+		((NPP_MainEntryUPP) (FUNC))
+#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)		\
+		(*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))
+
+#endif
+#endif /* MAC */
+
+
+#ifdef _WINDOWS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* plugin meta member functions */
+
+NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs);
+
+NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs);
+
+NPError WINAPI NP_Shutdown();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS */
+
+
+#endif /* _NPUPP_H_ */
+
diff --git a/utils/nplugin/src/npwin.cpp b/utils/nplugin/src/npwin.cpp
new file mode 100644
index 0000000000..f97ef498a7
--- /dev/null
+++ b/utils/nplugin/src/npwin.cpp
@@ -0,0 +1,186 @@
+/* npwin.cpp */
+#include "windows.h"
+
+#include "npapi.h"
+#include "npupp.h"
+
+#ifdef __WIN32__
+    #define NP_EXPORT
+#else
+    #define NP_EXPORT _export
+#endif
+
+static NPNetscapeFuncs* g_pNavigatorFuncs = NULL;
+
+
+/*   PLUGIN DLL entry points   */
+/* These are the Windows specific DLL entry points, not the "normal" plugin
+   entry points.  The "normal" ones are in NPSHELL.CPP
+*/
+
+/* fills in the func table used by Navigator to call entry points in
+   plugin DLL.  Note that these entry points ensure that DS is loaded
+   by using the NP_LOADDS macro, when compiling for Win16
+*/
+NPError WINAPI NP_EXPORT NP_GetEntryPoints(NPPluginFuncs* pFuncs)
+{
+    /* trap a NULL ptr */
+    if(pFuncs == NULL)
+        return NPERR_INVALID_FUNCTABLE_ERROR;
+
+    /* if the plugin's function table is smaller than the plugin expects,
+       then they are incompatible, and should return an error */
+    if(pFuncs->size < sizeof NPPluginFuncs)
+        return NPERR_INVALID_FUNCTABLE_ERROR;
+
+    pFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
+    pFuncs->newp          = NPP_New;
+    pFuncs->destroy       = NPP_Destroy;
+    pFuncs->setwindow     = NPP_SetWindow;
+    pFuncs->newstream     = NPP_NewStream;
+    pFuncs->destroystream = NPP_DestroyStream;
+    pFuncs->asfile        = NPP_StreamAsFile;
+    pFuncs->writeready    = NPP_WriteReady;
+    pFuncs->write         = NPP_Write;
+    pFuncs->print         = NPP_Print;
+    pFuncs->event         = NULL;       /* reserved */
+
+    return NPERR_NO_ERROR;
+}
+
+/* called immediately after the plugin DLL is loaded
+*/
+NPError WINAPI NP_EXPORT NP_Initialize(NPNetscapeFuncs* pFuncs)
+{
+    /* trap a NULL ptr */
+    if(pFuncs == NULL)
+        return NPERR_INVALID_FUNCTABLE_ERROR;
+
+    g_pNavigatorFuncs = pFuncs; /* save it for future reference */
+
+    /* if the plugin's major ver level is lower than the Navigator's,
+       then they are incompatible, and should return an error */
+    if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
+        return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+    /* if the Navigator's function table is smaller than the plugin expects,
+       then they are incompatible, and should return an error */
+    if(pFuncs->size < sizeof NPNetscapeFuncs)
+        return NPERR_INVALID_FUNCTABLE_ERROR;
+
+    return NPP_Initialize();
+}
+
+/* called immediately before the plugin DLL is unloaded
+*/
+NPError WINAPI NP_EXPORT NP_Shutdown()
+{
+    NPP_Shutdown();
+
+    g_pNavigatorFuncs = NULL;
+
+    return NPERR_NO_ERROR;
+}
+
+
+/*    NAVIGATOR Entry points    */
+
+/* These entry points expect to be called from within the plugin.  The
+   noteworthy assumption is that DS has already been set to point to the
+   plugin's DLL data segment.  Don't call these functions from outside
+   the plugin without ensuring DS is set to the DLLs data segment first,
+   typically using the NP_LOADDS macro
+*/
+
+/* returns the major/minor version numbers of the Plugin API for the plugin
+   and the Navigator
+*/
+void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
+{
+    *plugin_major   = NP_VERSION_MAJOR;
+    *plugin_minor   = NP_VERSION_MINOR;
+    *netscape_major = HIBYTE(g_pNavigatorFuncs->version);
+    *netscape_minor = LOBYTE(g_pNavigatorFuncs->version);
+}
+
+/* causes the specified URL to be fetched and streamed in
+*/
+NPError NPN_GetURL(NPP instance, const char *url, const char *window)
+{
+    return g_pNavigatorFuncs->geturl(instance, url, window);
+}
+
+NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
+{
+    return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);
+}
+
+/* Requests that a number of bytes be provided on a stream.  Typically
+   this would be used if a stream was in "pull" mode.  An optional
+   position can be provided for streams which are seekable.
+*/
+NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
+{
+    return g_pNavigatorFuncs->requestread(stream, rangeList);
+}
+
+/* Creates a new stream of data from the plug-in to be interpreted
+   by Netscape in the current window.
+*/
+NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream *stream)
+{
+    return g_pNavigatorFuncs->newstream(instance, type, stream);
+}
+
+/* Provides len bytes of data.
+*/
+int32 NPN_Write(NPP instance, NPStream *stream,
+                int32 len, void *buffer)
+{
+    return g_pNavigatorFuncs->write(instance, stream, len, buffer);
+}
+
+/* Closes a stream object.  
+reason indicates why the stream was closed.
+*/
+NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
+{
+    return g_pNavigatorFuncs->destroystream(instance, stream, reason);
+}
+
+/* Provides a text status message in the Netscape client user interface
+*/
+void NPN_Status(NPP instance, const char *message)
+{
+    g_pNavigatorFuncs->status(instance, message);
+}
+
+/* returns the user agent string of Navigator, which contains version info
+*/
+const char* NPN_UserAgent(NPP instance)
+{
+    return g_pNavigatorFuncs->uagent(instance);
+}
+
+/* allocates memory from the Navigator's memory space.  Necessary so that
+   saved instance data may be freed by Navigator when exiting.
+*/
+void* NPN_MemAlloc(uint32 size)
+{
+    return g_pNavigatorFuncs->memalloc(size);
+}
+
+/* reciprocal of MemAlloc() above
+*/
+void NPN_MemFree(void* ptr)
+{
+    g_pNavigatorFuncs->memfree(ptr);
+}
+
+/* private function to Netscape.  do not use!
+*/
+void NPN_ReloadPlugins(NPBool reloadPages)
+{
+    g_pNavigatorFuncs->reloadplugins(reloadPages);
+}
+
-- 
2.50.0

