ソースを参照

Projektdateien hinzufügen.

Kolja Strohm 6 年 前
コミット
4a4a8ad06e

+ 28 - 0
Test.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.22823.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Debug|Win32.Build.0 = Debug|Win32
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Debug|x64.ActiveCfg = Debug|x64
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Debug|x64.Build.0 = Debug|x64
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Release|Win32.ActiveCfg = Release|Win32
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Release|Win32.Build.0 = Release|Win32
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Release|x64.ActiveCfg = Release|x64
+		{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

BIN
Test/Asteroids.m2


BIN
Test/Framework.dll


BIN
Test/GSL.dll


+ 11 - 0
Test/KSGSTest.cpp

@@ -0,0 +1,11 @@
+#include <KSGSStandart.h>
+
+var int a = 10;
+
+func void start()
+{
+	var int b;
+	b = a;
+	b = 20;
+	Rückruf( a );
+}

BIN
Test/KSGScript.dll


BIN
Test/Network.dll


+ 2725 - 0
Test/ShObjIdl.idl

@@ -0,0 +1,2725 @@
+/*
+* COM interfaces for shell objects
+*
+* Copyright (C) 1999 Juergen Schmied
+* Copyright (C) 2003 Alexandre Julliard
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+*/
+
+import "objidl.idl";
+import "oleidl.idl";
+import "oaidl.idl";
+import "docobj.idl";
+import "shtypes.idl";
+import "servprov.idl";
+import "comcat.idl";
+import "propidl.idl";
+/* FIXME: import "prsht.idl";*/
+import "msxml.idl";
+import "wtypes.idl";
+/* FIXME: import "propsys.idl"; */
+/* FIXME: import "structuredquery.idl"; */
+
+cpp_quote( "/* FIXME: #include <sherrors.h> */" )
+
+
+/*****************************************************************************
+* IPersistFolder interface
+*/
+[
+    object,
+    uuid( 000214ea-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IPersistFolder : IPersist
+{
+    typedef IPersistFolder *LPPERSISTFOLDER;
+
+    HRESULT Initialize( [ in ] LPCITEMIDLIST pidl );
+}
+
+
+/*****************************************************************************
+* IPersistFolder2 interface
+*/
+[
+    object,
+    uuid( 1ac3d9f0-175c-11d1-95be-00609797ea4f ),
+    pointer_default( unique )
+]
+interface IPersistFolder2 : IPersistFolder
+{
+    typedef IPersistFolder2 *LPPERSISTFOLDER2;
+
+    HRESULT GetCurFolder( [ out ] LPITEMIDLIST *ppidl );
+}
+
+
+/*****************************************************************************
+* IPersistIDList interface
+*/
+[
+    object,
+    uuid( 1079acfc-29bd-11d3-8e0d-00c04f6837d5 ),
+    pointer_default( unique )
+]
+interface IPersistIDList : IPersist
+{
+    HRESULT SetIDList( [ in ] LPCITEMIDLIST pidl );
+    HRESULT GetIDList( [ out ] LPITEMIDLIST *ppidl );
+}
+
+
+/*****************************************************************************
+* IEnumIDList interface
+*/
+[
+    object,
+    uuid( 000214f2-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IEnumIDList : IUnknown
+{
+    typedef IEnumIDList *LPENUMIDLIST;
+
+    HRESULT Next(
+        [ in ] ULONG celt,
+        [ out, size_is( celt ), length_is( *pceltFetched ) ] LPITEMIDLIST *rgelt,
+        [ out ] ULONG *pceltFetched );
+
+    HRESULT Skip( [ in ] ULONG celt );
+    HRESULT Reset();
+    HRESULT Clone( [ out ] IEnumIDList **ppenum );
+}
+
+/*****************************************************************************
+* IShellPropSheetExt interface
+*/
+cpp_quote( "#if 0" )
+typedef LPARAM LPFNSVADDPROPSHEETPAGE;
+cpp_quote( "#else" )
+cpp_quote( "#include <prsht.h>" )
+cpp_quote( "typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;" )
+cpp_quote( "#endif" )
+
+[
+    object,
+    uuid( 000214E9-0000-0000-C000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellPropSheetExt : IUnknown
+{
+    enum tagSHELLPROPSHEETEXTPAGEID
+    {
+        EXPPS_FILETYPES = 0x1
+    };
+
+    typedef UINT EXPPS;
+
+    HRESULT AddPages(
+        [ in ] LPFNSVADDPROPSHEETPAGE pfnAddPage,
+        [ in ] LPARAM lParam );
+    HRESULT ReplacePage(
+        [ in ] EXPPS uPageID,
+        [ in ] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
+        [ in ] LPARAM lParam );
+}
+typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
+
+/*****************************************************************************
+* IShellFolder interface
+*/
+[
+    object,
+    uuid( 000214e6-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellFolder : IUnknown
+{
+    typedef IShellFolder * LPSHELLFOLDER;
+
+    typedef enum tagSHGDN
+    {
+        SHGDN_NORMAL = 0,
+        SHGDN_INFOLDER = 1,
+        SHGDN_FOREDITING = 0x1000,
+        SHGDN_INCLUDE_NONFILESYS = 0x2000,
+        SHGDN_FORADDRESSBAR = 0x4000,
+        SHGDN_FORPARSING = 0x8000
+    } SHGNO;
+
+    typedef DWORD SHGDNF;
+
+    enum tagSHCONTF
+    {
+        SHCONTF_FOLDERS = 32,
+        SHCONTF_NONFOLDERS = 64,
+        SHCONTF_INCLUDEHIDDEN = 128,
+        SHCONTF_INIT_ON_FIRST_NEXT = 256,
+        SHCONTF_NETPRINTERSRCH = 512,
+        SHCONTF_SHAREABLE = 1024,
+        SHCONTF_STORAGE = 2048
+    };
+
+    typedef DWORD SHCONTF;
+
+    cpp_quote( "#define SHCIDS_ALLFIELDS        0x80000000L" )
+        cpp_quote( "#define SHCIDS_CANONICALONLY    0x10000000L" )
+        cpp_quote( "#define SHCIDS_BITMASK          0xFFFF0000L" )
+        cpp_quote( "#define SHCIDS_COLUMNMASK       0x0000FFFFL" )
+        cpp_quote( "#define SFGAO_CANCOPY           DROPEFFECT_COPY" )
+        cpp_quote( "#define SFGAO_CANMOVE           DROPEFFECT_MOVE" )
+        cpp_quote( "#define SFGAO_CANLINK           DROPEFFECT_LINK" )
+        cpp_quote( "#define SFGAO_STORAGE           0x00000008L" )
+        cpp_quote( "#define SFGAO_CANRENAME         0x00000010L" )
+        cpp_quote( "#define SFGAO_CANDELETE         0x00000020L" )
+        cpp_quote( "#define SFGAO_HASPROPSHEET      0x00000040L" )
+        cpp_quote( "#define SFGAO_DROPTARGET        0x00000100L" )
+        cpp_quote( "#define SFGAO_CAPABILITYMASK    0x00000177L" )
+        cpp_quote( "#define SFGAO_ENCRYPTED         0x00002000L" )
+        cpp_quote( "#define SFGAO_ISSLOW            0x00004000L" )
+        cpp_quote( "#define SFGAO_GHOSTED           0x00008000L" )
+        cpp_quote( "#define SFGAO_LINK              0x00010000L" )
+        cpp_quote( "#define SFGAO_SHARE             0x00020000L" )
+        cpp_quote( "#define SFGAO_READONLY          0x00040000L" )
+        cpp_quote( "#define SFGAO_HIDDEN            0x00080000L" )
+        cpp_quote( "#define SFGAO_DISPLAYATTRMASK   0x000FC000L" )
+        cpp_quote( "#define SFGAO_FILESYSANCESTOR   0x10000000L" )
+        cpp_quote( "#define SFGAO_FOLDER            0x20000000L" )
+        cpp_quote( "#define SFGAO_FILESYSTEM        0x40000000L" )
+        cpp_quote( "#define SFGAO_HASSUBFOLDER      0x80000000L" )
+        cpp_quote( "#define SFGAO_CONTENTSMASK      0x80000000L" )
+        cpp_quote( "#define SFGAO_VALIDATE          0x01000000L" )
+        cpp_quote( "#define SFGAO_REMOVABLE         0x02000000L" )
+        cpp_quote( "#define SFGAO_COMPRESSED        0x04000000L" )
+        cpp_quote( "#define SFGAO_BROWSABLE         0x08000000L" )
+        cpp_quote( "#define SFGAO_NONENUMERATED     0x00100000L" )
+        cpp_quote( "#define SFGAO_NEWCONTENT        0x00200000L" )
+        cpp_quote( "#define SFGAO_STREAM            0x00400000L" )
+        cpp_quote( "#define SFGAO_STORAGEANCESTOR   0x00800000L" )
+
+        typedef ULONG SFGAOF;
+
+    HRESULT ParseDisplayName(
+        [ in ] HWND hwndOwner,
+        [ in ] LPBC pbcReserved,
+        [ in, string ] LPOLESTR lpszDisplayName,
+        [ out ] ULONG *pchEaten,
+        [ out ] LPITEMIDLIST *ppidl,
+        [ in, out, unique ] ULONG *pdwAttributes );
+
+    HRESULT EnumObjects(
+        [ in ] HWND hwndOwner,
+        [ in ] SHCONTF grfFlags,
+        [ out ] IEnumIDList **ppenumIDList );
+
+    HRESULT BindToObject(
+        [ in ] LPCITEMIDLIST pidl,
+        [ in ] LPBC pbcReserved,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppvOut );
+
+    HRESULT BindToStorage(
+        [ in ] LPCITEMIDLIST pidl,
+        [ in ] LPBC pbcReserved,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppvObj );
+
+    HRESULT CompareIDs(
+        [ in ] LPARAM lParam,
+        [ in ] LPCITEMIDLIST pidl1,
+        [ in ] LPCITEMIDLIST pidl2 );
+
+    HRESULT CreateViewObject(
+        [ in ] HWND hwndOwner,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppvOut );
+
+    HRESULT GetAttributesOf(
+        [ in ] UINT cidl,
+        [ in, size_is( cidl ) ] LPCITEMIDLIST *apidl,
+        [ in, out ] SFGAOF *rgfInOut );
+
+    HRESULT GetUIObjectOf(
+        [ in ] HWND hwndOwner,
+        [ in ] UINT cidl,
+        [ in, size_is( cidl ) ] LPCITEMIDLIST *apidl,
+        [ in ] REFIID riid,
+        [ in, out, unique ] UINT *prgfInOut,
+        [ out, iid_is( riid ) ] void **ppvOut );
+
+    HRESULT GetDisplayNameOf(
+        [ in ] LPCITEMIDLIST pidl,
+        [ in ] SHGDNF uFlags,
+        [ out ] STRRET *lpName );
+
+    HRESULT SetNameOf(
+        [ in ] HWND hwnd,
+        [ in ] LPCITEMIDLIST pidl,
+        [ in, string ] LPCOLESTR lpszName,
+        [ in ] SHGDNF uFlags,
+        [ out ] LPITEMIDLIST *ppidlOut );
+}
+
+
+/*****************************************************************************
+* IEnumExtraSearch interface
+*/
+[
+    object,
+    uuid( 0e700be1-9db6-11d1-a1ce-00c04fd75d13 ),
+    pointer_default( unique )
+]
+interface IEnumExtraSearch : IUnknown
+{
+    typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
+
+    typedef struct
+    {
+        GUID guidSearch;
+        WCHAR wszFriendlyName[ 80 ];
+        /*
+        *WCHAR wszMenuText[80];
+        *WCHAR wszHelpText[MAX_PATH];
+        */
+        WCHAR wszUrl[ 2084 ];
+        /*
+        *WCHAR wszIcon[MAX_PATH+10];
+        *WCHAR wszGreyIcon[MAX_PATH+10];
+        *WCHAR wszClrIcon[MAX_PATH+10];
+        */
+    } EXTRASEARCH, *LPEXTRASEARCH;
+
+    HRESULT Next(
+        [ in ] ULONG celt,
+        [ out, size_is( celt ), length_is( *pceltFetched ) ] EXTRASEARCH *rgelt,
+        [ out ] ULONG *pceltFetched );
+
+    HRESULT Skip( [ in ] ULONG celt );
+    HRESULT Reset();
+    HRESULT Clone( [ out ] IEnumExtraSearch **ppenum );
+}
+
+
+/*****************************************************************************
+* IShellFolder2 interface
+*/
+[
+    object,
+    uuid( 93f2f68c-1d1b-11d3-a30e-00c04f79abd1 ),
+    pointer_default( unique )
+]
+interface IShellFolder2 : IShellFolder
+{
+    typedef struct
+    {
+        GUID    fmtid;
+        DWORD   pid;
+    } SHCOLUMNID, *LPSHCOLUMNID;
+    typedef const SHCOLUMNID *LPCSHCOLUMNID;
+
+    HRESULT GetDefaultSearchGUID( [ out ] GUID *lpguid );
+    HRESULT EnumSearches( [ out ] IEnumExtraSearch **ppenum );
+    HRESULT GetDefaultColumn( [ in ] DWORD dwReserved, [ out ] ULONG *pSort, [ out ] ULONG *pDisplay );
+    HRESULT GetDefaultColumnState( [ in ] UINT iColumn, [ out ] SHCOLSTATEF *pcsFlags );
+    HRESULT GetDetailsEx( [ in ] LPCITEMIDLIST pidl, [ in ] const SHCOLUMNID *pscid, [ out ] VARIANT *pv );
+    HRESULT GetDetailsOf( [ in ] LPCITEMIDLIST pidl, [ in ] UINT iColumn, [ out ] SHELLDETAILS *psd );
+    HRESULT MapColumnToSCID( [ in ] UINT iColumn, [ in ] SHCOLUMNID *pscid );
+}
+
+/*****************************************************************************
+* IShellItem interface
+*/
+[
+    object,
+    uuid( 43826d1e-e718-42ee-bc55-a1e261c37bfe ),
+    pointer_default( unique )
+]
+interface IShellItem : IUnknown
+{
+    typedef DWORD SIGDN;
+
+    typedef DWORD SICHINTF;
+
+    HRESULT BindToHandler(
+        [ in ] IBindCtx *pbc,
+        [ in ] REFGUID rbhid,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppvOut );
+
+    HRESULT GetParent( [ out ] IShellItem **ppsi );
+
+    HRESULT GetDisplayName(
+        [ in ] SIGDN sigdnName,
+        [ out ] LPWSTR *ppszName );
+
+    HRESULT GetAttributes(
+        [ in ] SFGAOF sfgaoMask,
+        [ out ] SFGAOF *psfgaoAttribs );
+
+    HRESULT Compare(
+        [ in ] IShellItem *psi,
+        [ in ] SICHINTF hint,
+        [ out ] int *piOrder );
+}
+
+/*****************************************************************************
+* FOLDERSETTINGS
+*/
+typedef char *LPVIEWSETTINGS;
+
+typedef enum
+{
+    FWF_AUTOARRANGE = 0x00000001,
+    FWF_ABBREVIATEDNAMES = 0x00000002,
+    FWF_SNAPTOGRID = 0x00000004,
+    FWF_OWNERDATA = 0x00000008,
+    FWF_BESTFITWINDOW = 0x00000010,
+    FWF_DESKTOP = 0x00000020,
+    FWF_SINGLESEL = 0x00000040,
+    FWF_NOSUBFOLDERS = 0x00000080,
+    FWF_TRANSPARENT = 0x00000100,
+    FWF_NOCLIENTEDGE = 0x00000200,
+    FWF_NOSCROLL = 0x00000400,
+    FWF_ALIGNLEFT = 0x00000800,
+    FWF_NOICONS = 0x00001000,
+    FWF_SHOWSELALWAYS = 0x00002000,
+    FWF_NOVISIBLE = 0x00004000,
+    FWF_SINGLECLICKACTIVATE = 0x00008000,
+    FWF_NOWEBVIEW = 0x00010000,
+    FWF_HIDEFILENAMES = 0x00020000,
+    FWF_CHECKSELECT = 0x00040000
+} FOLDERFLAGS;
+
+typedef enum
+{
+    FVM_ICON = 1,
+    FVM_FIRST = FVM_ICON,
+    FVM_SMALLICON = 2,
+    FVM_LIST = 3,
+    FVM_DETAILS = 4,
+    FVM_THUMBNAIL = 5,
+    FVM_TILE = 6,
+    FVM_THUMBSTRIP = 7,
+    FVM_LAST = FVM_THUMBSTRIP
+} FOLDERVIEWMODE;
+
+typedef struct
+{
+    UINT ViewMode;
+    UINT fFlags;
+} FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
+typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
+
+
+/*****************************************************************************
+* IShellView interface
+*/
+interface IShellBrowser;  /* forward declaration */
+[
+    object,
+    uuid( 000214e3-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellView : IOleWindow
+{
+    typedef IShellView *LPSHELLVIEW;
+
+    cpp_quote( "#define SVSI_DESELECT       0x00000000" )
+        cpp_quote( "#define SVSI_SELECT         0x00000001" )
+        cpp_quote( "#define SVSI_EDIT           0x00000003" )
+        cpp_quote( "#define SVSI_DESELECTOTHERS 0x00000004" )
+        cpp_quote( "#define SVSI_ENSUREVISIBLE  0x00000008" )
+        cpp_quote( "#define SVSI_FOCUSED        0x00000010" )
+        cpp_quote( "#define SVSI_TRANSLATEPT    0x00000020" )
+        cpp_quote( "#define SVSI_SELECTIONMARK  0x00000040" )
+        cpp_quote( "#define SVSI_POSITIONITEM   0x00000080" )
+        cpp_quote( "#define SVSI_CHECK          0x00000100" )
+        cpp_quote( "#define SVSI_NOSTATECHANGE  0x80000000" )
+
+        typedef UINT SVSIF;
+
+    typedef enum
+    {
+        SVGIO_BACKGROUND = 0x00000000,
+        SVGIO_SELECTION = 0x00000001,
+        SVGIO_ALLVIEW = 0x00000002,
+        SVGIO_CHECKED = 0x00000003,
+        SVGIO_TYPE_MASK = 0x0000000f,
+        SVGIO_FLAG_VIEWORDER = 0x80000000,
+    } SVGIO;
+
+    typedef enum
+    {
+        SVUIA_DEACTIVATE = 0,
+        SVUIA_ACTIVATE_NOFOCUS = 1,
+        SVUIA_ACTIVATE_FOCUS = 2,
+        SVUIA_INPLACEACTIVATE = 3
+    } SVUIA_STATUS;
+
+    HRESULT TranslateAccelerator( [ in ] MSG *pmsg );
+    HRESULT EnableModeless( [ in ] BOOL fEnable );
+    HRESULT UIActivate( [ in ] UINT uState );
+    HRESULT Refresh();
+    HRESULT CreateViewWindow(
+        [ in ] IShellView *psvPrevious,
+        [ in ] LPCFOLDERSETTINGS lpfs,
+        [ in ] IShellBrowser *psb,
+        [ out ] RECT *prcView,
+        [ out ] HWND *phWnd );
+
+    HRESULT DestroyViewWindow();
+    HRESULT GetCurrentInfo( [ out ] LPFOLDERSETTINGS lpfs );
+
+    [local] HRESULT AddPropertySheetPages(
+        [ in ] DWORD dwReserved,
+        [ in ] LPFNSVADDPROPSHEETPAGE pfn,
+        [ in ] LPARAM lparam );
+
+    HRESULT SaveViewState();
+    HRESULT SelectItem(
+        [ in ] LPCITEMIDLIST pidlItem,
+        [ in ] SVSIF uFlags );
+    HRESULT GetItemObject(
+        [ in ] UINT uItem,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppv );
+}
+
+
+[
+    uuid( 88E39E80-3578-11CF-AE69-08002B2E1262 ),
+    object,
+    pointer_default( unique )
+]
+interface IShellView2 : IShellView
+{
+    typedef GUID SHELLVIEWID;
+
+    cpp_quote( "#define SV2GV_CURRENTVIEW ((UINT)-1)" )
+        cpp_quote( "#define SV2GV_DEFAULTVIEW ((UINT)-2)" )
+
+        cpp_quote( "#include <pshpack8.h>" )
+        typedef struct _SV2CVW2_PARAMS
+    {
+        DWORD cbSize;
+
+        IShellView *psvPrev;
+        LPCFOLDERSETTINGS pfs;
+        IShellBrowser *psbOwner;
+        RECT *prcView;
+        SHELLVIEWID const *pvid;
+        HWND hwndView;
+
+    } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
+
+    cpp_quote( "#include <poppack.h>" )
+
+        HRESULT GetView(
+        [ in, out ] SHELLVIEWID* pvid,
+        [ in ] ULONG uView );
+
+    HRESULT CreateViewWindow2(
+        [ in ] LPSV2CVW2_PARAMS lpParams );
+
+    HRESULT HandleRename(
+        [ in, unique ] PCUITEMID_CHILD pidlNew );
+
+    HRESULT SelectAndPositionItem(
+        [ in ] PCUITEMID_CHILD pidlItem,
+        [ in ] UINT uFlags,
+        [ in, unique ] POINT *ppt );
+}
+
+
+[
+    uuid( ec39fa88-f8af-41c5-8421-38bed28f4673 ),
+    object,
+    pointer_default( unique )
+]
+interface IShellView3 : IShellView2
+{
+    enum tagSV3CVW3
+    {
+        SV3CVW3_DEFAULT = 0x00000000,
+        SV3CVW3_NONINTERACTIVE = 0x00000001,
+        SV3CVW3_FORCEVIEWMODE = 0x00000002,
+        SV3CVW3_FORCEFOLDERFLAGS = 0x00000004,
+    };
+    typedef DWORD SV3CVW3_FLAGS;
+
+    HRESULT CreateViewWindow3(
+        [ in ] IShellBrowser *psbOwner,
+        [ in, unique ] IShellView *psvPrev,
+        [ in ] SV3CVW3_FLAGS dwViewFlags,
+        [ in ] FOLDERFLAGS dwMask,
+        [ in ] FOLDERFLAGS dwFlags,
+        [ in ] FOLDERVIEWMODE fvMode,
+        [ in, unique ] const SHELLVIEWID *pvid,
+        [ in ] const RECT *prcView,
+        [ out ] HWND *phwndView );
+}
+
+
+/*****************************************************************************
+* IShellBrowser interface
+*/
+[
+    object,
+    uuid( 000214e2-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellBrowser : IOleWindow
+{
+    typedef IShellBrowser *LPSHELLBROWSER;
+
+    cpp_quote( "#define SBSP_DEFBROWSER            0x00000000" )
+        cpp_quote( "#define SBSP_SAMEBROWSER           0x00000001" )
+        cpp_quote( "#define SBSP_NEWBROWSER            0x00000002" )
+        cpp_quote( "#define SBSP_DEFMODE               0x00000000" )
+        cpp_quote( "#define SBSP_OPENMODE              0x00000010" )
+        cpp_quote( "#define SBSP_EXPLOREMODE           0x00000020" )
+        cpp_quote( "#define SBSP_HELPMODE              0x00000040" )
+        cpp_quote( "#define SBSP_NOTRANSFERHIST        0x00000080" )
+        cpp_quote( "#define SBSP_ABSOLUTE              0x00000000" )
+        cpp_quote( "#define SBSP_RELATIVE              0x00001000" )
+        cpp_quote( "#define SBSP_PARENT                0x00002000" )
+        cpp_quote( "#define SBSP_NAVIGATEBACK          0x00004000" )
+        cpp_quote( "#define SBSP_NAVIGATEFORWARD       0x00008000" )
+        cpp_quote( "#define SBSP_ALLOW_AUTONAVIGATE    0x00010000" )
+        cpp_quote( "#define SBSP_NOAUTOSELECT          0x04000000" )
+        cpp_quote( "#define SBSP_WRITENOHISTORY        0x08000000" )
+        cpp_quote( "#define SBSP_REDIRECT              0x40000000" )
+        cpp_quote( "#define SBSP_INITIATEDBYHLINKFRAME 0x80000000" )
+
+        cpp_quote( "#define FCW_STATUS      0x0001" )
+        cpp_quote( "#define FCW_TOOLBAR     0x0002" )
+        cpp_quote( "#define FCW_TREE        0x0003" )
+        cpp_quote( "#define FCW_INTERNETBAR 0x0006" )
+        cpp_quote( "#define FCW_PROGRESS    0x0008" )
+
+        cpp_quote( "#define FCT_MERGE       0x0001" )
+        cpp_quote( "#define FCT_CONFIGABLE  0x0002" )
+        cpp_quote( "#define FCT_ADDTOEND    0x0004" )
+
+        cpp_quote( "#if 0" )
+        typedef LPARAM LPTBBUTTONSB;
+    cpp_quote( "#else" )
+        cpp_quote( "#include <commctrl.h>" )
+        cpp_quote( "typedef LPTBBUTTON LPTBBUTTONSB;" )
+        cpp_quote( "#endif" )
+
+        HRESULT InsertMenusSB(
+        [ in ] HMENU hmenuShared,
+        [ in, out ] LPOLEMENUGROUPWIDTHS lpMenuWidths );
+
+    HRESULT SetMenuSB(
+        [ in ] HMENU hmenuShared,
+        [ in ] HOLEMENU holemenuReserved,
+        [ in ] HWND hwndActiveObject );
+
+    HRESULT RemoveMenusSB( [ in ] HMENU hmenuShared );
+    HRESULT SetStatusTextSB( [ in, unique ] LPCOLESTR pszStatusText );
+    HRESULT EnableModelessSB( [ in ] BOOL fEnable );
+    HRESULT TranslateAcceleratorSB( [ in ] MSG *pmsg, [ in ] WORD wID );
+
+    HRESULT BrowseObject(
+        [ in ] LPCITEMIDLIST pidl,
+        [ in ] UINT wFlags );
+
+    HRESULT GetViewStateStream(
+        [ in ] DWORD grfMode,
+        [ out ] IStream **ppStrm );
+
+    HRESULT GetControlWindow(
+        [ in ] UINT id,
+        [ out ] HWND *phwnd );
+
+    [local] HRESULT SendControlMsg(
+        [ in ] UINT id,
+        [ in ] UINT uMsg,
+        [ in ] WPARAM wParam,
+        [ in ] LPARAM lParam,
+        [ in ] LRESULT *pret );
+
+    HRESULT QueryActiveShellView( [ out ] IShellView **ppshv );
+    HRESULT OnViewWindowActive( [ in ] IShellView *pshv );
+
+    [local]
+    HRESULT SetToolbarItems(
+        [ in ] LPTBBUTTONSB lpButtons,
+        [ in ] UINT nButtons,
+        [ in ] UINT uFlags );
+}
+
+
+/*****************************************************************************
+* IShellLinkA interface
+*/
+[
+    object,
+    uuid( 000214ee-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellLinkA : IUnknown
+{
+    typedef enum
+    {
+        SLR_NO_UI = 0x0001,
+        SLR_ANY_MATCH = 0x0002,
+        SLR_UPDATE = 0x0004,
+        SLR_NOUPDATE = 0x0008,
+        SLR_NOSEARCH = 0x0010,
+        SLR_NOTRACK = 0x0020,
+        SLR_NOLINKINFO = 0x0040,
+        SLR_INVOKE_MSI = 0x0080,
+        SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
+    } SLR_FLAGS;
+
+    typedef enum
+    {
+        SLGP_SHORTPATH = 0x0001,
+        SLGP_UNCPRIORITY = 0x0002,
+        SLGP_RAWPATH = 0x0004,
+    } SLGP_FLAGS;
+
+    HRESULT GetPath(
+        [ out, size_is( cch ) ] LPSTR pszFile,
+        [ in ] int cch,
+        [ in, out ] WIN32_FIND_DATAA *pfd,
+        [ in ] DWORD fFlags );
+
+    HRESULT GetIDList( [ out ] LPITEMIDLIST * ppidl );
+
+    HRESULT SetIDList( [ in ] LPCITEMIDLIST pidl );
+
+    HRESULT GetDescription(
+        [ out, size_is( cch ) ] LPSTR pszName,
+        [ in ] int cch );
+
+    HRESULT SetDescription( [ in ] LPCSTR pszName );
+
+    HRESULT GetWorkingDirectory(
+        [ out, size_is( cch ) ] LPSTR pszDir,
+        [ in ] int cch );
+
+    HRESULT SetWorkingDirectory( [ in ] LPCSTR pszDir );
+
+    HRESULT GetArguments(
+        [ out, size_is( cch ) ] LPSTR pszArgs,
+        [ in ] int cch );
+
+    HRESULT SetArguments( [ in ] LPCSTR pszArgs );
+
+    HRESULT GetHotkey( [ out ] WORD *pwHotkey );
+
+    HRESULT SetHotkey( [ in ] WORD wHotkey );
+
+    HRESULT GetShowCmd( [ out ] int *piShowCmd );
+
+    HRESULT SetShowCmd( [ in ] int iShowCmd );
+
+    HRESULT GetIconLocation(
+        [ out, size_is( cch ) ] LPSTR pszIconPath,
+        [ in ] int cch,
+        [ out ] int *piIcon );
+
+    HRESULT SetIconLocation(
+        [ in ] LPCSTR pszIconPath,
+        [ in ] int iIcon );
+
+    HRESULT SetRelativePath(
+        [ in ] LPCSTR pszPathRel,
+        [ in ] DWORD dwReserved );
+
+    HRESULT Resolve(
+        [ in ] HWND hwnd,
+        [ in ] DWORD fFlags );
+
+    HRESULT SetPath( [ in ] LPCSTR pszFile );
+}
+
+
+/*****************************************************************************
+* IShellLinkW interface
+*/
+[
+    object,
+    uuid( 000214f9-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IShellLinkW : IUnknown
+{
+    HRESULT GetPath(
+        [ out, size_is( cch ) ] LPWSTR pszFile,
+        [ in ] int cch,
+        [ in, out ] WIN32_FIND_DATAW *pfd,
+        [ in ] DWORD fFlags );
+
+    HRESULT GetIDList( [ out ] LPITEMIDLIST * ppidl );
+
+    HRESULT SetIDList( [ in ] LPCITEMIDLIST pidl );
+
+    HRESULT GetDescription(
+        [ out, size_is( cch ) ] LPWSTR pszName,
+        [ in ] int cch );
+
+    HRESULT SetDescription( [ in ] LPCWSTR pszName );
+
+    HRESULT GetWorkingDirectory(
+        [ out, size_is( cch ) ] LPWSTR pszDir,
+        [ in ] int cch );
+
+    HRESULT SetWorkingDirectory( [ in ] LPCWSTR pszDir );
+
+    HRESULT GetArguments(
+        [ out, size_is( cch ) ] LPWSTR pszArgs,
+        [ in ] int cch );
+
+    HRESULT SetArguments( [ in ] LPCWSTR pszArgs );
+
+    HRESULT GetHotkey( [ out ] WORD *pwHotkey );
+
+    HRESULT SetHotkey( [ in ] WORD wHotkey );
+
+    HRESULT GetShowCmd( [ out ] int *piShowCmd );
+
+    HRESULT SetShowCmd( [ in ] int iShowCmd );
+
+    HRESULT GetIconLocation(
+        [ out, size_is( cch ) ] LPWSTR pszIconPath,
+        [ in ] int cch,
+        [ out ] int *piIcon );
+
+    HRESULT SetIconLocation(
+        [ in ] LPCWSTR pszIconPath,
+        [ in ] int iIcon );
+
+    HRESULT SetRelativePath(
+        [ in ] LPCWSTR pszPathRel,
+        [ in ] DWORD dwReserved );
+
+    HRESULT Resolve(
+        [ in ] HWND hwnd,
+        [ in ] DWORD fFlags );
+
+    HRESULT SetPath( [ in ] LPCWSTR pszFile );
+}
+
+cpp_quote( "#define IShellLink WINELIB_NAME_AW(IShellLink)" )
+
+
+/*****************************************************************************
+* IShellExtInit interface
+*/
+[
+    object,
+    uuid( 000214e8-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface IShellExtInit : IUnknown
+{
+    typedef IShellExtInit *LPSHELLEXTINIT;
+
+    HRESULT Initialize(
+        [ in ] LPCITEMIDLIST pidlFolder,
+        [ in ] IDataObject *pdtobj,
+        [ in ] HKEY hkeyProgID );
+}
+
+
+/*******************************************************************************/
+/* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
+/* are declared directly in shlobj.h. It hopefully won't break anything to put */
+/* them here anyway.                                                           */
+/*******************************************************************************/
+
+#ifndef MAX_PATH
+#define MAX_PATH 260
+#endif
+
+
+/*****************************************************************************
+* IPersistFolder3 interface
+*/
+[
+    object,
+    uuid( cef04fdf-fe72-11d2-87a5-00c04f6837cf ),
+    pointer_default( unique )
+]
+interface IPersistFolder3 : IPersistFolder2
+{
+    typedef struct
+    {
+        LPITEMIDLIST    pidlTargetFolder;
+        WCHAR           szTargetParsingName[ MAX_PATH ];
+        WCHAR           szNetworkProvider[ MAX_PATH ];
+        DWORD           dwAttributes;
+        int             csidl;
+    } PERSIST_FOLDER_TARGET_INFO;
+
+    HRESULT InitializeEx(
+        [ in ] IBindCtx *pbc,
+        [ in ] LPCITEMIDLIST pidlRoot,
+        [ in ] const PERSIST_FOLDER_TARGET_INFO *ppfti );
+
+    HRESULT GetFolderTargetInfo( [ out ] PERSIST_FOLDER_TARGET_INFO *ppfti );
+}
+
+
+/*****************************************************************************
+* IExtractIconA interface
+*/
+[
+    object,
+    uuid( 000214eb-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IExtractIconA : IUnknown
+{
+    cpp_quote( "#define GIL_OPENICON     0x0001" )
+        cpp_quote( "#define GIL_FORSHELL     0x0002" )
+        cpp_quote( "#define GIL_ASYNC        0x0020" )
+        cpp_quote( "#define GIL_DEFAULTICON  0x0040" )
+        cpp_quote( "#define GIL_FORSHORTCUT  0x0080" )
+
+        cpp_quote( "#define GIL_SIMULATEDOC  0x0001" )
+        cpp_quote( "#define GIL_PERINSTANCE  0x0002" )
+        cpp_quote( "#define GIL_PERCLASS     0x0004" )
+        cpp_quote( "#define GIL_NOTFILENAME  0x0008" )
+        cpp_quote( "#define GIL_DONTCACHE    0x0010" )
+
+        typedef IExtractIconA *LPEXTRACTICONA;
+
+    HRESULT GetIconLocation(
+        [ in ] UINT uFlags,
+        [ out, size_is( cchMax ) ] LPSTR szIconFile,
+        [ in ] UINT cchMax,
+        [ out ] INT *piIndex,
+        [ out ] UINT *pwFlags );
+
+    HRESULT Extract(
+        [ in ] LPCSTR pszFile,
+        [ in ] UINT nIconIndex,
+        [ out ] HICON *phiconLarge,
+        [ out ] HICON *phiconSmall,
+        [ in ] UINT nIconSize );
+}
+
+
+/*****************************************************************************
+* IExtractIconW interface
+*/
+[
+    object,
+    uuid( 000214fa-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IExtractIconW : IUnknown
+{
+    typedef IExtractIconW *LPEXTRACTICONW;
+
+    HRESULT GetIconLocation(
+        [ in ] UINT uFlags,
+        [ out, size_is( cchMax ) ] LPWSTR szIconFile,
+        [ in ] UINT cchMax,
+        [ out ] INT *piIndex,
+        [ out ] UINT *pwFlags );
+
+    HRESULT Extract(
+        [ in ] LPCWSTR pszFile,
+        [ in ] UINT nIconIndex,
+        [ out ] HICON *phiconLarge,
+        [ out ] HICON *phiconSmall,
+        [ in ] UINT nIconSize );
+}
+
+cpp_quote( "#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)" )
+cpp_quote( "#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)" )
+
+
+/*****************************************************************************
+* ICommDlgBrowser interface
+*/
+[
+    object,
+    uuid( 000214f1-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface ICommDlgBrowser : IUnknown
+{
+    cpp_quote( "#define CDBOSC_SETFOCUS     0x00000000" )
+        cpp_quote( "#define CDBOSC_KILLFOCUS    0x00000001" )
+        cpp_quote( "#define CDBOSC_SELCHANGE    0x00000002" )
+        cpp_quote( "#define CDBOSC_RENAME       0x00000003" )
+        cpp_quote( "#define CDBOSC_STATECHANGE  0x00000004" )
+
+        typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
+
+    HRESULT OnDefaultCommand( [ in ] IShellView *shv );
+    HRESULT OnStateChange( [ in ] IShellView *shv, [ in ] ULONG uChange );
+    HRESULT IncludeObject( [ in ] IShellView *shv, [ in ] LPCITEMIDLIST pidl );
+}
+
+
+/*****************************************************************************
+* IDockingWindowFrame interface
+*/
+[
+    object,
+    uuid( 47d2657a-7b27-11d0-8ca9-00a0c92dbfe8 ),
+    pointer_default( unique ),
+    local
+]
+interface IDockingWindowFrame : IOleWindow
+{
+    cpp_quote( "#define DWFRF_NORMAL           0x0000" )
+        cpp_quote( "#define DWFRF_DELETECONFIGDATA 0x0001" )
+        cpp_quote( "#define DWFAF_HIDDEN           0x0001" )
+
+        HRESULT AddToolbar(
+        [ in ] IUnknown *punkSrc,
+        [ in ] LPCWSTR pwszItem,
+        [ in ] DWORD dwAddFlags );
+
+    HRESULT RemoveToolbar(
+        [ in ] IUnknown *punkSrc,
+        [ in ] DWORD dwRemoveFlags );
+
+    HRESULT FindToolbar(
+        [ in ] LPCWSTR pwszItem,
+        [ in ] REFIID riid,
+        [ out ] LPVOID *ppvObj );
+}
+
+
+/*****************************************************************************
+* IDragSourceHelper interface
+*/
+[
+    object,
+    uuid( de5bf786-477a-11d2-839d-00c04fd918d0 ),
+    pointer_default( unique )
+]
+interface IDragSourceHelper : IUnknown
+{
+    typedef struct
+    {
+        SIZE     sizeDragImage;
+        POINT    ptOffset;
+        HBITMAP  hbmpDragImage;
+        COLORREF crColorKey;
+    } SHDRAGIMAGE, *LPSHDRAGIMAGE;
+
+    HRESULT InitializeFromBitmap(
+        [ in ] LPSHDRAGIMAGE pshdi,
+        [ in ] IDataObject *pDataObject );
+
+    HRESULT InitializeFromWindow(
+        [ in ] HWND hwnd,
+        [ in ] POINT *ppt,
+        [ in ] IDataObject *pDataObject );
+}
+
+
+/*****************************************************************************
+* IDropTargetHelper interface
+*/
+[
+    object,
+    uuid( 4657278b-411b-11d2-839a-00c04fd918d0 ),
+    pointer_default( unique )
+]
+interface IDropTargetHelper : IUnknown
+{
+    HRESULT DragEnter(
+        [ in ] HWND hwndTarget,
+        [ in ] IDataObject *pDataObject,
+        [ in ] POINT *ppt,
+        [ in ] DWORD dwEffect );
+
+    HRESULT DragLeave();
+
+    HRESULT DragOver(
+        [ in ] POINT *ppt,
+        [ in ] DWORD dwEffect );
+
+    HRESULT Drop(
+        [ in ] IDataObject *pDataObject,
+        [ in ] POINT *ppt,
+        [ in ] DWORD dwEffect );
+
+    HRESULT Show( [ in ] BOOL fShow );
+}
+
+
+/*****************************************************************************
+* IContextMenu interface
+*/
+[
+    object,
+    uuid( 000214e4-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface IContextMenu : IUnknown
+{
+    cpp_quote( "#define CMF_NORMAL        0x00000000" )
+        cpp_quote( "#define CMF_DEFAULTONLY   0x00000001" )
+        cpp_quote( "#define CMF_VERBSONLY     0x00000002" )
+        cpp_quote( "#define CMF_EXPLORE       0x00000004" )
+        cpp_quote( "#define CMF_NOVERBS       0x00000008" )
+        cpp_quote( "#define CMF_CANRENAME     0x00000010" )
+        cpp_quote( "#define CMF_NODEFAULT     0x00000020" )
+        cpp_quote( "#define CMF_INCLUDESTATIC 0x00000040" )
+        cpp_quote( "#define CMF_EXTENDEDVERBS 0x00000100" )
+        cpp_quote( "#define CMF_RESERVED      0xffff0000" )
+
+        cpp_quote( "#define GCS_VERBA         0x00000000" )
+        cpp_quote( "#define GCS_HELPTEXTA     0x00000001" )
+        cpp_quote( "#define GCS_VALIDATEA     0x00000002" )
+        cpp_quote( "#define GCS_VERBW         0x00000004" )
+        cpp_quote( "#define GCS_HELPTEXTW     0x00000005" )
+        cpp_quote( "#define GCS_VALIDATEW     0x00000006" )
+        cpp_quote( "#define GCS_UNICODE       0x00000004" )
+        cpp_quote( "#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)" )
+        cpp_quote( "#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)" )
+        cpp_quote( "#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)" )
+
+        cpp_quote( "#define CMDSTR_NEWFOLDERA   \"NewFolder\"" )
+        cpp_quote( "#define CMDSTR_VIEWLISTA    \"ViewList\"" )
+        cpp_quote( "#define CMDSTR_VIEWDETAILSA \"ViewDetails\"" )
+        cpp_quote( "#if defined(__GNUC__)" )
+        cpp_quote( "# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }" )
+        cpp_quote( "# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }" )
+        cpp_quote( "# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }" )
+        cpp_quote( "#elif defined(_MSC_VER)" )
+        cpp_quote( "# define CMDSTR_NEWFOLDERW   L\"NewFolder\"" )
+        cpp_quote( "# define CMDSTR_VIEWLISTW    L\"ViewList\"" )
+        cpp_quote( "# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"" )
+        cpp_quote( "#else" )
+        cpp_quote( "static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};" )
+        cpp_quote( "static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};" )
+        cpp_quote( "static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};" )
+        cpp_quote( "#endif" )
+        cpp_quote( "#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)" )
+        cpp_quote( "#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)" )
+        cpp_quote( "#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)" )
+
+        cpp_quote( "#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY" )
+        cpp_quote( "#define CMIC_MASK_ICON           SEE_MASK_ICON" )
+        cpp_quote( "#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI" )
+        cpp_quote( "#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE" )
+        cpp_quote( "#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE" )
+        cpp_quote( "#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME" )
+        cpp_quote( "#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM" )
+        cpp_quote( "#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE" )
+        cpp_quote( "#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK" )
+        cpp_quote( "#define CMIC_MASK_SHIFT_DOWN     0x10000000" )
+        cpp_quote( "#define CMIC_MASK_PTINVOKE       0x20000000" )
+        cpp_quote( "#define CMIC_MASK_CONTROL_DOWN   0x40000000" )
+        cpp_quote( "#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE" )
+        cpp_quote( "#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS" )
+
+        typedef IContextMenu *LPCONTEXTMENU;
+
+    typedef struct tagCMINVOKECOMMANDINFO
+    {
+        DWORD cbSize;
+        DWORD fMask;
+        HWND hwnd;
+        LPCSTR lpVerb;
+        LPCSTR lpParameters;
+        LPCSTR lpDirectory;
+        INT nShow;
+        DWORD dwHotKey;
+        HANDLE hIcon;
+    } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
+
+    typedef struct tagCMInvokeCommandInfoEx
+    {
+        DWORD cbSize;
+        DWORD fMask;
+        HWND hwnd;
+        LPCSTR lpVerb;
+        LPCSTR lpParameters;
+        LPCSTR lpDirectory;
+        INT nShow;
+        DWORD dwHotKey;
+        HANDLE hIcon;
+        LPCSTR lpTitle;
+        LPCWSTR lpVerbW;
+        LPCWSTR lpParametersW;
+        LPCWSTR lpDirectoryW;
+        LPCWSTR lpTitleW;
+        POINT ptInvoke;
+    } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
+
+    HRESULT QueryContextMenu(
+        [ in ] HMENU hmenu,
+        [ in ] UINT indexMenu,
+        [ in ] UINT idCmdFirst,
+        [ in ] UINT idCmdLast,
+        [ in ] UINT uFlags );
+
+    HRESULT InvokeCommand( [ in ] LPCMINVOKECOMMANDINFO lpici );
+
+    HRESULT GetCommandString(
+        [ in ] UINT_PTR idCmd,
+        [ in ] UINT uType,
+        [ out ] UINT *pwReserved,
+        [ out, size_is( cchMax ) ] LPSTR pszName,
+        [ in ] UINT cchMax );
+}
+
+
+/*****************************************************************************
+* IContextMenu2 interface
+*/
+[
+    object,
+    uuid( 000214f4-0000-0000-c000-000000000046 ),
+    pointer_default( unique )
+]
+interface IContextMenu2 : IContextMenu
+{
+    typedef IContextMenu2 *LPCONTEXTMENU2;
+
+    HRESULT HandleMenuMsg(
+        [ in ] UINT uMsg,
+        [ in ] WPARAM wParam,
+        [ in ] LPARAM lParam );
+}
+
+
+/*****************************************************************************
+* IContextMenu3 interface
+*/
+[
+    object,
+    uuid( bcfce0a0-ec17-11d0-8d10-00a0c90f2719 ),
+    pointer_default( unique )
+]
+interface IContextMenu3 : IContextMenu2
+{
+    typedef IContextMenu3 *LPCONTEXTMENU3;
+
+    HRESULT HandleMenuMsg2(
+        [ in ] UINT uMsg,
+        [ in ] WPARAM wParam,
+        [ in ] LPARAM lParam,
+        [ out ] LRESULT *plResult );
+}
+
+
+/*****************************************************************************
+* IShellExecuteHookA interface
+*/
+[
+    object,
+    uuid( 000214f5-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface IShellExecuteHookA : IUnknown
+{
+    cpp_quote( "struct _SHELLEXECUTEINFOA;" )
+        HRESULT Execute(
+        [ in, out ] struct _SHELLEXECUTEINFOA* pei );
+}
+
+
+/*****************************************************************************
+* IShellExecuteHookW interface
+*/
+[
+    object,
+    uuid( 000214fb-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface IShellExecuteHookW : IUnknown
+{
+    cpp_quote( "struct _SHELLEXECUTEINFOW;" )
+        HRESULT Execute(
+        [ in, out ] struct _SHELLEXECUTEINFOW* pei );
+}
+
+/*****************************************************************************
+* IShellLinkDataList interface
+*/
+[
+    object,
+    uuid( 45e2b4ae-b1c3-11d0-b92f-00a0c90312e1 ),
+    pointer_default( unique )
+]
+interface IShellLinkDataList : IUnknown
+{
+    [local] HRESULT AddDataBlock(
+        [ in ] void *pDataBlock );
+    [local] HRESULT CopyDataBlock(
+        [ in ] DWORD dwSig,
+        [ out ] void **ppDataBlock );
+    HRESULT RemoveDataBlock(
+        [ in ] DWORD dwSig );
+    HRESULT GetFlags(
+        [ out ] DWORD *pdwFlags );
+    HRESULT SetFlags(
+        [ in ] DWORD dwFlags );
+}
+
+
+/*****************************************************************************
+* IResolveShellLink interface
+*/
+[
+    object,
+    uuid( 5cd52983-9449-11d2-963a-00c04f79adf0 ),
+    pointer_default( unique )
+]
+interface IResolveShellLink : IUnknown
+{
+    HRESULT ResolveShellLink(
+        [ in ] IUnknown *punk,
+        [ in ] HWND hwnd,
+        [ in ] DWORD fFlags );
+}
+
+
+/*****************************************************************************
+* IURLSearchHook interface
+*/
+[
+    object,
+    uuid( ac60f6a0-0fd9-11d0-99cb-00c04fd64497 ),
+    pointer_default( unique ),
+    local
+]
+interface IURLSearchHook : IUnknown
+{
+    HRESULT Translate(
+        [ in, out ] LPWSTR lpwszSearchURL,
+        [ in ] DWORD cchBufferSize );
+}
+
+
+/*****************************************************************************
+* ISearchContext interface
+*/
+[
+    object,
+    uuid( 09f656a2-41af-480c-88f7-16cc0d164615 ),
+    pointer_default( unique )
+]
+interface ISearchContext : IUnknown
+{
+    HRESULT GetSearchUrl(
+        [ in ] BSTR *pbstrSearchUrl );
+    HRESULT GetSearchText(
+        [ in ] BSTR *pbstrSearchText );
+    HRESULT GetSearchStyle(
+        [ in ] BSTR *pdwSearchStyle );
+}
+
+
+/*****************************************************************************
+* IURLSearchHook2 interface
+*/
+[
+    object,
+    uuid( 5ee44da4-6d32-46e3-86bc-07540dedd0e0 ),
+    pointer_default( unique ),
+    local
+]
+interface IURLSearchHook2 : IURLSearchHook
+{
+    HRESULT TranslateWithSearchContext(
+        [ in, out ] LPWSTR lpwszSearchURL,
+        [ in ] DWORD cchBufferSize,
+        [ in ] ISearchContext *pSearchContext );
+}
+
+
+cpp_quote( "#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)" )
+
+/*****************************************************************************
+* INewShortcutHookA interface
+*/
+[
+    object,
+    uuid( 000214e1-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface INewShortcutHookA : IUnknown
+{
+    HRESULT SetReferent(
+        [ in ] LPCSTR pcszReferent,
+        [ in ] HWND hwnd );
+    HRESULT GetReferent(
+        [ out ] LPCSTR pcszReferent,
+        [ in ] int cchReferent );
+    HRESULT SetFolder(
+        [ in ] LPCSTR pcszReferent );
+    HRESULT GetFolder(
+        [ out ] LPSTR pcszReferent,
+        [ in ] int cchFolder );
+    HRESULT GetName(
+        [ out ] LPSTR pszName,
+        [ in ] int cchName );
+    HRESULT GetExtension(
+        [ out ] LPSTR pszExtension,
+        [ in ] int cchExtension );
+}
+
+
+/*****************************************************************************
+* INewShortcutHookW interface
+*/
+[
+    object,
+    uuid( 000214f7-0000-0000-c000-000000000046 ),
+    pointer_default( unique ),
+    local
+]
+interface INewShortcutHookW : IUnknown
+{
+    HRESULT SetReferent(
+        [ in ] LPCWSTR pcszReferent,
+        [ in ] HWND hwnd );
+    HRESULT GetReferent(
+        [ out ] LPCWSTR pcszReferent,
+        [ in ] int cchReferent );
+    HRESULT SetFolder(
+        [ in ] LPCWSTR pcszReferent );
+    HRESULT GetFolder(
+        [ out ] LPWSTR pcszReferent,
+        [ in ] int cchFolder );
+    HRESULT GetName(
+        [ out ] LPWSTR pszName,
+        [ in ] int cchName );
+    HRESULT GetExtension(
+        [ out ] LPWSTR pszExtension,
+        [ in ] int cchExtension );
+}
+
+/*****************************************************************************
+* IRunnableTask interface
+*/
+[
+    object,
+    uuid( 85788d00-6807-11d0-b810-00c04fd706ec ),
+    pointer_default( unique )
+]
+interface IRunnableTask : IUnknown
+{
+    HRESULT Run();
+    HRESULT Kill( [ in ] BOOL fWait );
+    HRESULT Suspend();
+    HRESULT Resume();
+    ULONG IsRunning();
+}
+
+/*****************************************************************************
+* IShellChangeNotify interface
+*/
+[
+    object,
+    uuid( d82be2b1-5764-11d0-a96e-00c04fd705a2 ),
+    pointer_default( unique )
+]
+interface IShellChangeNotify : IUnknown
+{
+    HRESULT OnChange(
+        [ in ] LONG lEvent,
+        [ in ] LPCITEMIDLIST pidl1,
+        [ in ] LPCITEMIDLIST pidl2 );
+}
+
+/*****************************************************************************
+* IFileSystemBindData interface
+*/
+[
+    object,
+    uuid( 01e18d10-4d8b-11d2-855d-006008059367 ),
+    pointer_default( unique )
+]
+interface IFileSystemBindData : IUnknown
+{
+    HRESULT SetFindData(
+        [ in ] const WIN32_FIND_DATAW *pfd );
+    HRESULT GetFindData(
+        [ out ] WIN32_FIND_DATAW *pfd );
+}
+
+/*****************************************************************************
+*    ITaskbarList interface
+*/
+[
+    object,
+    uuid( 56FDF342-FD6D-11d0-958A-006097C9A090 ),
+    pointer_default( unique )
+]
+interface ITaskbarList : IUnknown
+{
+    HRESULT HrInit();
+
+    HRESULT AddTab(
+        [ in ] HWND hwnd );
+
+    HRESULT DeleteTab(
+        [ in ] HWND hwnd );
+
+    HRESULT ActivateTab(
+        [ in ] HWND hwnd );
+
+    HRESULT SetActiveAlt(
+        [ in ] HWND hwnd );
+}
+
+cpp_quote( "EXTERN_C const CLSID CLSID_TaskbarList;" )
+
+/*****************************************************************************
+* IContextMenuCB interface
+*/
+
+[
+    object,
+    uuid( 3409e930-5a39-11d1-83fa-00a0c90dc849 ),
+    pointer_default( unique )
+]
+interface IContextMenuCB : IUnknown
+{
+    HRESULT CallBack(
+        [ in ] IShellFolder *psf,
+        [ in ] HWND hwndOwner,
+        [ in ] IDataObject *pdtobj,
+        [ in ] UINT uMsg,
+        [ in ] WPARAM wParam,
+        [ in ] LPARAM lParam );
+}
+
+/*****************************************************************************
+* IDefaultExtractIconInit interface
+*/
+
+[
+    object,
+    uuid( 800AB0B8-F5FA-4e72-8FF3-B1A243B87BD9 ), /* FIXME: wrong value! */
+    pointer_default( unique ),
+    local
+]
+interface IDefaultExtractIconInit : IUnknown
+{
+    HRESULT SetDefaultIcon(
+        [ in ] LPCWSTR pszFile,
+        [ in ] int iIcon );
+    HRESULT SetFlags(
+        [ in ] UINT uFlags );
+    HRESULT SetKey(
+        [ in ] HKEY hkey );
+    HRESULT SetNormalIcon(
+        [ in ] LPCWSTR pszFile,
+        [ in ] int iIcon );
+    HRESULT SetOpenIcon(
+        [ in ] LPCWSTR pszFile,
+        [ in ] int iIcon );
+    HRESULT SetShortcutIcon(
+        [ in ] LPCWSTR pszFile,
+        [ in ] int iIcon );
+}
+
+
+/*****************************************************************************
+* IDockingWindow interface
+*/
+[
+    uuid( 012dd920-7b26-11d0-8ca9-00a0c92dbfe8 ),
+    object
+]
+interface IDockingWindow : IOleWindow
+{
+    HRESULT ShowDW( [ in ] BOOL fShow );
+
+    HRESULT CloseDW( [ in ] DWORD dwReserved );
+
+    HRESULT ResizeBorderDW(
+        [ in ] LPCRECT prcBorder,
+        [ in ] IUnknown* punkToolbarSite,
+        [ in ] BOOL fReserved );
+}
+
+
+/*****************************************************************************
+* IDeskBand interface
+*/
+cpp_quote( "#define DBIM_MINSIZE    0x0001" )
+cpp_quote( "#define DBIM_MAXSIZE    0x0002" )
+cpp_quote( "#define DBIM_INTEGRAL   0x0004" )
+cpp_quote( "#define DBIM_ACTUAL     0x0008" )
+cpp_quote( "#define DBIM_TITLE      0x0010" )
+cpp_quote( "#define DBIM_MODEFLAGS  0x0020" )
+cpp_quote( "#define DBIM_BKCOLOR    0x0040" )
+
+cpp_quote( "#include <pshpack8.h>" )
+
+typedef struct tagDESKBANDINFO
+{
+    DWORD       dwMask;
+    POINTL      ptMinSize;
+    POINTL      ptMaxSize;
+    POINTL      ptIntegral;
+    POINTL      ptActual;
+    WCHAR       wszTitle[ 256 ];
+    DWORD       dwModeFlags;
+    COLORREF    crBkgnd;
+} DESKBANDINFO;
+
+cpp_quote( "#include <poppack.h>" )
+
+cpp_quote( "#define DBIMF_NORMAL            0x0000" )
+cpp_quote( "#define DBIMF_FIXED             0x0001" )
+cpp_quote( "#define DBIMF_FIXEDBMP          0x0004   // a fixed background bitmap (if supported)" )
+cpp_quote( "#define DBIMF_VARIABLEHEIGHT    0x0008" )
+cpp_quote( "#define DBIMF_UNDELETEABLE      0x0010" )
+cpp_quote( "#define DBIMF_DEBOSSED          0x0020" )
+cpp_quote( "#define DBIMF_BKCOLOR           0x0040" )
+cpp_quote( "#define DBIMF_USECHEVRON        0x0080" )
+cpp_quote( "#define DBIMF_BREAK             0x0100" )
+cpp_quote( "#define DBIMF_ADDTOFRONT        0x0200" )
+cpp_quote( "#define DBIMF_TOPALIGN          0x0400" )
+cpp_quote( "#if (NTDDI_VERSION >= NTDDI_LONGHORN)" )
+cpp_quote( "#define DBIMF_NOGRIPPER         0x0800" )
+cpp_quote( "#define DBIMF_ALWAYSGRIPPER     0x1000" )
+cpp_quote( "#define DBIMF_NOMARGINS         0x2000" )
+cpp_quote( "#endif  // NTDDI_LONGHORN" )
+
+cpp_quote( "#define DBIF_VIEWMODE_NORMAL         0x0000" )
+cpp_quote( "#define DBIF_VIEWMODE_VERTICAL       0x0001" )
+cpp_quote( "#define DBIF_VIEWMODE_FLOATING       0x0002" )
+cpp_quote( "#define DBIF_VIEWMODE_TRANSPARENT    0x0004" )
+
+enum tagDESKBANDCID
+{
+    DBID_BANDINFOCHANGED = 0,
+    DBID_SHOWONLY = 1,
+    DBID_MAXIMIZEBAND = 2,
+    DBID_PUSHCHEVRON = 3,
+    DBID_DELAYINIT = 4,
+    DBID_FINISHINIT = 5,
+    DBID_SETWINDOWTHEME = 6,
+    DBID_PERMITAUTOHIDE = 7,
+};
+
+cpp_quote( "#define DBPC_SELECTFIRST    (DWORD)-1" )
+cpp_quote( "#define DBPC_SELECTLAST     (DWORD)-2" )
+
+cpp_quote( "#define CGID_DeskBand IID_IDeskBand" )
+
+[
+    uuid( EB0FE172-1A3A-11D0-89B3-00A0C90A90AC ),
+    object,
+]
+interface IDeskBand : IDockingWindow
+{
+    HRESULT GetBandInfo(
+        [ in ] DWORD dwBandID,
+        [ in ] DWORD dwViewMode,
+        [ in, out ] DESKBANDINFO* pdbi );
+}
+
+cpp_quote( "#if (NTDDI_VERSION >= NTDDI_LONGHORN)" )
+
+/*****************************************************************************
+* IDeskBandInfo interface
+*/
+[
+    uuid( 77E425FC-CBF9-4307-BA6A-BB5727745661 ),
+    object,
+]
+interface IDeskBandInfo : IUnknown
+{
+    HRESULT GetDefaultBandWidth(
+        [ in ] DWORD dwBandID,
+        [ in ] DWORD dwViewMode,
+        [ out ] int *pnWidth );
+}
+
+
+/*****************************************************************************
+* IDeskBand2 interface
+*/
+[
+    uuid( 79D16DE4-ABEE-4021-8D9D-9169B261D657 ),
+    object,
+]
+interface IDeskBand2 : IDeskBand
+{
+    HRESULT CanRenderComposited( [ out ] BOOL *pfCanRenderComposited );
+
+    HRESULT SetCompositionState( [ in ] BOOL fCompositionEnabled );
+
+    HRESULT GetCompositionState( [ out ] BOOL *pfCompositionEnabled );
+}
+
+cpp_quote( "#endif  // NTDDI_LONGHORN" )
+
+
+
+cpp_quote( "#if (_WIN32_IE >= _WIN32_IE_IE60)" )
+
+[
+    uuid( EB0FE173-1A3A-11D0-89B3-00A0C90A90AC ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IDeskBar : IOleWindow
+{
+    HRESULT SetClient( [ in ] IUnknown* punkClient );
+
+    HRESULT GetClient( [ out ] IUnknown** ppunkClient );
+
+    HRESULT OnPosRectChangeDB( [ in ] RECT *prc );
+}
+
+
+/*****************************************************************************
+* IMenuPopup interface
+*/
+[
+    uuid( D1E7AFEB-6A2E-11d0-8C78-00C04FD918B4 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IMenuPopup : IDeskBar
+{
+    enum tagMENUPOPUPSELECT
+    {
+        MPOS_EXECUTE = 0,
+        MPOS_FULLCANCEL,
+        MPOS_CANCELLEVEL,
+        MPOS_SELECTLEFT,
+        MPOS_SELECTRIGHT,
+        MPOS_CHILDTRACKING
+    };
+
+    enum tagMENUPOPUPPOPUPFLAGS
+    {
+        MPPF_SETFOCUS = 0x00000001,
+        MPPF_INITIALSELECT = 0x00000002,
+        MPPF_NOANIMATE = 0x00000004,
+        MPPF_KEYBOARD = 0x00000010,
+        MPPF_REPOSITION = 0x00000020,
+        MPPF_FORCEZORDER = 0x00000040,
+        MPPF_FINALSELECT = 0x00000080,
+        MPPF_TOP = 0x20000000,
+        MPPF_LEFT = 0x40000000,
+        MPPF_RIGHT = 0x60000000,
+        MPPF_BOTTOM = 0x80000000,
+        MPPF_POS_MASK = 0xE0000000,
+        MPPF_ALIGN_LEFT = 0x02000000,
+        MPPF_ALIGN_RIGHT = 0x04000000
+    };
+    typedef int MP_POPUPFLAGS;
+
+    HRESULT Popup(
+        [ in ] POINTL *ppt,
+        [ in ] RECTL *prcExclude,
+        [ in ] MP_POPUPFLAGS dwFlags );
+
+    HRESULT OnSelect( [ in ] DWORD dwSelectType );
+
+    HRESULT SetSubMenu(
+        [ in ] IMenuPopup* pmp,
+        [ in ] BOOL fSet );
+}
+
+cpp_quote( "#endif /* _WIN32_IE_IE60 */" )
+
+cpp_quote( "#if (_WIN32_IE >= _WIN32_IE_IE40)" )
+
+/*****************************************************************************
+* IBandSite interface
+*/
+cpp_quote( "#include <pshpack8.h>" )
+
+typedef struct tagBANDSITEINFO
+{
+    DWORD dwMask;
+    DWORD dwState;
+    DWORD dwStyle;
+} BANDSITEINFO;
+
+cpp_quote( "#include <poppack.h>" )
+
+
+enum tagBANDSITECID
+{
+    BSID_BANDADDED,
+    BSID_BANDREMOVED,
+};
+
+cpp_quote( "#define BSIM_STATE        0x00000001" )
+cpp_quote( "#define BSIM_STYLE        0x00000002" )
+
+cpp_quote( "#define BSSF_VISIBLE      0x00000001" )
+cpp_quote( "#define BSSF_NOTITLE      0x00000002" )
+cpp_quote( "#define BSSF_UNDELETEABLE 0x00001000" )
+
+cpp_quote( "#define BSIS_AUTOGRIPPER       0x00000000" )
+cpp_quote( "#define BSIS_NOGRIPPER         0x00000001" )
+cpp_quote( "#define BSIS_ALWAYSGRIPPER     0x00000002" )
+cpp_quote( "#define BSIS_LEFTALIGN         0x00000004" )
+cpp_quote( "#define BSIS_SINGLECLICK       0x00000008" )
+cpp_quote( "#define BSIS_NOCONTEXTMENU     0x00000010" )
+cpp_quote( "#define BSIS_NODROPTARGET      0x00000020" )
+cpp_quote( "#define BSIS_NOCAPTION         0x00000040" )
+cpp_quote( "#define BSIS_PREFERNOLINEBREAK 0x00000080" )
+cpp_quote( "#define BSIS_LOCKED            0x00000100" )
+cpp_quote( "#if (_WIN32_IE >= _WIN32_IE_IE70)" )
+cpp_quote( "#define BSIS_PRESERVEORDERDURINGLAYOUT 0x00000200" )
+cpp_quote( "#endif  /* _WIN32_IE_IE70 */" )
+
+cpp_quote( "#define SID_SBandSite IID_IBandSite" )
+cpp_quote( "#define CGID_BandSite IID_IBandSite" )
+
+[
+    object,
+    uuid( 4CF504B0-DE96-11D0-8B3F-00A0C911E8E5 )
+]
+interface IBandSite : IUnknown
+{
+    HRESULT AddBand( [ in ] IUnknown* punk );
+
+    HRESULT EnumBands(
+        [ in ] UINT uBand,
+        [ out ] DWORD* pdwBandID );
+
+    HRESULT QueryBand(
+        [ in ] DWORD dwBandID,
+        [ out ] IDeskBand** ppstb,
+        [ out ] DWORD* pdwState,
+        [ out, string, size_is( cchName ) ] LPWSTR pszName,
+        [ in ] int cchName );
+
+    HRESULT SetBandState(
+        [ in ] DWORD dwBandID,
+        [ in ] DWORD dwMask,
+        [ in ] DWORD dwState );
+
+    HRESULT RemoveBand( [ in ] DWORD dwBandID );
+
+    HRESULT GetBandObject(
+        [ in ] DWORD dwBandID,
+        [ in ] REFIID riid,
+        [ out, iid_is( riid ) ] void **ppv );
+
+    HRESULT SetBandSiteInfo( [ in ] const BANDSITEINFO *pbsinfo );
+
+    HRESULT GetBandSiteInfo( [ in, out ] BANDSITEINFO *pbsinfo );
+}
+
+cpp_quote( "#endif /* _WIN32_IE_IE40 */" )
+
+/*****************************************************************************
+* IMenuBand interface
+*/
+[
+    uuid( 568804CD-CBD7-11d0-9816-00C04FD91972 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IMenuBand : IUnknown
+{
+    enum tagMENUBANDHANDLERCID
+    {
+        MBHANDCID_PIDLSELECT = 0,
+    };
+
+    HRESULT IsMenuMessage( [ in ] MSG* pmsg );
+
+    HRESULT TranslateMenuMessage(
+        [ in, out ] MSG* pmsg,
+        [ out ] LRESULT* plRet );
+}
+
+/*****************************************************************************
+* IProfferService interface
+*/
+[
+    uuid( cb728b20-f786-11ce-92ad-00aa00a74cd0 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IProfferService : IUnknown
+{
+    HRESULT ProfferService(
+        [ in ] REFGUID rguidService,
+        [ in ] IServiceProvider *psp,
+        [ out ] DWORD *pdwCookie );
+
+    HRESULT RevokeService(
+        [ in ] DWORD dwCookie );
+}
+
+/*****************************************************************************
+* IShellMenuCallback interface
+*/
+cpp_quote( "#include <pshpack8.h>" )
+
+typedef struct tagSMDATA
+{
+    DWORD                   dwMask;
+    DWORD                   dwFlags;
+    HMENU                   hmenu;
+    HWND                    hwnd;
+    UINT                    uId;
+    UINT                    uIdParent;
+    UINT                    uIdAncestor;
+    IUnknown                *punk;
+    LPITEMIDLIST    pidlFolder;
+    LPITEMIDLIST    pidlItem;
+    IShellFolder    *psf;
+    void                    *pvUserData;
+} SMDATA, *LPSMDATA;
+
+cpp_quote( "#define SMDM_SHELLFOLDER             0x00000001" )
+cpp_quote( "#define SMDM_HMENU                   0x00000002" )
+cpp_quote( "#define SMDM_TOOLBAR                 0x00000004" )
+
+typedef struct tagSMINFO
+{
+    DWORD                   dwMask;
+    DWORD                   dwType;
+    DWORD                   dwFlags;
+    int                             iIcon;
+} SMINFO, *PSMINFO;
+
+typedef struct tagSHCSCHANGENOTIFYSTRUCT
+{
+    LONG                    lEvent;
+    LPCITEMIDLIST   pidl1;
+    LPCITEMIDLIST   pidl2;
+} SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
+
+cpp_quote( "#include <poppack.h>" )
+
+enum
+{
+    SMIM_TYPE = 0x00000001,
+    SMIM_FLAGS = 0x00000002,
+    SMIM_ICON = 0x00000004
+};
+
+enum
+{
+    SMIT_SEPARATOR = 0x00000001,
+    SMIT_STRING = 0x00000002
+};
+
+enum
+{
+    SMIF_ICON = 0x00000001,
+    SMIF_ACCELERATOR = 0x00000002,
+    SMIF_DROPTARGET = 0x00000004,
+    SMIF_SUBMENU = 0x00000008,
+    SMIF_CHECKED = 0x00000020,
+    SMIF_DROPCASCADE = 0x00000040,
+    SMIF_HIDDEN = 0x00000080,
+    SMIF_DISABLED = 0x00000100,
+    SMIF_TRACKPOPUP = 0x00000200,
+    SMIF_DEMOTED = 0x00000400,
+    SMIF_ALTSTATE = 0x00000800,
+    SMIF_DRAGNDROP = 0x00001000,
+    SMIF_NEW = 0x00002000,
+};
+
+
+cpp_quote( "#define SMC_INITMENU                         0x00000001" )
+cpp_quote( "#define SMC_CREATE                           0x00000002" )
+cpp_quote( "#define SMC_EXITMENU                         0x00000003" )
+cpp_quote( "#define SMC_GETINFO                          0x00000005" )
+cpp_quote( "#define SMC_GETSFINFO                        0x00000006" )
+cpp_quote( "#define SMC_GETOBJECT                        0x00000007" )
+cpp_quote( "#define SMC_GETSFOBJECT                      0x00000008" )
+cpp_quote( "#define SMC_SFEXEC                           0x00000009" )
+cpp_quote( "#define SMC_SFSELECTITEM                     0x0000000A" )
+cpp_quote( "#define SMC_REFRESH                          0x00000010" )
+cpp_quote( "#define SMC_DEMOTE                           0x00000011" )
+cpp_quote( "#define SMC_PROMOTE                          0x00000012" )
+cpp_quote( "#define SMC_DEFAULTICON                      0x00000016" )
+cpp_quote( "#define SMC_NEWITEM                          0x00000017" )
+cpp_quote( "#define SMC_CHEVRONEXPAND            0x00000019" )
+cpp_quote( "#define SMC_DISPLAYCHEVRONTIP        0x0000002A" )
+cpp_quote( "#define SMC_SETSFOBJECT                      0x0000002D" )
+cpp_quote( "#define SMC_SHCHANGENOTIFY           0x0000002E" )
+cpp_quote( "#define SMC_CHEVRONGETTIP            0x0000002F" )
+cpp_quote( "#define SMC_SFDDRESTRICTED           0x00000030" )
+
+[
+    uuid( 4CA300A1-9B8D-11d1-8B22-00C04FD918D0 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IShellMenuCallback : IUnknown
+{
+    HRESULT CallbackSM(
+        [ in, out ] LPSMDATA psmd,
+        [ in ] UINT uMsg,
+        [ in ] WPARAM wParam,
+        [ in ] LPARAM lParam );
+}
+
+
+/*****************************************************************************
+* IShellMenu interface
+*/
+
+cpp_quote( "#define SMINIT_DEFAULT               0x00000000" )
+cpp_quote( "#define SMINIT_RESTRICT_DRAGDROP     0x00000002" )
+cpp_quote( "#define SMINIT_TOPLEVEL              0x00000004" )
+cpp_quote( "#define SMINIT_CACHED                0x00000010" )
+cpp_quote( "#define SMINIT_VERTICAL              0x10000000" )
+cpp_quote( "#define SMINIT_HORIZONTAL            0x20000000" )
+cpp_quote( "" )
+cpp_quote( "#define ANCESTORDEFAULT              (UINT)-1" )
+cpp_quote( "" )
+cpp_quote( "#define SMSET_TOP                    0x10000000" )
+cpp_quote( "#define SMSET_BOTTOM                 0x20000000" )
+cpp_quote( "#define SMSET_DONTOWN                0x00000001" )
+cpp_quote( "" )
+cpp_quote( "#define SMINV_REFRESH                0x00000001" )
+cpp_quote( "#define SMINV_ID                     0x00000008" )
+
+[
+    uuid( EE1F7637-E138-11d1-8379-00C04FD918D0 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IShellMenu : IUnknown
+{
+    HRESULT Initialize(
+        [ in ] IShellMenuCallback *psmc,
+        [ in ] UINT uId,
+        [ in ] UINT uIdAncestor,
+        [ in ] DWORD dwFlags );
+
+    HRESULT GetMenuInfo(
+        [ out ] IShellMenuCallback **ppsmc,
+        [ out ] UINT *puId,
+        [ out ] UINT *puIdAncestor,
+        [ out ] DWORD *pdwFlags );
+
+    HRESULT SetShellFolder(
+        [ in ] IShellFolder *psf,
+        [ in ] LPCITEMIDLIST pidlFolder,
+        [ in ] HKEY hKey,
+        [ in ] DWORD dwFlags );
+
+    HRESULT GetShellFolder(
+        [ out ] DWORD *pdwFlags,
+        [ out ] LPITEMIDLIST *ppidl,
+        [ in ] REFIID riid,
+        [ out ] void **ppv );
+
+    HRESULT SetMenu(
+        [ in ] HMENU hmenu,
+        [ in ] HWND hwnd,
+        [ in ] DWORD dwFlags );
+
+    HRESULT GetMenu(
+        [ out ] HMENU *phmenu,
+        [ out ] HWND *phwnd,
+        [ out ] DWORD *pdwFlags );
+
+    HRESULT InvalidateItem(
+        [ in ] LPSMDATA psmd,
+        [ in ] DWORD dwFlags );
+
+    HRESULT GetState(
+        [ out ] LPSMDATA psmd );
+
+    HRESULT SetMenuToolbar(
+        [ in ] IUnknown *punk,
+        [ in ] DWORD dwFlags );
+}
+
+
+typedef struct _WINDOWDATA
+{
+    DWORD     dwWindowID;
+    UINT      uiCP;
+    LPITEMIDLIST  pidl;
+    [string]  LPWSTR lpszUrl;
+    [string]  LPWSTR lpszUrlLocation;
+    [string]  LPWSTR lpszTitle;
+} WINDOWDATA;
+
+typedef WINDOWDATA *LPWINDOWDATA;
+typedef const WINDOWDATA *LPCWINDOWDATA;
+
+
+/*****************************************************************************
+* ITravelEntry interface
+*/
+[
+    uuid( F46EDB3B-BC2F-11d0-9412-00AA00A3EBD3 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface ITravelEntry : IUnknown
+{
+    HRESULT Invoke(
+        [ in ] IUnknown *punk );
+
+    HRESULT Update(
+        [ in ] IUnknown *punk,
+        BOOL fIsLocalAnchor );
+
+    HRESULT GetPidl(
+        [ in ] LPITEMIDLIST *ppidl );
+};
+
+
+/*****************************************************************************
+* ITravelLogClient interface
+*/
+[
+    uuid( 241c033e-e659-43da-aa4d-4086dbc4758d ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface ITravelLogClient : IUnknown
+{
+    HRESULT FindWindowByIndex(
+        [ in ] DWORD dwID,
+        [ out ] IUnknown **ppunk );
+
+    HRESULT GetWindowData(
+        [ out ] LPWINDOWDATA pWinData );
+
+    HRESULT LoadHistoryPosition(
+        [ in ] LPWSTR pszUrlLocation,
+        [ in ] DWORD dwPosition );
+};
+
+
+/*****************************************************************************
+* ITravelLog interface
+*/
+[
+    uuid( 02BA3B52-0547-11D1-B833-00C04FC9B31F ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface ITravelLog : IUnknown
+{
+    enum tagTLENUMF
+    {
+        TLEF_RELATIVE_INCLUDE_CURRENT = 0x00000001,
+        TLEF_RELATIVE_BACK = 0x00000010,
+        TLEF_RELATIVE_FORE = 0x00000020,
+        TLEF_INCLUDE_UNINVOKEABLE = 0x00000040,
+        TLEF_ABSOLUTE = 0x00000031,
+    };
+    typedef DWORD TLENUMF;
+
+    HRESULT AddEntry(
+        [ in ] IUnknown *punk,
+        BOOL fIsLocalAnchor );
+
+    HRESULT UpdateEntry(
+        [ in ] IUnknown *punk,
+        BOOL fIsLocalAnchor );
+
+    HRESULT UpdateExternal(
+        [ in ] IUnknown *punk,
+        [ in ] IUnknown *punkHLBrowseContext );
+
+    HRESULT Travel(
+        [ in ] IUnknown *punk,
+        int iOffset );
+
+    HRESULT GetTravelEntry(
+        [ in ] IUnknown *punk,
+        int iOffset,
+        [ out ] ITravelEntry **ppte );
+
+    HRESULT FindTravelEntry(
+        [ in ] IUnknown *punk,
+        [ in ] LPCITEMIDLIST pidl,
+        [ out ] ITravelEntry **ppte );
+
+    HRESULT GetToolTipText(
+        [ in ] IUnknown *punk,
+        int iOffset,
+        int idsTemplate,
+        [ out ] LPWSTR pwzText,
+        DWORD cchText );
+
+    HRESULT InsertMenuEntries(
+        [ in ] IUnknown *punk,
+        [ in, out ] HMENU hmenu,
+        int nPos,
+        int idFirst,
+        int idLast,
+        DWORD dwFlags );
+
+    HRESULT Clone(
+        [ out ] ITravelLog **pptl );
+
+    DWORD CountEntries(
+        [ in ] IUnknown *punk );
+
+    HRESULT Revert();
+};
+
+
+/*****************************************************************************
+* IShellService interface
+*/
+[
+    object,
+    uuid( 5836FB00-8187-11CF-A12B-00AA004AE837 ),
+    pointer_default( unique ),
+    local
+]
+interface IShellService : IUnknown
+{
+    HRESULT SetOwner(
+        [ in ] IUnknown *owner );
+};
+
+/*****************************************************************************
+* IShellBrowser interface
+*/
+[
+    object,
+    uuid( 02BA3B52-0547-11D1-B833-00C04FC9B31F ),
+    pointer_default( unique ),
+    local
+]
+interface IBrowserService : IUnknown
+{
+    typedef enum tagBNSTATE
+    {
+        BNS_NORMAL = 0,
+        BNS_BEGIN_NAVIGATE = 1,
+        BNS_NAVIGATE = 2
+    } BNSTATE;
+
+    cpp_quote( "#include <pshpack8.h>" )
+        typedef struct basebrowserdataxp
+    {
+        HWND                            _hwnd;
+        ITravelLog                      *_ptl;
+        IUnknown                        *_phlf;
+        IUnknown                        *_pautoWB2;
+        IUnknown                        *_pautoEDS;
+        IShellService           *_pautoSS;
+        int                                     _eSecureLockIcon;
+        DWORD                           _fCreatingViewWindow;
+        UINT                            _uActivateState;
+        LPITEMIDLIST            _pidlViewState;
+        IOleCommandTarget       *_pctView;
+        LPITEMIDLIST            _pidlCur;
+        IShellView                      *_psv;
+        IShellFolder            *_psf;
+        HWND                            _hwndView;
+        LPWSTR                          _pszTitleCur;
+        LPITEMIDLIST            _pidlPending;
+        IShellView                      *_psvPending;
+        IShellFolder            *_psfPending;
+        HWND                            _hwndViewPending;
+        LPWSTR                          _pszTitlePending;
+        BOOL                            _fIsViewMSHTML;
+        BOOL                            _fPrivacyImpacted;
+        CLSID                           _clsidView;
+        CLSID                           _clsidViewPending;
+        HWND                            _hwndFrame;
+    } BASEBROWSERDATAXP;
+    typedef struct basebrowserdataxp *LPBASEBROWSERDATAXP;
+
+    typedef struct basebrowserdatalh
+    {
+        HWND                            _hwnd;
+        ITravelLog                      *_ptl;
+        IUnknown                        *_phlf;
+        IUnknown                        *_pautoWB2;
+        IUnknown                        *_pautoEDS;
+        IShellService           *_pautoSS;
+        int                                     _eSecureLockIcon;
+        DWORD                           _fCreatingViewWindow;
+        UINT                            _uActivateState;
+        LPITEMIDLIST            _pidlViewState;
+        IOleCommandTarget       *_pctView;
+        LPITEMIDLIST            _pidlCur;
+        IShellView                      *_psv;
+        IShellFolder            *_psf;
+        HWND                            _hwndView;
+        LPWSTR                          _pszTitleCur;
+        LPITEMIDLIST            _pidlPending;
+        IShellView                      *_psvPending;
+        IShellFolder            *_psfPending;
+        HWND                            _hwndViewPending;
+        LPWSTR                          _pszTitlePending;
+        BOOL                            _fIsViewMSHTML;
+        BOOL                            _fPrivacyImpacted;
+        CLSID                           _clsidView;
+        CLSID                           _clsidViewPending;
+        HWND                            _hwndFrame;
+        LONG                            _lPhishingFilterStatus;
+    } BASEBROWSERDATALH;
+    cpp_quote( "#include <poppack.h>" )
+        typedef struct basebrowserdatalh *LPBASEBROWSERDATALH;
+
+    typedef BASEBROWSERDATAXP BASEBROWSERDATA;
+
+    typedef const BASEBROWSERDATA *LPCBASEBROWSERDATA;
+
+    typedef BASEBROWSERDATA *LPBASEBROWSERDATA;
+
+    cpp_quote( "#if 0" )
+        typedef HANDLE HMONITOR;
+    cpp_quote( "#endif /* 0 */" )
+
+        typedef struct SToolbarItem
+    {
+        IDockingWindow          *ptbar;
+        BORDERWIDTHS            rcBorderTool;
+        LPWSTR                          pwszItem;
+        BOOL                            fShow;
+        HMONITOR                        hMon;
+    } TOOLBARITEM;
+
+    typedef struct SToolbarItem *LPTOOLBARITEM;
+
+    HRESULT GetParentSite(
+        [ out ] IOleInPlaceSite **ppipsite );
+
+    HRESULT SetTitle(
+        [ in ] IShellView *psv,
+        [ in ] LPCWSTR pszName );
+
+    HRESULT GetTitle(
+        [ in ] IShellView *psv,
+        [ out ] LPWSTR pszName,
+        DWORD cchName );
+
+    HRESULT GetOleObject(
+        [ out ] IOleObject **ppobjv );
+
+    HRESULT GetTravelLog(
+        [ out ] ITravelLog **pptl );
+
+    HRESULT ShowControlWindow(
+        UINT id,
+        BOOL fShow );
+
+    HRESULT IsControlWindowShown(
+        UINT id,
+        [ out ] BOOL *pfShown );
+
+    HRESULT IEGetDisplayName(
+        [ in ] LPCITEMIDLIST pidl,
+        [ out ] LPWSTR pwszName,
+        UINT uFlags );
+
+    HRESULT IEParseDisplayName(
+        UINT uiCP,
+        [ in ] LPCWSTR pwszPath,
+        [ out ] LPCITEMIDLIST *ppidlOut );
+
+    HRESULT DisplayParseError(
+        HRESULT hres,
+        [ in ] LPCWSTR pwszPath );
+
+    HRESULT NavigateToPidl(
+        [ in ] LPCITEMIDLIST pidl,
+        DWORD grfHLNF );
+
+    HRESULT SetNavigateState(
+        BNSTATE bnstate );
+
+    HRESULT GetNavigateState(
+        [ out ] BNSTATE *pbnstate );
+
+    HRESULT NotifyRedirect(
+        [ in ] IShellView *psv,
+        [ in ] LPCITEMIDLIST pidl,
+        [ out ] BOOL *pfDidBrowse );
+
+    HRESULT UpdateWindowList();
+
+    HRESULT UpdateBackForwardState();
+
+    HRESULT SetFlags(
+        DWORD dwFlags,
+        DWORD dwFlagMask );
+
+    HRESULT GetFlags(
+        [ out ] DWORD *pdwFlags );
+
+    HRESULT CanNavigateNow();
+
+    HRESULT GetPidl(
+        [ out ] LPCITEMIDLIST *ppidl );
+
+    HRESULT SetReferrer(
+        [ in ] LPCITEMIDLIST pidl );
+
+    DWORD GetBrowserIndex();
+
+    HRESULT GetBrowserByIndex(
+        DWORD dwID,
+        [ out ] IUnknown **ppunk );
+
+    HRESULT GetHistoryObject(
+        [ out ] IOleObject **ppole,
+        [ out ] IStream **pstm,
+        [ out ] IBindCtx **ppbc );
+
+    HRESULT SetHistoryObject(
+        [ in ] IOleObject *pole,
+        BOOL fIsLocalAnchor );
+
+    HRESULT CacheOLEServer(
+        [ in ] IOleObject *pole );
+
+    HRESULT GetSetCodePage(
+        [ in ] VARIANT *pvarIn,
+        [ out ] VARIANT *pvarOut );
+
+    HRESULT OnHttpEquiv(
+        [ in ] IShellView *psv,
+        BOOL fDone,
+        [ in ] VARIANT *pvarargIn,
+        [ out ] VARIANT *pvarargOut );
+
+    HRESULT GetPalette(
+        [ out ] HPALETTE *hpal );
+
+    HRESULT RegisterWindow(
+        BOOL fForceRegister,
+        int swc );
+}
+
+
+/*****************************************************************************
+* IShellBrowser2 interface
+*/
+[
+    uuid( 68BD21CC-438B-11D2-A560-00A0C92DBFE8 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IBrowserService2 : IBrowserService
+{
+    typedef struct tagFolderSetData
+    {
+        FOLDERSETTINGS          _fs;
+        SHELLVIEWID                     _vidRestore;
+        DWORD                           _dwViewPriority;
+    } FOLDERSETDATA;
+
+    typedef struct tagFolderSetData *LPFOLDERSETDATA;
+
+    LRESULT WndProcBS(
+        [ in ] HWND hwnd,
+        UINT uMsg,
+        WPARAM wParam,
+        LPARAM lParam );
+
+    HRESULT SetAsDefFolderSettings();
+
+    HRESULT GetViewRect(
+        [ out ] RECT *prc );
+
+    HRESULT OnSize(
+        WPARAM wParam );
+
+    HRESULT OnCreate(
+        [ in ] struct tagCREATESTRUCTW *pcs );
+
+    LRESULT OnCommand(
+        WPARAM wParam,
+        LPARAM lParam );
+
+    HRESULT OnDestroy();
+
+    LRESULT OnNotify(
+        [ in ] struct tagNMHDR *pnm );
+
+    HRESULT OnSetFocus();
+
+    HRESULT OnFrameWindowActivateBS(
+        BOOL fActive );
+
+    HRESULT ReleaseShellView();
+
+    HRESULT ActivatePendingView();
+
+    HRESULT CreateViewWindow(
+        [ in ] IShellView *psvNew,
+        [ in ] IShellView *psvOld,
+        [ in ] LPRECT prcView,
+        [ out ] HWND *phwnd );
+
+    HRESULT CreateBrowserPropSheetExt(
+        [ in ] REFIID riid,
+        [ out ] void **ppv );
+
+    HRESULT GetViewWindow(
+        [ out ] HWND *phwndView );
+
+    HRESULT GetBaseBrowserData(
+        [ out ] LPCBASEBROWSERDATA *pbbd );
+
+    LPBASEBROWSERDATA PutBaseBrowserData();
+
+    HRESULT InitializeTravelLog(
+        [ in ] ITravelLog *ptl,
+        DWORD dw );
+
+    HRESULT SetTopBrowser();
+
+    HRESULT Offline(
+        int iCmd );
+
+    HRESULT AllowViewResize(
+        BOOL f );
+
+    HRESULT SetActivateState(
+        UINT u );
+
+    HRESULT UpdateSecureLockIcon(
+        int eSecureLock );
+
+    HRESULT InitializeDownloadManager();
+
+    HRESULT InitializeTransitionSite();
+
+    HRESULT _Initialize(
+        [ in ] HWND hwnd,
+        [ in ] IUnknown *pauto );
+
+    HRESULT _CancelPendingNavigationAsync();
+
+    HRESULT _CancelPendingView();
+
+    HRESULT _MaySaveChanges();
+
+    HRESULT _PauseOrResumeView(
+        BOOL fPaused );
+
+    HRESULT _DisableModeless();
+
+    HRESULT _NavigateToPidl(
+        [ in ] LPCITEMIDLIST pidl,
+        DWORD grfHLNF,
+        DWORD dwFlags );
+
+    HRESULT _TryShell2Rename(
+        [ in ] IShellView *psv,
+        [ in ] LPCITEMIDLIST pidlNew );
+
+    HRESULT _SwitchActivationNow();
+
+    HRESULT _ExecChildren(
+        [ in ] IUnknown *punkBar,
+        BOOL fBroadcast,
+        [ in ] const GUID *pguidCmdGroup,
+        DWORD nCmdID,
+        DWORD nCmdexecopt,
+        [ in ] VARIANTARG *pvarargIn,
+        [ in, out ] VARIANTARG *pvarargOut );
+
+    HRESULT _SendChildren(
+        [ in ] HWND hwndBar,
+        BOOL fBroadcast,
+        UINT uMsg,
+        WPARAM wParam,
+        LPARAM lParam );
+
+    HRESULT GetFolderSetData(
+        [ out ] struct tagFolderSetData *pfsd );
+
+    HRESULT _OnFocusChange(
+        UINT itb );
+
+    HRESULT v_ShowHideChildWindows(
+        BOOL fChildOnly );
+
+    UINT _get_itbLastFocus();
+
+    HRESULT _put_itbLastFocus(
+        UINT itbLastFocus );
+
+    HRESULT _UIActivateView(
+        UINT uState );
+
+    HRESULT _GetViewBorderRect(
+        [ out ] RECT *prc );
+
+    HRESULT _UpdateViewRectSize();
+
+    HRESULT _ResizeNextBorder(
+        UINT itb );
+
+    HRESULT _ResizeView();
+
+    HRESULT _GetEffectiveClientArea(
+        [ out ] LPRECT lprectBorder,
+        [ in ] HMONITOR hmon );
+
+    IStream *v_GetViewStream(
+        [ in ] LPCITEMIDLIST pidl,
+        DWORD grfMode,
+        [ in ] LPCWSTR pwszName );
+
+    LRESULT ForwardViewMsg(
+        UINT uMsg,
+        WPARAM wParam,
+        LPARAM lParam );
+
+    HRESULT SetAcceleratorMenu(
+        [ in ] HACCEL hacc );
+
+    int _GetToolbarCount();
+
+    LPTOOLBARITEM _GetToolbarItem(
+        int itb );
+
+    HRESULT _SaveToolbars(
+        [ in ] IStream *pstm );
+
+    HRESULT _LoadToolbars(
+        [ in ] IStream *pstm );
+
+    HRESULT _CloseAndReleaseToolbars(
+        BOOL fClose );
+
+    HRESULT v_MayGetNextToolbarFocus(
+        [ in ] LPMSG lpMsg,
+        UINT itbNext,
+        int citb,
+        [ out ] LPTOOLBARITEM *pptbi,
+        [ out ] HWND *phwnd );
+
+    HRESULT _ResizeNextBorderHelper(
+        UINT itb,
+        BOOL bUseHmonitor );
+
+    UINT _FindTBar(
+        [ in ] IUnknown *punkSrc );
+
+    HRESULT _SetFocus(
+        [ in ] LPTOOLBARITEM ptbi,
+        [ in ] HWND hwnd,
+        [ in ] LPMSG lpMsg );
+
+    HRESULT v_MayTranslateAccelerator(
+        [ in ] MSG *pmsg );
+
+    HRESULT _GetBorderDWHelper(
+        [ in ] IUnknown *punkSrc,
+        [ out ] LPRECT lprectBorder,
+        BOOL bUseHmonitor );
+
+    HRESULT v_CheckZoneCrossing(
+        [ in ] LPCITEMIDLIST pidl );
+}
+
+
+/*****************************************************************************
+* IShellBrowser3 interface
+*/
+[
+    uuid( 27D7CE21-762D-48F3-86F3-40E2FD3749C4 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IBrowserService3 : IBrowserService2
+{
+    HRESULT _PositionViewWindow(
+        [ in ] HWND hwnd,
+        [ in ] LPRECT prc );
+
+    HRESULT IEParseDisplayNameEx(
+        UINT uiCP,
+        [ in ] LPCWSTR pwszPath,
+        DWORD dwFlags,
+        [ out ] LPITEMIDLIST *ppidlOut );
+}
+
+
+/*****************************************************************************
+* IShellBrowser4 interface
+*/
+[
+    uuid( 639f1bff-e135-4096-abd8-e0f504d649a4 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface IBrowserService4 : IBrowserService3
+{
+    HRESULT ActivateView(
+        BOOL fPendingView );
+
+    HRESULT SaveViewState();
+
+    HRESULT _ResizeAllBorders();
+}
+
+cpp_quote( "#if (_WIN32_IE >= _WIN32_IE_IE60)" )
+
+/*****************************************************************************
+* ITrackShellMenu interface
+*/
+[
+    uuid( 8278F932-2A3E-11d2-838F-00C04FD918D0 ),
+    object,
+    pointer_default( unique ),
+    local
+]
+interface ITrackShellMenu : IShellMenu
+{
+    HRESULT SetObscured(
+        [ in ] HWND hwndTB,
+        [ in ] IUnknown *punkBand,
+        DWORD dwSMSetFlags );
+
+    HRESULT Popup(
+        [ in ] HWND hwnd,
+        [ in ] POINTL *ppt,
+        [ in ] RECTL *prcExclude,
+        MP_POPUPFLAGS dwFlags );
+};
+
+cpp_quote( "#endif /* _WIN32_IE_IE60 */" )

BIN
Test/Ship.m2


+ 68 - 0
Test/Test.cpp

@@ -0,0 +1,68 @@
+/*#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+int
+main( int argc, char *argv[] )
+{
+    char buf[ 128 ];
+    char x;
+    char *px = &x;
+
+    *px = 100;
+
+    if( argc != 2 )
+    {
+        printf( "Braucht ein Argument!\n" );
+        exit( 1 );
+    }
+
+    printf( argv[ 1 ] );
+    putchar( '\n' );
+
+    printf( "x = %d\n", x );
+    printf( "Eingabe: " );
+    fflush( stdout );
+
+    if( fgets( buf, sizeof buf, stdin ) )
+        printf( buf );
+
+    printf( "x = %d\n", x );
+
+    return 0;
+}
+*/
+
+#include <ilcplex/ilocplex.h>
+#include <conio.h>
+#include <iostream>
+
+using namespace std;
+
+int main()
+{
+    IloEnv env;
+    IloModel mdl( env );
+
+    IloNumVar x1;
+    IloNumVar x2;
+
+    IloRange sum_to_one( env, 1, 1 );
+    IloObjective obj = IloMaximize( env, 0 );
+
+    sum_to_one.setLinearCoef( x1, 1 );
+    sum_to_one.setLinearCoef( x2, 1 );
+    obj.setLinearCoef( x1, 2 );
+    obj.setLinearCoef( x2, 1 );
+
+    mdl.add( obj );
+    mdl.add( sum_to_one );
+
+    IloCplex solver( mdl );
+    solver.solve();
+
+    cout << solver.getObjValue() << "\n";
+
+    getch();
+
+}

+ 222 - 0
Test/Test.vcxproj

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F5A3F3EF-0758-452C-A414-CF690EC5E3B0}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>Test</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>..\..\Visual Leak Detector\include;..\..\sql\sql;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Visual Leak Detector\lib\Win32;..\..\sql\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>..\..\sql\sql;..\..\Framework;..\..\ksgScript\ksgScript\Include;..\..\GSL\GSL\Include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;..\..\Network\Network;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\sql\x64\Debug;..\..\Framework\x64\Debug;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;..\..\Network\x64\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\x64\Release;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>d3d11.lib;sql.lib</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;IL_STD;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <AdditionalIncludeDirectories>D:\CPLEX\cplex\include;D:\CPLEX\concert\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>d3d11.lib;sql.lib;cplex1271.lib;concert.lib;ilocplex.lib;framework.lib;Network.lib;user32.lib;d3d9.lib;dxgi.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>D:\CPLEX\cplex\lib\x64_windows_vs2015\stat_mda;D:\CPLEX\concert\lib\x64_windows_vs2015\stat_mda;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Network\x64\Debug\Network.dll" "Network.dll"</Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>safsaf;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>D:\CPLEX\cplex\include;D:\CPLEX\concert\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>d3d11.lib;framework.lib;user32.lib;d3d9.lib;dxgi.lib;cplex1271.lib;concert.lib;ilocplex.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>D:\CPLEX\cplex\lib\x64_windows_vs2015\stat_mda;D:\CPLEX\concert\lib\x64_windows_vs2015\stat_mda;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\x64\Release\Framework.dll" "Framework.dll"</Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>Kopieren...;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <None Include="test3d.cpp" />
+    <None Include="framework.cpp" />
+    <ClCompile Include="Test.cpp" />
+    <None Include="test3dF.cpp" />
+    <None Include="tmp.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+    </None>
+    <None Include="patcher_News.cpp" />
+    <None Include="patcher_PatchNotes.cpp" />
+    <None Include="patcher_start.cpp" />
+    <None Include="linie_shop.cpp">
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </DeploymentContent>
+    </None>
+    <None Include="linie_normal_shop.cpp" />
+    <None Include="client_start.cpp" />
+    <None Include="KSGSTest.cpp" />
+    <None Include="asteroids_shop.cpp" />
+    <None Include="main.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="texture.vs">
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
+      <FileType>Document</FileType>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </ExcludedFromBuild>
+      <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+      </DeploymentContent>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="texture.ps">
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
+      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compute</ShaderType>
+      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
+      <FileType>Document</FileType>
+    </None>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 75 - 0
Test/Test.vcxproj.filters

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Quelldateien">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Headerdateien">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Ressourcendateien">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+    <Filter Include="Quelldateien\KSGS Dateien">
+      <UniqueIdentifier>{a8ffaee7-e86e-420a-a9a4-9cd6ba3e8850}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Quelldateien\Test Framework">
+      <UniqueIdentifier>{8a5b9c92-c012-4753-a8ff-aafaec00f665}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="linie_shop.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="linie_normal_shop.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="patcher_start.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="client_start.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="KSGSTest.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="patcher_PatchNotes.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="patcher_News.cpp">
+      <Filter>Quelldateien\KSGS Dateien</Filter>
+    </None>
+    <None Include="asteroids_shop.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="test3d.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="texture.ps">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="texture.vs">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="framework.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="tmp.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="main.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+    <None Include="test3dF.cpp">
+      <Filter>Quelldateien</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Test.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

BIN
Test/asteroids.ltdb


+ 380 - 0
Test/asteroids_shop.cpp

@@ -0,0 +1,380 @@
+#include <KSGSStandart.h>
+
+var int besitzStatus;
+var int erwerbbarStatus;
+var Bild goldBild;
+var Bild silberBild;
+var Bild kupferBild;
+
+class TextErscheinen
+{
+private:
+	var TextFeld beschreibung;
+	var Text txt;
+	var int num;
+	var int län;
+	var double z;
+public:
+	func void init( int besitzStatus )
+	{
+		initTextFeld( beschreibung, 5, 5, 545, 180, "", 0x101 );
+		txt = "Bei dem Spiel Asteroids bewegen sich alle Spieler mit einem Raumschiff durch den\n";
+		txt += "Weltraum. Hierbei müssen sie sich gegenseitig abschießen und den Asteroiden\n";
+		txt += "ausweichen. Viel Spaß beil Spielen!\n";
+		if( besitzStatus == 1 )
+		{
+			txt += "Du besitzt die Testversion dieses Spiels.\n";
+			txt += "Anzahl verbleibender Spiele: ";
+			txt += Rückruf( "GetTestVersionVerbleibend" );
+		}
+		if( besitzStatus == 2 )
+		{
+			txt += "Du besitzt die Vollversion dieses Spiels.";
+		}
+		län = txt.getLänge();
+		num = 0;
+		z = 0;
+	}
+	func bool next( double zeit )
+	{
+		z += zeit;
+		if( ( z > 0.03 ) && ( num < län ) )
+		{
+			var Text t;
+			t = beschreibung.getText();
+			while( z > 0.03 )
+			{
+				z -= 0.03;
+				t.anhängen( txt.getTeilText( num, num + 1 ) );
+				num += 1;
+				if( num < län )
+				{
+					break;
+				}
+			}
+			beschreibung.setText( t );
+			return true;
+		}
+		return false;
+	}
+	func void render( Bild b )
+	{
+		beschreibung.render( b );
+	}
+};
+
+class TestVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld tve;
+	var TextFeld tvkosten;
+	var TextFeld tvGoldTF;
+	var TextFeld tvSilberTF;
+	var TextFeld tvKupferTF;
+	var BildZ tvGoldBildO;
+	var BildZ tvSilberBildO;
+	var BildZ tvKupferBildO;
+	var Knopf tvKaufen;
+	var TextFeld tvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( tve, 5, 0, 300, 20, "", 0x101 );
+		initTextFeld( tvkosten, 5, 25, 50, 20, "", 0x701 );
+		initTextFeld( tvGoldTF, 60, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvSilberTF, 90, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvKupferTF, 120, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvNGK, 5, 75, 200, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			tve.setText( "10 Spiele Testversion" );
+			tvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 0 );
+			var Text preisT = preis / 10000;
+			tvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			tvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			tvKupferTF.setText( preisT );
+			tvGoldTF.setGrößeNachText();
+			tvSilberTF.setGrößeNachText();
+			tvKupferTF.setGrößeNachText();
+			tvGoldTF.setGröße( tvGoldTF.getBreite(), 20 );
+			tvSilberTF.setGröße( tvSilberTF.getBreite(), 20 );
+			tvKupferTF.setGröße( tvKupferTF.getBreite(), 20 );
+			tvSilberTF.setPosition( tvSilberTF.getX() + tvGoldTF.getBreite(), tvSilberTF.getY() );
+			tvKupferTF.setPosition( tvKupferTF.getX() + tvGoldTF.getBreite() + tvSilberTF.getBreite(), tvSilberTF.getY() );
+			initBildO( tvGoldBildO, 60 + tvGoldTF.getBreite(), 25, goldBild );
+			initBildO( tvSilberBildO, 90 + tvGoldTF.getBreite() + tvSilberTF.getBreite(), 25, silberBild );
+			initBildO( tvKupferBildO, 120 + tvGoldTF.getBreite() + tvSilberTF.getBreite() + tvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( tvKaufen, 5, 50, 100, 20, "Erwerben" );
+			tvKaufen.setMausEreignis( "tvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				tvKaufen.löscheStyle( 0x2 );
+				tvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return false;
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		tvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 300, 200 ) )
+			{
+				tve.render( b );
+				tvkosten.render( b );
+				tvGoldTF.render( b );
+				tvSilberTF.render( b );
+				tvKupferTF.render( b );
+				tvGoldBildO.render( b );
+				tvSilberBildO.render( b );
+				tvKupferBildO.render( b );
+				tvKaufen.render( b );
+				tvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+class VollVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld vve;
+	var TextFeld vvkosten;
+	var TextFeld vvGoldTF;
+	var TextFeld vvSilberTF;
+	var TextFeld vvKupferTF;
+	var BildO vvGoldBildO;
+	var BildO vvSilberBildO;
+	var BildO vvKupferBildO;
+	var Knopf vvKaufen;
+	var TextFeld vvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( vve, 0, 0, 100, 20, "", 0x101 );
+		initTextFeld( vvkosten, 410, 25, 50, 20, "", 0x701 );
+		initTextFeld( vvGoldTF, 470, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvSilberTF, 500, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvKupferTF, 530, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvNGK, 390, 75, 160, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			vve.setText( "Vollversion" );
+			vve.setGrößeNachText();
+			vve.setPosition( 550 - vve.getBreite(), vve.getY() );
+			vvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 1 );
+			var Text preisT = preis / 10000;
+			vvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			vvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			vvKupferTF.setText( preisT );
+			vvGoldTF.setGrößeNachText();
+			vvSilberTF.setGrößeNachText();
+			vvKupferTF.setGrößeNachText();
+			vvGoldTF.setGröße( vvGoldTF.getBreite(), 20 );
+			vvSilberTF.setGröße( vvSilberTF.getBreite(), 20 );
+			vvKupferTF.setGröße( vvKupferTF.getBreite(), 20 );
+			vvKupferTF.setPosition( vvKupferTF.getX() - vvKupferTF.getBreite(), vvKupferTF.getY() );
+			vvSilberTF.setPosition( ( vvSilberTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite(), vvSilberTF.getY() );
+			vvGoldTF.setPosition( ( ( vvGoldTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite() ) - vvGoldTF.getBreite(), vvGoldTF.getY() );
+			vvkosten.setPosition( vvGoldTF.getX() - 55, vvkosten.getY() );
+			initBildO( vvGoldBildO, vvGoldTF.getX() + vvGoldTF.getBreite(), 25, goldBild );
+			initBildO( vvSilberBildO, vvSilberTF.getX() + vvSilberTF.getBreite(), 25, silberBild );
+			initBildO( vvKupferBildO, vvKupferTF.getX() + vvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( vvKaufen, 450, 50, 100, 20, "Erwerben" );
+			vvKaufen.setMausEreignis( "vvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				vvKaufen.löscheStyle( 0x2 );
+				vvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return false;
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		vvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 700, 200 ) )
+			{
+				vve.render( b );
+				vvkosten.render( b );
+				vvGoldTF.render( b );
+				vvSilberTF.render( b );
+				vvKupferTF.render( b );
+				vvGoldBildO.render( b );
+				vvSilberBildO.render( b );
+				vvKupferBildO.render( b );
+				vvKaufen.render( b );
+				vvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+var TextErscheinen beschreibung;
+var TestVersion tv;
+var VollVersion vv;
+
+func void start()
+{
+	besitzStatus = Rückruf( "GetBesitzStatus" );
+	erwerbbarStatus = Rückruf( "GetErwerbbarStatus" );
+	goldBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/gold.jpg" );
+	silberBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/silber.jpg" );
+	kupferBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/kupfer.jpg" );
+	beschreibung.init( besitzStatus );
+	tv.init();
+	vv.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+	tf.setText( t );
+}
+
+func void initBildO( BildO bo, int x, int y, Bild b )
+{
+	bo.setPosition( x, y );
+	bo.setGröße( b.getBreite(), b.getHöhe() );
+	bo.setStyle( 0x1 );
+	bo.setBild( b );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+	tv.maus( me );
+	vv.maus( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret;
+	ret = beschreibung.next( z );
+	ret |= tv.tick( z );
+	ret |= vv.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	beschreibung.render( rObj );
+	tv.render( rObj );
+	vv.render( rObj );
+}
+
+func bool tvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 0 );
+	}
+	return true;
+}
+
+func bool vvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 1 );
+	}
+	return true;
+}

BIN
Test/b.ltdb


+ 92 - 0
Test/client_start.cpp

@@ -0,0 +1,92 @@
+#include <KSGSStandart.h>
+
+var int breite = 800;
+var int höhe = 500;
+var TextFeld überschrift;
+var TextFeld news;
+
+func void start()
+{
+	initTextFeld( überschrift, 0, 2, breite, 20, "Willkommen bei Kolja Strohm - Games!", 0x301 );
+	var Text txt = "";
+	txt += "Nächstes Update: 0.0.0.34 erscheint am 19.10.2014 um 11:00 Uhr\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Minigame 'Asteroids'.\n";
+	txt += "   Fliege mit einem Raumschiff durch ein Weltall voller tödlicher Asteroiden. Weiche ihnen aus oder schieße sie ab.\n";
+	txt += "   Bewege das Raumschiff mit den Pfeiltasten oder W,A,D, schieße mit der Lehrtaste.\n";
+	txt += " - Bei den Minigames erscheint nun eine 'Verloren' Meldung, wenn das Spiel vorbei ist.\n\n";
+	txt += "Behobene Fehler:\n";
+	txt += " - Der Patcher lässt sich wieder verschieben.\n";
+	txt += " - Anzeigefeler in den Patcher Optionen wurde behoben.\n";
+	txt += " - Das Client Fenster ist jetzt nach dem Start des Programs fokussiert.\n";
+	txt += " - Beim Beenden des Clients friert das Program nicht mehr ein.\n";
+	txt += "_______________________________________________________________________________________________________________\n";
+	txt += "Patch Notes 0.0.0.33 erschienen am 24.08.2014. um 11:00 Uhr\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Beim erhalten von Chatnachrichten, Einladungen und anderen Meldungen werden jetzt kurze Sounds abgespielt.\n";
+	txt += " - Einige Schriftzeichen wurden neu gemahlt.\n";
+	txt += " - Die CPU Auslastung des Spiels wurde verringert.\n\n";
+	txt += "Behobene Fehler:\n";
+	txt += " - Bei dem Minigame Fangen ist der Spieler nun nicht mehr Unsichtbar.\n";
+	txt += " - Bei dem Spiel Linie Werden in der Bestenliste nun auch die Teamnamen angezeigt.\n";
+	txt += " - Das Standbild nach jedem online Spiel, das während dem Laden der Spielstatistik auftrat, wurde durch einen flüssigen\n";
+	txt += "   Ladebildschirm ersetzt.\n";
+	txt += " - Einiege Fehler, die das Spiel zum Abstürzen gebracht haben, wurden behoben.\n";
+	txt += "_______________________________________________________________________________________________________________\n";
+	txt += "Patch Notes 0.0.0.32 erschienen am 05.08.2014 um 00:00 Uhr.\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Es ist ab sofort möglich neu erworbene Spielinhalte direkt im Client herunterzuladen, ohne dass das Programm neu gestar-\n";
+	txt += "   tet und der Patcher aktiv werden muss.\n";
+	txt += " - Es gibt eine neue Oberfläche: Die 'Minigames' Oberfläche. Hier können zum Zeitvertreib kleinere Spiele gespielt werden,\n";
+	txt += "   wie zum Beispiel die Klassiker Snake oder Tetris. Alle Minigames sind offline, daher werden keine Spielergebnisse auf\n";
+	txt += "   unseren Servern gespeichert. Alle Ergebnisse werden lokal gespeichert, das heißt, dass nicht zwischen den Ergebnissen\n";
+	txt += "   verschiedener Spieler unterschieden wird.\n";
+	txt += " - Es ist ab sofort möglich mit online Spielen Kupfer zu verdienen.\n";
+	txt += " - In der Team Auswahl für online Spiele wurde ein Fertig Knopf eingefügt. Es muss also nicht mehr gewartet werden, bis\n";
+	txt += "    dieverbleibende Zeit abgelaufen ist.\n\n";
+	txt += "Minigames:\n";
+	txt += " - Blöcke\n";
+	txt += "   In diesem Spiel drängen sich von links immer neue Blöcke mit unterschiedlichen Farben. Klickt man auf eine ansammlung\n";
+	txt += "   von Blöcken mit gleicher Farbe, dann verschwinden sie. Ziel des Spiels ist es möglichst viele Blöcke verschwinden zu\n";
+	txt += "   lassen, bis sie auf der rechten Spielfeldseite angelangt sind.\n";
+	txt += " - Snake\n";
+	txt += "   Bei diesem Spiel lenkt man mit den Pfeiltasten eine Schlange durch ein Feld und versucht dabei möglichst viele Ziele zu\n";
+	txt += "   erreichen. Für jedes Ziel wird die Schlange ein stück länger. Das Spiel ist vorbei, sobald man den Spielfeldrand oder\n";
+	txt += "   sich selbst berührt.\n";
+	txt += " - Fangen\n";
+	txt += "   Bei diesem Spiel lenkt man mit den Pfeiltasten den Spieler durch ein Spielfeld, während man versucht möglichst viele\n";
+	txt += "   bewegliche Ziele zu fangen und gleichzeitig den Gegnern auszuweichen. Die Anzahl der gegner steigt mit jedem Ziel.\n";
+	txt += " - Tetris\n";
+	txt += "   Bei diesem Spiel geht es darum verschiedene Arten von fallenden Blöcken so zu sortieren, dass sie möglichst wenig Platz\n";
+	txt += "   einnehmen. Schafft man es sie lückenlos einzusortieren, dann lösen sie sich auf, stapeln sie sich jedoch bis zum oberen\n";
+	txt += "   Spielfeldrand, ist das Spiel verloren. Man kann die Blöcke mit den Pfeiltasten bewegen und drehen.";
+	initTextFeld( news, 2, 23, breite - 4, 475, txt, 0x1101 );
+	news.updateVScroll();
+	news.setVScrollZuZeile( 0 );
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setText( t );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+}
+
+func bool maus( MausEreignis me )
+{
+	news.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	return news.tick( z );
+}
+
+func void render( Bild rObj )
+{
+	überschrift.render( rObj );
+	news.render( rObj );
+}

+ 1 - 0
Test/d

@@ -0,0 +1 @@
+xV4

+ 1133 - 0
Test/framework.cpp

@@ -0,0 +1,1133 @@
+#include <d3d11.h>
+#include <Array.h>
+#include <Punkt.h>
+#include <Bild.h>
+#include <Fenster.h>
+#include <Text.h>
+#include <Zeichnung.h>
+#include <Globals.h>
+#include <Zeit.h>
+#include <ToolTip.h>
+#include <MausEreignis.h>
+#include <TextFeld.h>
+#include <TastaturEreignis.h>
+#include <RenderThread.h>
+#include <iostream>
+#include <Bildschirm.h>
+#include <d3dx10math.h>
+#include <d3dx11async.h>
+
+using namespace Framework;
+
+namespace Framework2
+{
+    //Diese Klasse wird das Bild auf dem Bildschirm verwalten
+    class Bildschirm : public Framework::Bildschirm
+    {
+    private:
+        struct VertexType
+        {
+            D3DXVECTOR3 position;
+            D3DXVECTOR2 texture;
+        };
+        struct MatrixBufferType
+        {
+            D3DXMATRIX world;
+            D3DXMATRIX view;
+            D3DXMATRIX projection;
+        };
+        ID3D11Device *d3d11Device;
+        ID3D11DeviceContext *d3d11Context;
+        IDXGISwapChain *d3d11SpawChain;
+        ID3D11Texture2D *d3d11FrameworkBuffer;
+        ID3D11Buffer *vertexBuffer, *indexBuffer;
+        ID3D11VertexShader* vertexShader;
+        ID3D11PixelShader* pixelShader;
+        ID3D11InputLayout* layout;
+        ID3D11Buffer* matrixBuffer;
+        ID3D11SamplerState* sampleState;
+        ID3D11ShaderResourceView *resource;
+        ID3D11RenderTargetView *rtview;
+        ID3D11DepthStencilView *dsView;
+        ID3D11Texture2D *depthStencilBuffer;
+        ID3D11DepthStencilState *depthStencilState;
+        ID3D11RasterizerState *rasterizerState;
+        ID3D11DepthStencilState *depthDisabledStencilState;
+        ID3D11BlendState *blendStateAlphaBlend;
+
+        WFenster *fenster;
+        Bild *renderB;
+        int ref;
+        ZeichnungArray *members;
+        int füllFarbe;
+        int deckFarbe;
+        Zeichnung *onTop;
+        bool renderOnTop;
+        bool renderZeichnungen;
+        bool vollbild;
+        bool rendering;
+        ZeitMesser *renderZeit;
+        Punkt backBufferGröße;
+        CRITICAL_SECTION cs;
+        RCArray< ToolTip > *tips;
+        int tipAnzahl;
+        bool testRend;
+        bool füll;
+        bool rend;
+
+    public:
+        // Konstruktor 
+        Bildschirm( WFenster *fenster )
+            : Framework::Bildschirm( 0 ),
+            d3d11Device( 0 ),
+            d3d11Context( 0 ),
+            d3d11SpawChain( 0 ),
+            d3d11FrameworkBuffer( 0 ),
+            vertexBuffer( 0 ),
+            indexBuffer( 0 ),
+            vertexShader( 0 ),
+            pixelShader( 0 ),
+            layout( 0 ),
+            matrixBuffer( 0 ),
+            sampleState( 0 ),
+            resource( 0 ),
+            rtview( 0 ),
+            dsView( 0 ),
+            depthStencilBuffer( 0 ),
+            depthStencilState( 0 ),
+            rasterizerState( 0 ),
+            depthDisabledStencilState( 0 ),
+            blendStateAlphaBlend( 0 ),
+            fenster( fenster ),
+            renderB( new Bild( 1 ) ),
+            ref( 1 ),
+            members( new ZeichnungArray() ),
+            füllFarbe( 0 ),
+            deckFarbe( 0 ),
+            onTop( 0 ),
+            renderOnTop( 0 ),
+            renderZeichnungen( 1 ),
+            vollbild( 0 ),
+            rendering( 0 ),
+            renderZeit( new ZeitMesser() ),
+            backBufferGröße( 0, 0 ),
+            tips( new RCArray< ToolTip >() ),
+            tipAnzahl( 0 ),
+            testRend( 1 ),
+            füll( 1 ),
+            rend( 0 )
+        {
+            InitializeCriticalSection( &cs );
+        }
+        // Destruktor 
+        ~Bildschirm()
+        {
+            lock();
+            if( renderB )
+                renderB->release();
+            if( d3d11Device )
+            {
+                d3d11Device->Release();
+                d3d11Device = NULL;
+            }
+            if( d3d11Context )
+            {
+                d3d11Context->Release();
+                d3d11Context = NULL;
+            }
+            if( d3d11SpawChain )
+            {
+                d3d11SpawChain->Release();
+                d3d11SpawChain = NULL;
+            }
+            if( d3d11FrameworkBuffer )
+            {
+                d3d11FrameworkBuffer->Release();
+                d3d11FrameworkBuffer = NULL;
+            }
+            if( vertexBuffer )
+            {
+                vertexBuffer->Release();
+                vertexBuffer = NULL;
+            }
+            if( indexBuffer )
+            {
+                indexBuffer->Release();
+                indexBuffer = NULL;
+            }
+            if( pixelShader )
+            {
+                pixelShader->Release();
+                pixelShader = NULL;
+            }
+            if( vertexShader )
+            {
+                vertexShader->Release();
+                vertexShader = NULL;
+            }
+            if( layout )
+            {
+                layout->Release();
+                layout = 0;
+            }
+            if( matrixBuffer )
+            {
+                matrixBuffer->Release();
+                matrixBuffer = 0;
+            }
+            if( sampleState )
+            {
+                sampleState->Release();
+                sampleState = 0;
+            }
+            if( resource )
+            {
+                resource->Release();
+                resource = 0;
+            }
+            if( rtview )
+            {
+                rtview->Release();
+                rtview = 0;
+            }
+            if( dsView )
+            {
+                dsView->Release();
+                dsView = 0;
+            }
+            if( depthStencilBuffer )
+            {
+                depthStencilBuffer->Release();
+                depthStencilBuffer = 0;
+            }
+            if( depthStencilState )
+            {
+                depthStencilState->Release();
+                depthStencilState = 0;
+            }
+            if( rasterizerState )
+            {
+                rasterizerState->Release();
+                rasterizerState = 0;
+            }
+            if( depthDisabledStencilState )
+            {
+                depthDisabledStencilState->Release();
+                depthDisabledStencilState = 0;
+            }
+            if( blendStateAlphaBlend )
+            {
+                blendStateAlphaBlend->Release();
+                blendStateAlphaBlend = 0;
+            }
+            if( fenster )
+                fenster->release();
+            delete members;
+            tipAnzahl = 0;
+            tips->release();
+            renderZeit->release();
+            unlock();
+            DeleteCriticalSection( &cs );
+        }
+        // nicht constant 
+        void lock()
+        {
+            EnterCriticalSection( &cs );
+        }
+        void unlock()
+        {
+            LeaveCriticalSection( &cs );
+        }
+        void setFüll( bool f )
+        {
+            füll = f;
+        }
+        void update()
+        {
+            lock();
+            HRESULT result;
+
+            //------------------------------------------------------
+            // Clean up
+            if( d3d11Device )
+            {
+                d3d11Device->Release();
+                d3d11Device = 0;
+            }
+            if( d3d11Context )
+            {
+                d3d11Context->Release();
+                d3d11Context = 0;
+            }
+            if( d3d11SpawChain )
+            {
+                d3d11SpawChain->Release();
+                d3d11SpawChain = NULL;
+            }
+            if( d3d11FrameworkBuffer )
+            {
+                d3d11FrameworkBuffer->Release();
+                d3d11FrameworkBuffer = 0;
+            }
+            if( vertexBuffer )
+            {
+                vertexBuffer->Release();
+                vertexBuffer = NULL;
+            }
+            if( indexBuffer )
+            {
+                indexBuffer->Release();
+                indexBuffer = NULL;
+            }
+            if( pixelShader )
+            {
+                pixelShader->Release();
+                pixelShader = NULL;
+            }
+            if( vertexShader )
+            {
+                vertexShader->Release();
+                vertexShader = NULL;
+            }
+            if( layout )
+            {
+                layout->Release();
+                layout = 0;
+            }
+            if( matrixBuffer )
+            {
+                matrixBuffer->Release();
+                matrixBuffer = 0;
+            }
+            if( sampleState )
+            {
+                sampleState->Release();
+                sampleState = 0;
+            }
+            if( resource )
+            {
+                resource->Release();
+                resource = 0;
+            }
+            if( rtview )
+            {
+                rtview->Release();
+                rtview = 0;
+            }
+            if( dsView )
+            {
+                dsView->Release();
+                dsView = 0;
+            }
+            if( depthStencilBuffer )
+            {
+                depthStencilBuffer->Release();
+                depthStencilBuffer = 0;
+            }
+            if( depthStencilState )
+            {
+                depthStencilState->Release();
+                depthStencilState = 0;
+            }
+            if( rasterizerState )
+            {
+                rasterizerState->Release();
+                rasterizerState = 0;
+            }
+            if( depthDisabledStencilState )
+            {
+                depthDisabledStencilState->Release();
+                depthDisabledStencilState = 0;
+            }
+            if( blendStateAlphaBlend )
+            {
+                blendStateAlphaBlend->Release();
+                blendStateAlphaBlend = 0;
+            }
+            //--------------------------------------------------------------------
+            // Create Device
+
+            // create a struct to hold information about the swap chain
+            DXGI_SWAP_CHAIN_DESC scd;
+
+            // clear out the struct for use
+            ZeroMemory( &scd, sizeof( DXGI_SWAP_CHAIN_DESC ) );
+
+            // fill the swap chain description struct
+            scd.BufferCount = 1;                                           // one back buffer
+            scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;             // how swap chain is to be used
+            scd.OutputWindow = fenster ? fenster->getFensterHandle() : 0;  // the window to be used
+            scd.SampleDesc.Count = 1;
+            // Set the scan line ordering and scaling to unspecified.
+            scd.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
+            scd.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
+            scd.Windowed = !vollbild;
+            if( !backBufferGröße.x || !backBufferGröße.y )
+                backBufferGröße = fenster ? fenster->getKörperGröße() : Punkt( 0, 0 );
+            scd.BufferDesc.Width = backBufferGröße.x;
+            scd.BufferDesc.Height = backBufferGröße.y;                 // windowed/full-screen mode
+            scd.BufferDesc.RefreshRate.Denominator = 1;
+            scd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;       // use 32-bit color
+            // Discard the back buffer contents after presenting.
+            scd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+            if( renderB )
+                renderB->release();
+            renderB = new Bild( 1 );
+            renderB->neuBild( backBufferGröße.x, backBufferGröße.y, füllFarbe );
+
+            D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0;
+            // create a device, device context and swap chain using the information in the scd struct
+            D3D11CreateDeviceAndSwapChain( NULL,
+                                           D3D_DRIVER_TYPE_HARDWARE,
+                                           NULL,
+                                           D3D11_CREATE_DEVICE_DEBUG,
+                                           &featureLevel,
+                                           1,
+                                           D3D11_SDK_VERSION,
+                                           &scd,
+                                           &d3d11SpawChain,
+                                           &d3d11Device,
+                                           NULL,
+                                           &d3d11Context );
+
+            ID3D11Texture2D *backBufferPtr;
+            // Get the pointer to the back buffer.
+            result = d3d11SpawChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), (LPVOID*)&backBufferPtr );
+            // Create the render target view with the back buffer pointer.
+            result = d3d11Device->CreateRenderTargetView( backBufferPtr, NULL, &rtview );
+            // Release pointer to the back buffer as we no longer need it.
+            backBufferPtr->Release();
+            // Initialize the description of the depth buffer.
+            D3D11_TEXTURE2D_DESC depthBufferDesc;
+            ZeroMemory( &depthBufferDesc, sizeof( depthBufferDesc ) );
+            // Set up the description of the depth buffer.
+            depthBufferDesc.Width = backBufferGröße.x;
+            depthBufferDesc.Height = backBufferGröße.y;
+            depthBufferDesc.MipLevels = 1;
+            depthBufferDesc.ArraySize = 1;
+            depthBufferDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
+            depthBufferDesc.SampleDesc.Count = 1;
+            depthBufferDesc.Usage = D3D11_USAGE_DEFAULT;
+            depthBufferDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
+            // Create the texture for the depth buffer using the filled out description.
+            result = d3d11Device->CreateTexture2D( &depthBufferDesc, NULL, &depthStencilBuffer );
+
+            // Initialize the description of the stencil state.
+            D3D11_DEPTH_STENCIL_DESC depthStencilDesc;
+            ZeroMemory( &depthStencilDesc, sizeof( depthStencilDesc ) );
+
+            // Set up the description of the stencil state.
+            depthStencilDesc.DepthEnable = true;
+            depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
+            depthStencilDesc.DepthFunc = D3D11_COMPARISON_LESS;
+
+            depthStencilDesc.StencilEnable = true;
+            depthStencilDesc.StencilReadMask = 0xFF;
+            depthStencilDesc.StencilWriteMask = 0xFF;
+
+            // Stencil operations if pixel is front-facing.
+            depthStencilDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
+            depthStencilDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
+            depthStencilDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
+            depthStencilDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
+
+            // Stencil operations if pixel is back-facing.
+            depthStencilDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
+            depthStencilDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
+            depthStencilDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
+            depthStencilDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
+
+            // Create the depth stencil state.
+            result = d3d11Device->CreateDepthStencilState( &depthStencilDesc, &depthStencilState );
+
+            // Set the depth stencil state.
+            d3d11Context->OMSetDepthStencilState( depthStencilState, 1 );
+
+            // Initialize the depth stencil view.
+            D3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc;
+            ZeroMemory( &depthStencilViewDesc, sizeof( depthStencilViewDesc ) );
+
+            // Set up the depth stencil view description.
+            depthStencilViewDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
+            depthStencilViewDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
+
+            // Create the depth stencil view.
+            result = d3d11Device->CreateDepthStencilView( depthStencilBuffer, &depthStencilViewDesc, &dsView );
+            // Bind the render target view and depth stencil buffer to the output render pipeline.
+            d3d11Context->OMSetRenderTargets( 1, &rtview, dsView );
+
+            D3D11_RASTERIZER_DESC rasterDesc;
+            // Setup the raster description which will determine how and what polygons will be drawn.
+            rasterDesc.AntialiasedLineEnable = false;
+            rasterDesc.CullMode = D3D11_CULL_BACK;
+            rasterDesc.DepthBiasClamp = 0.0f;
+            rasterDesc.DepthClipEnable = true;
+            rasterDesc.FillMode = D3D11_FILL_SOLID;
+            rasterDesc.FrontCounterClockwise = false;
+            rasterDesc.MultisampleEnable = false;
+            rasterDesc.ScissorEnable = false;
+            rasterDesc.SlopeScaledDepthBias = 0.0f;
+            // Create the rasterizer state from the description we just filled out.
+            result = d3d11Device->CreateRasterizerState( &rasterDesc, &rasterizerState );
+            // Now set the rasterizer state.
+            d3d11Context->RSSetState( rasterizerState );
+
+            D3D11_VIEWPORT vp;
+            memset( &vp, 0, sizeof( D3D11_VIEWPORT ) );
+            vp.Width = backBufferGröße.x;
+            vp.Height = backBufferGröße.y;
+            vp.MinDepth = 0.0f;
+            vp.MaxDepth = 1.0f;
+            vp.TopLeftX = 0.0f;
+            vp.TopLeftY = 0.0f;
+            d3d11Context->RSSetViewports( 1, &vp );
+
+            D3D11_DEPTH_STENCIL_DESC depthDisabledStencilDesc;
+            // Clear the second depth stencil state before setting the parameters.
+            ZeroMemory( &depthDisabledStencilDesc, sizeof( depthDisabledStencilDesc ) );
+
+            // Now create a second depth stencil state which turns off the Z buffer for 2D rendering.  The only difference is 
+            // that DepthEnable is set to false, all other parameters are the same as the other depth stencil state.
+            depthDisabledStencilDesc.DepthEnable = false;
+            depthDisabledStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
+            depthDisabledStencilDesc.DepthFunc = D3D11_COMPARISON_LESS;
+            depthDisabledStencilDesc.StencilEnable = true;
+            depthDisabledStencilDesc.StencilReadMask = 0xFF;
+            depthDisabledStencilDesc.StencilWriteMask = 0xFF;
+            depthDisabledStencilDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
+            depthDisabledStencilDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
+            depthDisabledStencilDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
+            depthDisabledStencilDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
+            depthDisabledStencilDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
+            depthDisabledStencilDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
+            depthDisabledStencilDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
+            depthDisabledStencilDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
+
+            // Create the state using the device.
+            result = d3d11Device->CreateDepthStencilState( &depthDisabledStencilDesc, &depthDisabledStencilState );
+
+            //-------------------------------------------------
+            // Shaders
+            ID3D10Blob* errorMessage;
+            ID3D10Blob* vertexShaderBuffer;
+            ID3D10Blob* pixelShaderBuffer;
+            D3D11_INPUT_ELEMENT_DESC polygonLayout[ 2 ];
+
+            result = D3DX11CompileFromFile( "texture.vs", NULL, NULL, "TextureVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_DEBUG, 0, NULL,
+                                            &vertexShaderBuffer, &errorMessage, NULL );
+
+            if( errorMessage )
+            {
+                char *err = (char*)errorMessage->GetBufferPointer();
+                std::cout << err;
+            }
+
+            result = D3DX11CompileFromFile( "texture.ps", NULL, NULL, "TexturePixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_DEBUG, 0, NULL,
+                                            &pixelShaderBuffer, &errorMessage, NULL );
+
+            if( errorMessage )
+            {
+                char *err = (char*)errorMessage->GetBufferPointer();
+                std::cout << err;
+            }
+
+            result = d3d11Device->CreateVertexShader( vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), NULL, &vertexShader );
+            result = d3d11Device->CreatePixelShader( pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), NULL, &pixelShader );
+
+            // Create the vertex input layout description.
+            // This setup needs to match the VertexType stucture in the ModelClass and in the shader.
+            polygonLayout[ 0 ].SemanticName = "POSITION";
+            polygonLayout[ 0 ].SemanticIndex = 0;
+            polygonLayout[ 0 ].Format = DXGI_FORMAT_R32G32B32_FLOAT;
+            polygonLayout[ 0 ].InputSlot = 0;
+            polygonLayout[ 0 ].AlignedByteOffset = 0;
+            polygonLayout[ 0 ].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
+            polygonLayout[ 0 ].InstanceDataStepRate = 0;
+
+            polygonLayout[ 1 ].SemanticName = "TEXCOORD";
+            polygonLayout[ 1 ].SemanticIndex = 0;
+            polygonLayout[ 1 ].Format = DXGI_FORMAT_R32G32_FLOAT;
+            polygonLayout[ 1 ].InputSlot = 0;
+            polygonLayout[ 1 ].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
+            polygonLayout[ 1 ].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
+            polygonLayout[ 1 ].InstanceDataStepRate = 0;
+
+            // Get a count of the elements in the layout.
+            unsigned int numElements = sizeof( polygonLayout ) / sizeof( polygonLayout[ 0 ] );
+
+            // Create the vertex input layout.
+            result = d3d11Device->CreateInputLayout( polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(),
+                                                     &layout );
+
+            // Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
+            vertexShaderBuffer->Release();
+            vertexShaderBuffer = 0;
+
+            pixelShaderBuffer->Release();
+            pixelShaderBuffer = 0;
+
+            // Setup the description of the dynamic matrix constant buffer that is in the vertex shader.
+            D3D11_BUFFER_DESC matrixBufferDesc;
+            matrixBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
+            matrixBufferDesc.ByteWidth = sizeof( MatrixBufferType );
+            matrixBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+            matrixBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+            matrixBufferDesc.MiscFlags = 0;
+            matrixBufferDesc.StructureByteStride = 0;
+
+            // Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
+            result = d3d11Device->CreateBuffer( &matrixBufferDesc, NULL, &matrixBuffer );
+
+            // Create a texture sampler state description.
+            D3D11_SAMPLER_DESC samplerDesc;
+            samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
+            samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
+            samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
+            samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
+            samplerDesc.MipLODBias = 0.0f;
+            samplerDesc.MaxAnisotropy = 1;
+            samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
+            samplerDesc.BorderColor[ 0 ] = 0;
+            samplerDesc.BorderColor[ 1 ] = 0;
+            samplerDesc.BorderColor[ 2 ] = 0;
+            samplerDesc.BorderColor[ 3 ] = 0;
+            samplerDesc.MinLOD = 0;
+            samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
+
+            // Create the texture sampler state.
+            result = d3d11Device->CreateSamplerState( &samplerDesc, &sampleState );
+
+            //---------------------------------------------------------------
+            // Framework Backbuffer Texture
+
+            D3D11_BUFFER_DESC vertexBufferDesc, indexBufferDesc;
+            D3D11_SUBRESOURCE_DATA vertexData, indexData;
+
+            unsigned long indices[ 6 ];
+            VertexType vertices[ 6 ];
+
+            // Load the index array with data.
+            for( int i = 0; i < 6; i++ )
+            {
+                indices[ i ] = i;
+            }
+            vertexBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
+            vertexBufferDesc.ByteWidth = sizeof( vertices );
+            vertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+            vertexBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+            vertexBufferDesc.MiscFlags = 0;
+            vertexBufferDesc.StructureByteStride = 0;
+
+            // Give the subresource structure a pointer to the vertex data.
+            vertexData.pSysMem = vertices;
+            vertexData.SysMemPitch = 0;
+            vertexData.SysMemSlicePitch = 0;
+
+            // Now create the vertex buffer.
+            result = d3d11Device->CreateBuffer( &vertexBufferDesc, &vertexData, &vertexBuffer );
+
+            // Set up the description of the static index buffer.
+            indexBufferDesc.Usage = D3D11_USAGE_DEFAULT;
+            indexBufferDesc.ByteWidth = sizeof( unsigned long ) * 6;
+            indexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
+            indexBufferDesc.CPUAccessFlags = 0;
+            indexBufferDesc.MiscFlags = 0;
+            indexBufferDesc.StructureByteStride = 0;
+
+            // Give the subresource structure a pointer to the index data.
+            indexData.pSysMem = indices;
+            indexData.SysMemPitch = 0;
+            indexData.SysMemSlicePitch = 0;
+
+            // Create the index buffer.
+            result = d3d11Device->CreateBuffer( &indexBufferDesc, &indexData, &indexBuffer );
+
+            D3D11_TEXTURE2D_DESC bufferDesc;
+            memset( &bufferDesc, 0, sizeof( D3D11_TEXTURE2D_DESC ) );
+            bufferDesc.ArraySize = 1;
+            bufferDesc.Width = backBufferGröße.x;
+            bufferDesc.Height = backBufferGröße.y;
+            bufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
+            bufferDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
+            bufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+            bufferDesc.SampleDesc.Count = 1;
+            bufferDesc.MipLevels = 1;
+            bufferDesc.Usage = D3D11_USAGE_DYNAMIC;
+
+            d3d11Device->CreateTexture2D( &bufferDesc, 0, &d3d11FrameworkBuffer );
+
+            D3D11_SHADER_RESOURCE_VIEW_DESC resourceDesk;
+            memset( &resourceDesk, 0, sizeof( D3D11_SHADER_RESOURCE_VIEW_DESC ) );
+            resourceDesk.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
+            resourceDesk.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
+            resourceDesk.Texture2D.MipLevels = 1;
+            d3d11Device->CreateShaderResourceView( d3d11FrameworkBuffer, &resourceDesk, &resource );
+
+            //resource->Release();
+            //result = D3DX11CreateShaderResourceViewFromFile( d3d11Device, "seafloor.dds", NULL, NULL, &resource, NULL );
+
+            float left, right, top, bottom;
+            // Calculate the screen coordinates of the left side of the bitmap.
+            left = (float)( ( backBufferGröße.x / 2.0 ) * -1 );
+
+            // Calculate the screen coordinates of the right side of the bitmap.
+            right = left + (float)backBufferGröße.x;
+
+            // Calculate the screen coordinates of the top of the bitmap.
+            top = (float)( backBufferGröße.y / 2.0 );
+
+            // Calculate the screen coordinates of the bottom of the bitmap.
+            bottom = top - (float)backBufferGröße.y;
+
+            // Load the vertex array with data.
+            // First triangle.
+            vertices[ 0 ].position = D3DXVECTOR3( left, top, 0.0f );  // Top left.
+            vertices[ 0 ].texture = D3DXVECTOR2( 0.0f, 0.0f );
+
+            vertices[ 1 ].position = D3DXVECTOR3( right, bottom, 0.0f );  // Bottom right.
+            vertices[ 1 ].texture = D3DXVECTOR2( 1.0f, 1.0f );
+
+            vertices[ 2 ].position = D3DXVECTOR3( left, bottom, 0.0f );  // Bottom left.
+            vertices[ 2 ].texture = D3DXVECTOR2( 0.0f, 1.0f );
+
+            // Second triangle.
+            vertices[ 3 ].position = D3DXVECTOR3( left, top, 0.0f );  // Top left.
+            vertices[ 3 ].texture = D3DXVECTOR2( 0.0f, 0.0f );
+
+            vertices[ 4 ].position = D3DXVECTOR3( right, top, 0.0f );  // Top right.
+            vertices[ 4 ].texture = D3DXVECTOR2( 1.0f, 0.0f );
+
+            vertices[ 5 ].position = D3DXVECTOR3( right, bottom, 0.0f );  // Bottom right.
+            vertices[ 5 ].texture = D3DXVECTOR2( 1.0f, 1.0f );
+
+
+            D3D11_MAPPED_SUBRESOURCE mappedResource;
+            // Lock the vertex buffer so it can be written to.
+            result = d3d11Context->Map( vertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource );
+
+            // Copy the data into the vertex buffer.
+            memcpy( mappedResource.pData, (void*)vertices, ( sizeof( VertexType ) * 6 ) );
+
+            // Unlock the vertex buffer.
+            d3d11Context->Unmap( vertexBuffer, 0 );
+
+            D3D11_BLEND_DESC blendState;
+            ZeroMemory( &blendState, sizeof( D3D10_BLEND_DESC ) );
+            blendState.AlphaToCoverageEnable = false;
+            blendState.IndependentBlendEnable = false;
+            blendState.RenderTarget[ 0 ].BlendEnable = true;
+            blendState.RenderTarget[ 0 ].SrcBlend = D3D11_BLEND_SRC_ALPHA;
+            blendState.RenderTarget[ 0 ].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
+            blendState.RenderTarget[ 0 ].BlendOp = D3D11_BLEND_OP_ADD;
+            blendState.RenderTarget[ 0 ].SrcBlendAlpha = D3D11_BLEND_ZERO;
+            blendState.RenderTarget[ 0 ].DestBlendAlpha = D3D11_BLEND_ONE;
+            blendState.RenderTarget[ 0 ].BlendOpAlpha = D3D11_BLEND_OP_ADD;
+            blendState.RenderTarget[ 0 ].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
+
+            d3d11Device->CreateBlendState( &blendState, &blendStateAlphaBlend );
+
+            rend = 1;
+            unlock();
+        }
+        void setTestRend( bool tr )
+        {
+            testRend = tr;
+        }
+        void setRenderZeichnungen( bool rO )
+        {
+            lock();
+            renderZeichnungen = rO;
+            rend = 1;
+            unlock();
+        }
+        void setOnTop( bool onTop )
+        {
+            renderOnTop = onTop;
+            rend = 1;
+        }
+        void setOnTopZeichnung( Zeichnung *obj )
+        {
+            lock();
+            onTop = obj;
+            rend = 1;
+            unlock();
+        }
+        void setdeckFarbe( int f )
+        {
+            deckFarbe = f;
+            rend = 1;
+        }
+        void addMember( Zeichnung *obj )
+        {
+            lock();
+            members->addZeichnung( obj );
+            members->updateIndex( 0 );
+            rend = 1;
+            unlock();
+        }
+        void removeMember( Zeichnung *obj )
+        {
+            lock();
+            members->removeZeichnung( obj );
+            members->updateIndex( 0 );
+            rend = 1;
+            unlock();
+        }
+        void render()
+        {
+            if( !rend && testRend )
+                return;
+            rendering = 1;
+            int count = 0;
+            if( renderB && d3d11Device )
+            {
+                lock();
+                renderZeit->messungStart();
+                float color[ 4 ];
+                // Setup the color to clear the buffer to.
+                color[ 0 ] = 0;
+                color[ 1 ] = 0;
+                color[ 2 ] = 0;
+                color[ 3 ] = 0;
+                // Clear the back buffer.
+                d3d11Context->ClearRenderTargetView( rtview, color );
+                // Clear the depth buffer.
+                d3d11Context->ClearDepthStencilView( dsView, D3D11_CLEAR_DEPTH, 1.0f, 0 );
+                if( füll )
+                    renderB->setFarbe( füllFarbe );
+                if( renderZeichnungen )
+                {
+                    if( renderOnTop && deckFarbe && ( deckFarbe & ( füllFarbe | 0xFF000000 ) ) == deckFarbe )
+                    {
+                        renderB->setAlpha( 255 - (unsigned char)( deckFarbe >> 24 ) );
+                        members->render( *renderB ); // zeichnen nach zwischenbuffer
+                        renderB->releaseAlpha();
+                    }
+                    else
+                    {
+                        members->render( *renderB ); // zeichnen nach zwischenbuffer
+                        if( renderOnTop && deckFarbe )
+                            renderB->alphaRegion( 0, 0, renderB->getBreite(), renderB->getHöhe(), deckFarbe );
+                    }
+                    for( int i = 0; i < tipAnzahl; ++i )
+                        tips->z( i )->render( *renderB );
+                }
+                if( renderOnTop && onTop )
+                    onTop->render( *renderB );
+                Bild *tmp = renderB->getThis();
+                unlock();
+                // Beginne Bild 
+                HRESULT result;
+                D3D11_MAPPED_SUBRESOURCE buffer;
+                result = d3d11Context->Map( d3d11FrameworkBuffer, 0, D3D11_MAP::D3D11_MAP_WRITE_DISCARD, 0, &buffer );
+                // kopieren zum Bildschrirm 
+                renderB->füllRegion( 100, 100, 100, 100, 0xFF0000FF );
+                int *bgBuff = tmp->getBuffer();
+                int tmpBr = sizeof( D3DCOLOR )* tmp->getBreite();
+                for( int y = 0, pitch = 0, bry = 0; y < tmp->getHöhe(); ++y, pitch += buffer.RowPitch, bry += tmp->getBreite() )
+                    memcpy( &( (BYTE *)buffer.pData )[ pitch ], (void*)&( bgBuff[ bry ] ), tmpBr );
+                // Beende Bild 
+                d3d11Context->Unmap( d3d11FrameworkBuffer, 0 );
+                tmp->release();
+
+                unsigned int stride = sizeof( VertexType );
+                unsigned int offset = 0;
+
+                d3d11Context->IASetVertexBuffers( 0, 1, &vertexBuffer, &stride, &offset );
+                d3d11Context->IASetIndexBuffer( indexBuffer, DXGI_FORMAT_R32_UINT, 0 );
+                d3d11Context->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
+
+                D3D11_MAPPED_SUBRESOURCE mappedResource;
+                MatrixBufferType* dataPtr;
+                result = d3d11Context->Map( matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource );
+                dataPtr = (MatrixBufferType*)mappedResource.pData;
+                D3DXVECTOR3 up, position, lookAt;
+                // Setup the vector that points upwards.
+                up.x = 0.0f;
+                up.y = 1.0f;
+                up.z = 0.0f;
+                // Setup the position of the camera in the world.
+                position.x = 0;
+                position.y = 0;
+                position.z = -backBufferGröße.y * 1.2075;
+                // Setup where the camera is looking by default.
+                lookAt.x = 0.0f;
+                lookAt.y = 0.0f;
+                lookAt.z = 1.0f;
+                // Finally create the view matrix from the three updated vectors.
+                D3DXMatrixLookAtLH( &dataPtr->view, &position, &lookAt, &up );
+
+                // Setup the projection matrix.
+                //float fieldOfView = (float)D3DX_PI / 4.0f;
+                float screenAspect = (float)backBufferGröße.x / (float)backBufferGröße.y;
+
+                // Create the projection matrix for 3D rendering.
+                D3DXMatrixPerspectiveFovLH( &dataPtr->projection, (float)D3DX_PI / 4.0f, screenAspect, 0.1, 10000 );
+
+                // Copy the matrices into the constant buffer.
+                D3DXMatrixIdentity( &dataPtr->world );
+                D3DXMatrixTranspose( &dataPtr->world, &dataPtr->world );
+                D3DXMatrixTranspose( &dataPtr->view, &dataPtr->view );
+                D3DXMatrixTranspose( &dataPtr->projection, &dataPtr->projection );
+
+                // Unlock the constant buffer.
+                d3d11Context->Unmap( matrixBuffer, 0 );
+
+                // Now set the constant buffer in the vertex shader with the updated values.
+                d3d11Context->VSSetConstantBuffers( 0, 1, &matrixBuffer );
+
+                // Set shader texture resource in the pixel shader.
+                d3d11Context->PSSetShaderResources( 0, 1, &resource );
+                // Set the vertex input layout.
+                d3d11Context->IASetInputLayout( layout );
+
+                // Set the vertex and pixel shaders that will be used to render this triangle.
+                d3d11Context->VSSetShader( vertexShader, NULL, 0 );
+                d3d11Context->PSSetShader( pixelShader, NULL, 0 );
+
+                // Set the sampler state in the pixel shader.
+                d3d11Context->PSSetSamplers( 0, 1, &sampleState );
+                d3d11Context->OMSetBlendState( blendStateAlphaBlend, 0, 0xFFFFFFFF );
+
+                d3d11Context->DrawIndexed( 6, 0, 0 );
+
+                result = d3d11SpawChain->Present( 0, 0 );
+                renderZeit->messungEnde();
+                std::cout << renderZeit->getSekunden() << "\n";
+                if( result != S_OK )
+                {
+                    ++count;
+                    update();
+                }
+                else if( count )
+                    --count;
+            }
+            if( !d3d11Device )
+            {
+                ++count;
+                update();
+            }
+            if( count > 10 )
+            {
+                WMessageBox( fenster ? fenster->getFensterHandle() : 0, new Text( "Fehler" ), new Text( "Es ist ein Fehler beim rendern aufgetreten." ), MB_ICONERROR );
+                count = 0;
+            }
+            rendering = 0;
+            rend = 0;
+        }
+        void setFüllFarbe( int f )
+        {
+            füllFarbe = f;
+            rend = 1;
+        }
+        void setVollbild( bool fullscreen )
+        {
+            lock();
+            this->vollbild = fullscreen;
+            rend = 1;
+            unlock();
+        }
+        void tick( double tickval )
+        {
+            lock();
+            if( !renderOnTop )
+            {
+                for( int i = 0; i < tipAnzahl; ++i )
+                    rend |= tips->z( i )->tick( tickval );
+                rend |= members->tick( tickval );
+            }
+            else if( onTop )
+            {
+                rend |= onTop->tick( tickval );
+                for( int i = 0; i < tipAnzahl; ++i )
+                    rend |= tips->z( i )->tick( tickval );
+            }
+            unlock();
+        }
+        void setBackBufferGröße( int breite, int höhe )
+        {
+            lock();
+            backBufferGröße.x = breite;
+            backBufferGröße.y = höhe;
+            rend = 1;
+            unlock();
+        }
+        void setBackBufferGröße( Punkt &größe )
+        {
+            lock();
+            backBufferGröße = größe;
+            rend = 1;
+            unlock();
+        }
+        void doMausEreignis( MausEreignis &me )
+        {
+            int fBr = backBufferGröße.x;
+            int fHö = backBufferGröße.y;
+            if( fenster )
+            {
+                fBr = fenster->getKörperBreite();
+                fHö = fenster->getKörperHöhe();
+            }
+            me.mx = (int)( me.mx * backBufferGröße.x / (double)fBr + 0.5 );
+            me.my = (int)( me.my * backBufferGröße.y / (double)fHö + 0.5 );
+            lock();
+            if( !renderOnTop )
+            {
+                for( int i = 0; i < tipAnzahl; ++i )
+                    tips->z( i )->doMausEreignis( me );
+                members->sendMausAll( me );
+            }
+            else if( onTop )
+            {
+                onTop->doMausEreignis( me );
+                for( int i = 0; i < tipAnzahl; ++i )
+                    tips->z( i )->doMausEreignis( me );
+            }
+            unlock();
+        }
+        void doTastaturEreignis( TastaturEreignis &te )
+        {
+            lock();
+            if( !renderOnTop )
+                members->sendTastaturAll( te );
+            else if( onTop )
+                onTop->doTastaturEreignis( te );
+            unlock();
+        }
+        void addToolTip( ToolTip *tip )
+        {
+            lock();
+            tips->add( tip, tipAnzahl );
+            ++tipAnzahl;
+            rend = 1;
+            unlock();
+        }
+        bool removeToolTip( ToolTip *zTip )
+        {
+            lock();
+            bool gefunden = 0;
+            for( int i = 0; i < tipAnzahl; ++i )
+            {
+                ToolTip *tmp = tips->z( i );
+                if( tmp == zTip )
+                {
+                    tips->lösche( i );
+                    --tipAnzahl;
+                    gefunden = 1;
+                    rend = 1;
+                    break;
+                }
+            }
+            unlock();
+            return gefunden;
+        }
+        Bild *getRenderBild() const
+        {
+            return renderB->getThis();
+        }
+        Bild *zRenderBild() const
+        {
+            return renderB;
+        }
+        ZeichnungArray *getMembers() const
+        {
+            return members;
+        }
+        int getFüllFarbe() const
+        {
+            return füllFarbe;
+        }
+        bool istVolbild() const
+        {
+            return vollbild;
+        }
+        const Punkt &getBackBufferGröße() const
+        {
+            return backBufferGröße;
+        }
+        void warteAufRendern() const
+        {
+            while( rendering )
+            {
+                if( !rendering )
+                    return;
+            }
+        }
+        double getRenderZeit() const
+        {
+            return renderZeit->getSekunden();
+        }
+        Bildschirm *getThis()
+        {
+            ++ref;
+            return this;
+        }
+        Bildschirm *release()
+        {
+            --ref;
+            if( !ref )
+                delete this;
+            return 0;
+        }
+    };
+}
+
+Bildschirm *bs;
+
+void FClose( void *p, void *zF )
+{
+    StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+}
+
+int main()
+{
+    initFramework();
+
+    float a = 0xFF000000;
+    int i = (int)a >> 24;
+
+    WFenster *f = new WFenster();
+    WNDCLASS fc = F_Normal( 0 );
+    fc.lpszClassName = "Test";
+    f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+    f->setSize( 1600, 900 );
+    f->setVSchließAktion( FClose );
+    f->setMausAktion( _ret1ME );
+    f->setTastaturAktion( _ret1TE );
+    f->setAnzeigeModus( 1 );
+
+    bs = new Framework2::Bildschirm( f->getThis() );
+    f->setBildschirm( ( Framework::Bildschirm* )bs->getThis() );
+    bs->setTestRend( 0 );
+
+    RenderTh *r = new RenderTh();
+    r->setBildschirm( ( Framework::Bildschirm* )bs->getThis() );
+    r->setMaxFps( 60 );
+    r->beginn();
+
+    TextFeld *tf = new TextFeld();
+    tf->setPosition( 0, 0 );
+    tf->setGröße( 1600, 900 );
+    tf->setStyle( TextFeld::Style::TextFeld | TextFeld::Style::Hintergrund );
+    tf->setLinienRahmenFarbe( 0xFFFF0000 );
+    tf->setLinienRahmenBreite( 1 );
+    tf->setAlphaFeldFarbe( 0xFF00FF00 );
+    tf->setAlphaFeldStärke( 10 );
+    tf->setHintergrundFarbe( 0xFF0000FF );
+    bs->addMember( tf );
+
+    StartNachrichtenSchleife();
+
+    r->beenden();
+    r->release();
+    f->setBildschirm( 0 );
+    bs->release();
+    f->release();
+    tf->release();
+
+    releaseFramework();
+
+    getchar();
+
+    return 0;
+}

BIN
Test/game.ltdb


BIN
Test/libeay32.dll


BIN
Test/libintl-8.dll


BIN
Test/libpq.dll


+ 382 - 0
Test/linie_normal_shop.cpp

@@ -0,0 +1,382 @@
+#include <KSGSStandart.h>
+
+var int besitzStatus;
+var int erwerbbarStatus;
+var Bild goldBild;
+var Bild silberBild;
+var Bild kupferBild;
+
+class TextErscheinen
+{
+private:
+	var TextFeld beschreibung;
+	var Text txt;
+	var int num;
+	var int län;
+	var double z;
+public:
+	func void init( int besitzStatus )
+	{
+		initTextFeld( beschreibung, 5, 5, 545, 180, "", 0x101 );
+		txt = "Dies ist eine Karte für das Spiel Linie\n";
+		txt += "Maximale Spieleranzahl: 10\n";
+		txt += "Teamanzahl: 10\n";
+		txt += "Maximale Spieler pro Team: 1\n";
+		txt += "Spieltyp: Alle gegen Alle\n";
+		if( besitzStatus == 1 )
+		{
+			txt += "Du besitzt die Testversion dieser Karte.\n";
+			txt += "Anzahl verbleibender Spiele: ";
+			txt += Rückruf( "GetTestVersionVerbleibend" );
+		}
+		if( besitzStatus == 2 )
+		{
+			txt += "Du besitzt die Vollversion dieser Karte.";
+		}
+		län = txt.getLänge();
+		num = 0;
+		z = 0;
+	}
+	func bool next( double zeit )
+	{
+		z += zeit;
+		if( ( z > 0.03 ) && ( num < län ) )
+		{
+			var Text t;
+			t = beschreibung.getText();
+			while( z > 0.03 )
+			{
+				z -= 0.03;
+				t.anhängen( txt.getTeilText( num, num + 1 ) );
+				num += 1;
+				if( num < län )
+				{
+					break;
+				}
+			}
+			beschreibung.setText( t );
+			return true;
+		}
+		return false;
+	}
+	func void render( Bild b )
+	{
+		beschreibung.render( b );
+	}
+};
+
+class TestVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld tve;
+	var TextFeld tvkosten;
+	var TextFeld tvGoldTF;
+	var TextFeld tvSilberTF;
+	var TextFeld tvKupferTF;
+	var BildO tvGoldBildO;
+	var BildO tvSilberBildO;
+	var BildO tvKupferBildO;
+	var Knopf tvKaufen;
+	var TextFeld tvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( tve, 5, 0, 300, 20, "", 0x101 );
+		initTextFeld( tvkosten, 5, 25, 50, 20, "", 0x701 );
+		initTextFeld( tvGoldTF, 60, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvSilberTF, 90, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvKupferTF, 120, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvNGK, 5, 75, 200, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			tve.setText( "10 Spiele Testversion" );
+			tvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 0 );
+			var Text preisT = preis / 10000;
+			tvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			tvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			tvKupferTF.setText( preisT );
+			tvGoldTF.setGrößeNachText();
+			tvSilberTF.setGrößeNachText();
+			tvKupferTF.setGrößeNachText();
+			tvGoldTF.setGröße( tvGoldTF.getBreite(), 20 );
+			tvSilberTF.setGröße( tvSilberTF.getBreite(), 20 );
+			tvKupferTF.setGröße( tvKupferTF.getBreite(), 20 );
+			tvSilberTF.setPosition( tvSilberTF.getX() + tvGoldTF.getBreite(), tvSilberTF.getY() );
+			tvKupferTF.setPosition( tvKupferTF.getX() + tvGoldTF.getBreite() + tvSilberTF.getBreite(), tvSilberTF.getY() );
+			initBildO( tvGoldBildO, 60 + tvGoldTF.getBreite(), 25, goldBild );
+			initBildO( tvSilberBildO, 90 + tvGoldTF.getBreite() + tvSilberTF.getBreite(), 25, silberBild );
+			initBildO( tvKupferBildO, 120 + tvGoldTF.getBreite() + tvSilberTF.getBreite() + tvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( tvKaufen, 5, 50, 100, 20, "Erwerben" );
+			tvKaufen.setMausEreignis( "tvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				tvKaufen.löscheStyle( 0x2 );
+				tvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return tvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		tvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 300, 200 ) )
+			{
+				tve.render( b );
+				tvkosten.render( b );
+				tvGoldTF.render( b );
+				tvSilberTF.render( b );
+				tvKupferTF.render( b );
+				tvGoldBildO.render( b );
+				tvSilberBildO.render( b );
+				tvKupferBildO.render( b );
+				tvKaufen.render( b );
+				tvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+class VollVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld vve;
+	var TextFeld vvkosten;
+	var TextFeld vvGoldTF;
+	var TextFeld vvSilberTF;
+	var TextFeld vvKupferTF;
+	var BildO vvGoldBildO;
+	var BildO vvSilberBildO;
+	var BildO vvKupferBildO;
+	var Knopf vvKaufen;
+	var TextFeld vvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( vve, 0, 0, 100, 20, "", 0x101 );
+		initTextFeld( vvkosten, 410, 25, 50, 20, "", 0x701 );
+		initTextFeld( vvGoldTF, 470, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvSilberTF, 500, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvKupferTF, 530, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvNGK, 390, 75, 160, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			vve.setText( "Vollversion" );
+			vve.setGrößeNachText();
+			vve.setPosition( 550 - vve.getBreite(), vve.getY() );
+			vvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 1 );
+			var Text preisT = preis / 10000;
+			vvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			vvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			vvKupferTF.setText( preisT );
+			vvGoldTF.setGrößeNachText();
+			vvSilberTF.setGrößeNachText();
+			vvKupferTF.setGrößeNachText();
+			vvGoldTF.setGröße( vvGoldTF.getBreite(), 20 );
+			vvSilberTF.setGröße( vvSilberTF.getBreite(), 20 );
+			vvKupferTF.setGröße( vvKupferTF.getBreite(), 20 );
+			vvKupferTF.setPosition( vvKupferTF.getX() - vvKupferTF.getBreite(), vvKupferTF.getY() );
+			vvSilberTF.setPosition( ( vvSilberTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite(), vvSilberTF.getY() );
+			vvGoldTF.setPosition( ( ( vvGoldTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite() ) - vvGoldTF.getBreite(), vvGoldTF.getY() );
+			vvkosten.setPosition( vvGoldTF.getX() - 55, vvkosten.getY() );
+			initBildO( vvGoldBildO, vvGoldTF.getX() + vvGoldTF.getBreite(), 25, goldBild );
+			initBildO( vvSilberBildO, vvSilberTF.getX() + vvSilberTF.getBreite(), 25, silberBild );
+			initBildO( vvKupferBildO, vvKupferTF.getX() + vvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( vvKaufen, 450, 50, 100, 20, "Erwerben" );
+			vvKaufen.setMausEreignis( "vvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				vvKaufen.löscheStyle( 0x2 );
+				vvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return vvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		vvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 700, 200 ) )
+			{
+				vve.render( b );
+				vvkosten.render( b );
+				vvGoldTF.render( b );
+				vvSilberTF.render( b );
+				vvKupferTF.render( b );
+				vvGoldBildO.render( b );
+				vvSilberBildO.render( b );
+				vvKupferBildO.render( b );
+				vvKaufen.render( b );
+				vvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+var TextErscheinen beschreibung;
+var TestVersion tv;
+var VollVersion vv;
+
+func void start()
+{
+	besitzStatus = Rückruf( "GetBesitzStatus" );
+	erwerbbarStatus = Rückruf( "GetErwerbbarStatus" );
+	goldBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/gold.jpg" );
+	silberBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/silber.jpg" );
+	kupferBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/kupfer.jpg" );
+	beschreibung.init( besitzStatus );
+	tv.init();
+	vv.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+	tf.setText( t );
+}
+
+func void initBildO( BildO bo, int x, int y, Bild b )
+{
+	bo.setPosition( x, y );
+	bo.setGröße( b.getBreite(), b.getHöhe() );
+	bo.setStyle( 0x1 );
+	bo.setBild( b );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+	tv.maus( me );
+	vv.maus( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret;
+	ret = beschreibung.next( z );
+	ret |= tv.tick( z );
+	ret |= vv.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	beschreibung.render( rObj );
+	tv.render( rObj );
+	vv.render( rObj );
+}
+
+func bool tvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 0 );
+	}
+	return true;
+}
+
+func bool vvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 1 );
+	}
+	return true;
+}

+ 384 - 0
Test/linie_shop.cpp

@@ -0,0 +1,384 @@
+#include <KSGSStandart.h>
+
+var int besitzStatus;
+var int erwerbbarStatus;
+var Bild goldBild;
+var Bild silberBild;
+var Bild kupferBild;
+
+class TextErscheinen
+{
+private:
+	var TextFeld beschreibung;
+	var Text txt;
+	var int num;
+	var int län;
+	var double z;
+public:
+	func void init( int besitzStatus )
+	{
+		initTextFeld( beschreibung, 5, 5, 545, 180, "", 0x101 );
+		txt = "Bei dem Spiel Linie bewegen sich alle Spieler in einer konstanten Geschwindigkeit\n";
+		txt += "durch ein Spielfeld. Die Sieler können nur auf ihre Richtung einfluss nehmen, indem\n";
+		txt += "sie von sich aus gesehen entweder eine Linkskurve oder eine Rechtskurve machen.\n";
+		txt += "Jeder Spieler hinterlässt beim bewegen eine Linie, die von keinem Spieler berührt\n";
+		txt += "werden darf. Berührt ein Spieler eine solche Linie, hat er die Runde verloren. Jedes\n";
+		txt += "Spiel besteht aus mehreren Runden. Gewinnen tut am ende der Spieler, der in den\n";
+		txt += "meißten Runden am längsten überlebt hat. Viel Spaß beil Spielen!\n";
+		if( besitzStatus == 1 )
+		{
+			txt += "Du besitzt die Testversion dieses Spiels.\n";
+			txt += "Anzahl verbleibender Spiele: ";
+			txt += Rückruf( "GetTestVersionVerbleibend" );
+		}
+		if( besitzStatus == 2 )
+		{
+			txt += "Du besitzt die Vollversion dieses Spiels.";
+		}
+		län = txt.getLänge();
+		num = 0;
+		z = 0;
+	}
+	func bool next( double zeit )
+	{
+		z += zeit;
+		if( ( z > 0.03 ) && ( num < län ) )
+		{
+			var Text t;
+			t = beschreibung.getText();
+			while( z > 0.03 )
+			{
+				z -= 0.03;
+				t.anhängen( txt.getTeilText( num, num + 1 ) );
+				num += 1;
+				if( num < län )
+				{
+					break;
+				}
+			}
+			beschreibung.setText( t );
+			return true;
+		}
+		return false;
+	}
+	func void render( Bild b )
+	{
+		beschreibung.render( b );
+	}
+};
+
+class TestVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld tve;
+	var TextFeld tvkosten;
+	var TextFeld tvGoldTF;
+	var TextFeld tvSilberTF;
+	var TextFeld tvKupferTF;
+	var BildO tvGoldBildO;
+	var BildO tvSilberBildO;
+	var BildO tvKupferBildO;
+	var Knopf tvKaufen;
+	var TextFeld tvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( tve, 5, 0, 300, 20, "", 0x101 );
+		initTextFeld( tvkosten, 5, 25, 50, 20, "", 0x701 );
+		initTextFeld( tvGoldTF, 60, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvSilberTF, 90, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvKupferTF, 120, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvNGK, 5, 75, 200, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			tve.setText( "10 Spiele Testversion" );
+			tvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 0 );
+			var Text preisT = preis / 10000;
+			tvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			tvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			tvKupferTF.setText( preisT );
+			tvGoldTF.setGrößeNachText();
+			tvSilberTF.setGrößeNachText();
+			tvKupferTF.setGrößeNachText();
+			tvGoldTF.setGröße( tvGoldTF.getBreite(), 20 );
+			tvSilberTF.setGröße( tvSilberTF.getBreite(), 20 );
+			tvKupferTF.setGröße( tvKupferTF.getBreite(), 20 );
+			tvSilberTF.setPosition( tvSilberTF.getX() + tvGoldTF.getBreite(), tvSilberTF.getY() );
+			tvKupferTF.setPosition( tvKupferTF.getX() + tvGoldTF.getBreite() + tvSilberTF.getBreite(), tvSilberTF.getY() );
+			initBildO( tvGoldBildO, 60 + tvGoldTF.getBreite(), 25, goldBild );
+			initBildO( tvSilberBildO, 90 + tvGoldTF.getBreite() + tvSilberTF.getBreite(), 25, silberBild );
+			initBildO( tvKupferBildO, 120 + tvGoldTF.getBreite() + tvSilberTF.getBreite() + tvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( tvKaufen, 5, 50, 100, 20, "Erwerben" );
+			tvKaufen.setMausEreignis( "tvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				tvKaufen.löscheStyle( 0x2 );
+				tvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return tvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		tvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 300, 200 ) )
+			{
+				tve.render( b );
+				tvkosten.render( b );
+				tvGoldTF.render( b );
+				tvSilberTF.render( b );
+				tvKupferTF.render( b );
+				tvGoldBildO.render( b );
+				tvSilberBildO.render( b );
+				tvKupferBildO.render( b );
+				tvKaufen.render( b );
+				tvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+class VollVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld vve;
+	var TextFeld vvkosten;
+	var TextFeld vvGoldTF;
+	var TextFeld vvSilberTF;
+	var TextFeld vvKupferTF;
+	var BildO vvGoldBildO;
+	var BildO vvSilberBildO;
+	var BildO vvKupferBildO;
+	var Knopf vvKaufen;
+	var TextFeld vvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( vve, 0, 0, 100, 20, "", 0x101 );
+		initTextFeld( vvkosten, 410, 25, 50, 20, "", 0x701 );
+		initTextFeld( vvGoldTF, 470, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvSilberTF, 500, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvKupferTF, 530, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvNGK, 390, 75, 160, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			vve.setText( "Vollversion" );
+			vve.setGrößeNachText();
+			vve.setPosition( 550 - vve.getBreite(), vve.getY() );
+			vvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 1 );
+			var Text preisT = preis / 10000;
+			vvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			vvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			vvKupferTF.setText( preisT );
+			vvGoldTF.setGrößeNachText();
+			vvSilberTF.setGrößeNachText();
+			vvKupferTF.setGrößeNachText();
+			vvGoldTF.setGröße( vvGoldTF.getBreite(), 20 );
+			vvSilberTF.setGröße( vvSilberTF.getBreite(), 20 );
+			vvKupferTF.setGröße( vvKupferTF.getBreite(), 20 );
+			vvKupferTF.setPosition( vvKupferTF.getX() - vvKupferTF.getBreite(), vvKupferTF.getY() );
+			vvSilberTF.setPosition( ( vvSilberTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite(), vvSilberTF.getY() );
+			vvGoldTF.setPosition( ( ( vvGoldTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite() ) - vvGoldTF.getBreite(), vvGoldTF.getY() );
+			vvkosten.setPosition( vvGoldTF.getX() - 55, vvkosten.getY() );
+			initBildO( vvGoldBildO, vvGoldTF.getX() + vvGoldTF.getBreite(), 25, goldBild );
+			initBildO( vvSilberBildO, vvSilberTF.getX() + vvSilberTF.getBreite(), 25, silberBild );
+			initBildO( vvKupferBildO, vvKupferTF.getX() + vvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( vvKaufen, 450, 50, 100, 20, "Erwerben" );
+			vvKaufen.setMausEreignis( "vvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				vvKaufen.löscheStyle( 0x2 );
+				vvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return vvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		vvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 700, 200 ) )
+			{
+				vve.render( b );
+				vvkosten.render( b );
+				vvGoldTF.render( b );
+				vvSilberTF.render( b );
+				vvKupferTF.render( b );
+				vvGoldBildO.render( b );
+				vvSilberBildO.render( b );
+				vvKupferBildO.render( b );
+				vvKaufen.render( b );
+				vvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+var TextErscheinen beschreibung;
+var TestVersion tv;
+var VollVersion vv;
+
+func void start()
+{
+	besitzStatus = Rückruf( "GetBesitzStatus" );
+	erwerbbarStatus = Rückruf( "GetErwerbbarStatus" );
+	goldBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/gold.jpg" );
+	silberBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/silber.jpg" );
+	kupferBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/kupfer.jpg" );
+	beschreibung.init( besitzStatus );
+	tv.init();
+	vv.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+	tf.setText( t );
+}
+
+func void initBildO( BildO bo, int x, int y, Bild b )
+{
+	bo.setPosition( x, y );
+	bo.setGröße( b.getBreite(), b.getHöhe() );
+	bo.setStyle( 0x1 );
+	bo.setBild( b );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+	tv.maus( me );
+	vv.maus( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret;
+	ret = beschreibung.next( z );
+	ret |= tv.tick( z );
+	ret |= vv.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	beschreibung.render( rObj );
+	tv.render( rObj );
+	vv.render( rObj );
+}
+
+func bool tvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 0 );
+	}
+	return true;
+}
+
+func bool vvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 1 );
+	}
+	return true;
+}

+ 543 - 0
Test/main.cpp

@@ -0,0 +1,543 @@
+#include <Array.h>
+#include <iostream>
+#include <Text.h>
+#include <Fenster.h>
+#include <DateiSystem.h>
+#include <MausEreignis.h>
+#include <TastaturEreignis.h>
+#include <Globals.h>
+#include <Bildschirm.h>
+#include <RenderThread.h>
+#include <Model2D.h>
+#include <Bild.h>
+#include <MausEreignis.h>
+#include <M2Datei.h>
+#include <Vec2.h>
+#include <TextFeld.h>
+
+using namespace Framework;
+Vec2< int > maus;
+
+void FClose( void *p, void *zF )
+{
+	StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+}
+
+bool FMaus( void *p, void *obj, MausEreignis me )
+{
+	return 1;
+}
+
+bool FTastatur( void *p, void *obj, TastaturEreignis te )
+{
+	return 1;
+}
+
+Bild *b;
+Bildschirm *bs;
+double durchschnitt = 0;
+int anz = 0;
+
+
+struct Game
+{
+    int id;
+    int gelb;
+    int rot;
+    short jahrB;
+    short jahrE;
+    char gewonnen;
+    char monB;
+    char tagB;
+    char stuB;
+    char minB;
+    char sekB;
+    char monE;
+    char tagE;
+    char stuE;
+    char minE;
+    char sekE;
+    char züge;
+};
+
+class Obj : public Zeichnung
+{
+public:
+    Obj()
+        : Zeichnung()
+    {
+        setGröße( 1600, 900 );
+    }
+
+    void render( Bild &zRObj )
+    {
+        zRObj.drawBildSkall( 0, 0, 1600, 900, *b );
+        //zRObj.alphaBildSkall( 0, 0, 1600, 900, *b );
+    }
+};
+
+void renderF( void *p, void *obj, Bild *zrObj )
+{
+    std::cout << "RenderZeit: " << bs->getRenderZeit() << " Durchschnitt:" << durchschnitt << "\n";
+    anz++;
+    durchschnitt += (bs->getRenderZeit() - durchschnitt) / anz;
+}
+
+int main()
+{
+
+    std::cout << sizeof( Game );
+    //Sleep( 1000000 );
+    //return 0;
+	initFramework();
+
+	LTDBDatei bd;
+	bd.setDatei( new Text( "test.ltdb" ) );
+	bd.leseDaten( 0 );
+	//b = bd.laden( 0, new Text( "a.png" ) );
+
+	WFenster *f = new WFenster();
+	WNDCLASS fc = F_Normal( 0 );
+	fc.lpszClassName = "Test";
+	f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+	f->setGröße( 1601, 901 );
+	f->setVSchließAktion( FClose );
+	f->setMausAktion( FMaus );
+	f->setTastaturAktion( FTastatur );
+	f->setAnzeigeModus( 1 );
+
+	bs = new Bildschirm3D( f->getThis() );
+	f->setBildschirm( bs->getThis() );
+	bs->setTestRend( 0 );
+	//bs->setFüll( 1 );
+    bs->setFüllFarbe( 0xFFFFFFFF );
+
+    Obj *obj = new Obj();
+    bs->addMember( obj );
+
+	RenderTh *r = new RenderTh();
+	r->setBildschirm( bs->getThis() );
+	r->setMaxFps( 60 );
+	r->setRenderFunktion( renderF );
+	r->beginn();
+
+	StartNachrichtenSchleife();
+
+	r->beenden();
+	r->release();
+
+	f->setBildschirm( 0 );
+	bs->release();
+	f->release();
+    //b->release();
+    delete obj;
+
+	releaseFramework();
+
+	return 0;
+}
+
+
+
+//#include <sql.h>
+//#include <Text.h>
+//#include <iostream>
+//#include <Fenster.h>
+//#include <time.h>
+//#include <Datei.h>
+//#include <Zeit.h>
+//#include <time.h>
+//#include <immintrin.h>
+
+//int main()
+//{
+//    char dir[ 255 ];
+//    getcwd( dir, 255 );
+//    bool b = DateiExistiert( "Framework.dll" );
+//    char *t = new char();
+//    t = 0;
+//	srand( time( 0 ) );
+//	for( int i = 0; i < 20; i++ )
+//	{
+//		std::cout << rand() % 256 << ", ";
+//	}
+//	getchar();
+//	return 0;
+//}
+
+
+//#include <Array.h>
+//#include <iostream>
+//#include <Text.h>
+//#include <Fenster.h>
+//#include <DateiSystem.h>
+//#include <MausEreignis.h>
+//#include <TastaturEreignis.h>
+//#include <Globals.h>
+//#include <Bildschirm.h>
+//#include <RenderThread.h>
+//#include <Model2D.h>
+//#include <Bild.h>
+//#include <MausEreignis.h>
+//#include <M2Datei.h>
+//#include <Vec2.h>
+//#include <TextFeld.h>
+//
+//using namespace Framework;
+//Vec2< int > maus;
+//
+//void FClose( void *p, void *zF )
+//{
+//	StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+//}
+//
+//bool FMaus( void *p, void *obj, MausEreignis me )
+//{
+//	maus = Vec2< int >( me.mx, me.my );
+//	if( me.id == ME_Bewegung && !( ( (Model2D*)p )->istPunktInnen( Punkt( me.mx, me.my ) ) ) )
+//		( (Model2D*)p )->setFarbe( 0xFFFF0000 );
+//	return 1;
+//}
+//
+//bool M2Maus( void *p, void *obj, MausEreignis me )
+//{
+//	( (Model2D*)obj )->setFarbe( 0xFF00FF00 );
+//	if( getMausStand( M_Links ) )
+//		( (Model2D*)obj )->addDrehung( 0.01f );
+//	if( getMausStand( M_Rechts ) )
+//		( (Model2D*)obj )->addDrehung( -0.01f );
+//	if( me.id == ME_UScroll )
+//		( (Model2D*)obj )->addGröße( 0.01f );
+//	if( me.id == ME_DScroll )
+//		( (Model2D*)obj )->addGröße( -0.01f );
+//	( (Model2D*)obj )->setPosition( me.rmx, me.rmy );
+//	return 1;
+//}
+//
+//bool FTastatur( void *p, void *obj, TastaturEreignis te )
+//{
+//	if( getTastenStand( T_Oben ) )
+//		( (Model2D*)p )->setPosition( ( (Model2D*)p )->getX(), ( (Model2D*)p )->getY() - 1 );
+//	if( getTastenStand( T_Rechts ) )
+//		( (Model2D*)p )->setPosition( ( (Model2D*)p )->getX() + 1, ( (Model2D*)p )->getY() );
+//	if( getTastenStand( T_Unten ) )
+//		( (Model2D*)p )->setPosition( ( (Model2D*)p )->getX(), ( (Model2D*)p )->getY() + 1 );
+//	if( getTastenStand( T_Links ) )
+//		( (Model2D*)p )->setPosition( ( (Model2D*)p )->getX() - 1, ( (Model2D*)p )->getY() );
+//	return 1;
+//}
+//
+//char getOutCode( Punkt& p, Bild *zrObj )
+//{
+//	char ret = 0;
+//	if( p.x < 0 )
+//		ret |= 1;
+//	else if( p.x >= zrObj->getBreite() )
+//		ret |= 2;
+//	if( p.y < 0 )
+//		ret |= 4;
+//	else if( p.y >= zrObj->getHöhe() )
+//		ret |= 8;
+//	return ret;
+//}
+//
+//Bild b;
+//
+//void renderF( void *p, void *obj, Bild *zrObj )
+//{
+//	zrObj->setFarbe( 0 );
+//}
+//
+//int main()
+//{
+//	initFramework();
+//
+//	LTDBDatei bd;
+//	bd.setDatei( new Text( "ship.ltdb" ) );
+//	bd.leseDaten( 0 );
+//	Bild *sb = bd.laden( 0, new Text( "ship.png" ) );
+//	b.neuBild( sb->getBreite(), sb->getHöhe(), 0 );
+//	int farbe = 0xFF55FF55;
+//	int maxP = b.getBreite() * b.getHöhe();
+//	int *buffer = sb->getBuffer();
+//	for( int i = 0; i < maxP; i++ )
+//	{
+//		if( buffer[ i ] )
+//		{
+//			b.setPixelDP( i, ( buffer[ i ] & 0xFF000000 ) | ( farbe & 0x00FFFFFF ) );
+//			b.alphaPixelDP( i, buffer[ i ] );
+//		}
+//	}
+//	sb->release();
+//
+//
+//	Model2D *test = new Model2D();
+//	test->setFarbe( 0xFFFFFFFF );
+//	test->setStyle( M2_Style::Sichtbar | /*M2_Style::Rahmen |*/ M2_Style::Textur );
+//	M2Datei m2d;
+//	m2d.setPfad( "ship.m2" );
+//	m2d.leseDaten();
+//	Model2DData *model = m2d.ladeModel( "a" );
+//	test->setTextur( b.getThis() );
+//	test->setModel( model );
+//	test->setMausEreignis( M2Maus );
+//	test->setPosition( 450, 350 );
+//
+//	WFenster *f = new WFenster();
+//	WNDCLASS fc = F_Normal( 0 );
+//	fc.lpszClassName = "Test";
+//	f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+//	f->setGröße( 900, 700 );
+//	f->setVSchließAktion( FClose );
+//	f->setMausAktion( FMaus );
+//	f->setMausEreignisParameter( test );
+//	f->setTastaturEreignisParameter( test );
+//	f->setTastaturAktion( FTastatur );
+//	f->setAnzeigeModus( 1 );
+//
+//	Bildschirm *b = new Bildschirm( f->getThis() );
+//	f->setBildschirm( b->getThis() );
+//	b->setTestRend( 0 );
+//	b->setFüll( 0 );
+//	b->addMember( test );
+//
+//	RenderTh *r = new RenderTh();
+//	r->setBildschirm( b->getThis() );
+//	r->setMaxFps( 60 );
+//	r->setRenderFunktion( renderF );
+//	r->beginn();
+//
+//	StartNachrichtenSchleife();
+//
+//	r->beenden();
+//	r->release();
+//	test->release();
+//
+//	f->setBildschirm( 0 );
+//	b->release();
+//	f->release();
+//
+//	releaseFramework();
+//
+//	return 0;
+//}
+
+//#include <time.h>
+//#include <iostream>
+//#include <Zeit.h>
+//#include <Bild.h>
+//#include <Text.h>
+//using namespace Framework;
+//#include <GSLSoundV.h>
+//
+//using namespace std;
+//
+//#include <iostream>
+//#include <Fenster.h>
+//#include <Bildschirm.h>
+//#include <RenderThread.h>
+//#include <KSGScript.h>
+//#include <MausEreignis.h>
+//#include <TastaturEreignis.h>
+//#include <Schrift.h>
+//#include <DateiSystem.h>
+//#include <time.h>
+//#include <Textfeld.h>
+//#include <Datei.h>
+//
+//namespace Framework
+//{
+//	void initFramework();
+//	void releaseFramework();
+//}
+//
+//using namespace Framework;
+//using namespace KSGScript;
+//
+//KSGScriptObj *obj;
+//
+//void FClose( void *p, void *zF )
+//{
+//	StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+//}
+//
+//void ksgsRückruf( void *p, RCArray< KSGSVariable > *param, KSGSVariable **ret )
+//{
+//    int i = 0;
+//}
+//
+//int main()
+//{
+//#ifdef _DEBUG
+//	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+//#endif
+//	srand( (int)time( 0 ) );
+//	initFramework();
+//	WFenster *f = new WFenster();
+//	WNDCLASS fc = F_Normal( 0 );
+//	fc.lpszClassName = "Test";
+//	f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+//	f->setGröße( 900, 700 );
+//	f->setVSchließAktion( FClose );
+//	f->setMausAktion( _ret1ME );
+//	f->setTastaturAktion( _ret1TE );
+//	f->setAnzeigeModus( 1 );
+//	Bildschirm *b = new Bildschirm( f->getThis() );
+//	f->setBildschirm( b->getThis() );
+//
+//	LTDSDatei *sd = new LTDSDatei();
+//	sd->setPfad( new Text( "normal.ltds" ) );
+//	sd->leseDaten();
+//	Schrift *s = sd->ladeSchrift();
+//	sd->release();
+//
+//	HINSTANCE dll = LoadLibrary( "KSGScript.dll" );
+//	KSGSGetObjekt func = (KSGSGetObjekt)GetProcAddress( dll, KSGS_START_FUNKTION );
+//	KSGSGetVariable vars = (KSGSGetVariable)GetProcAddress( dll, KSGS_VARIABLE_FUNKTION );
+//	obj = func();
+//	obj->setSchriftZ( s->getThis() );
+//	obj->setBildschirmZ( b->getThis() );
+//	obj->setScriptDatei( "tmp.cpp" );
+//	obj->setPosition( 0, 0 );
+//	obj->setGröße( 600, 600 );
+//	obj->setRückrufParam( vars );
+//	obj->setRückrufFunktion( ksgsRückruf );
+//	obj->neuLaden();
+//	b->addMember( obj );
+//	b->update();
+//	RenderTh *r = new RenderTh();
+//	r->setBildschirm( b->getThis() );
+//	r->setMaxFps( 60 );
+//	r->beginn();
+//	StartNachrichtenSchleife();
+//	r->beenden();
+//	r->release();
+//	obj->zurücksetzen();
+//	Sleep( 100 );
+//	b->removeMember( obj );
+//	obj->release();
+//	//FreeLibrary( dll );
+//	f->setBildschirm( 0 );
+//	b->release();
+//	f->release();
+//	s->release();
+//	releaseFramework();
+//	return 0;
+//}
+//
+//#include <ShObjIdl.h>
+//#include <Windows.h>
+//#include <iostream>
+//
+//#pragma comment( lib, "Ole32.lib" )
+//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")	
+//
+//int main()
+//{
+//    int i = 0;
+//    int j = 0;
+//    int p = -2500;
+//    while( j < 100000000 )
+//    {
+//        j += p;
+//        p += 9;
+//        if( p >= 0 && p < 9 )
+//            std::cout << i << "\n";
+//        i++;
+//    }
+//    std::cout << i << " " << j << " " << p << "\n";
+//    Sleep( 100000 );
+//    int län = 100 * 100 * 4;
+//    for( int i = 0, l = län > 2048 ? 2048 : län; län > 0; i += l, län -= l, l = län > 2048 ? 2048 : län )
+//    {       
+//        std::cout << "i:" << i << "\n";
+//        std::cout << "l:" << l << "\n";
+//        std::cout << "län:" << län << "\n\n";
+//    }
+//    // CoCreate the File Open Dialog object.
+//    IFileDialog *pfd = NULL;
+//    CoInitialize( NULL );
+//    HRESULT hr = CoCreateInstance( CLSID_FileOpenDialog,
+//                                   NULL,
+//                                   CLSCTX_INPROC_SERVER,
+//                                   IID_PPV_ARGS( &pfd ) );
+//    if( SUCCEEDED( hr ) )
+//    {
+//        // Create an event handling object, and hook it up to the dialog.
+//        //IFileDialogEvents *pfde = NULL;
+//        //hr = CDialogEventHandler_CreateInstance( IID_PPV_ARGS( &pfde ) );
+//        if( SUCCEEDED( hr ) )
+//        {
+//            // Hook up the event handler.
+//            //DWORD dwCookie;
+//            //hr = pfd->Advise( pfde, &dwCookie );
+//            if( SUCCEEDED( hr ) )
+//            {
+//                // Set the options on the dialog.
+//                DWORD dwFlags;
+//
+//                // Before setting, always get the options first in order 
+//                // not to override existing options.
+//                hr = pfd->GetOptions( &dwFlags );
+//                if( SUCCEEDED( hr ) )
+//                {
+//                    // In this case, get shell items only for file system items.
+//                    hr = pfd->SetOptions( dwFlags | FOS_FORCEFILESYSTEM );
+//                    if( SUCCEEDED( hr ) )
+//                    {
+//                        // Set the file types to display only. 
+//                        // Notice that this is a 1-based array.
+//                        COMDLG_FILTERSPEC c_rgSaveTypes[] =
+//                        {
+//                            { L"szJPG", L"*.jpg;*.jpeg" },
+//                            { L"szPNG", L"*.png" },
+//                            { L"szAll", L"*.*" },
+//                        };
+//                        hr = pfd->SetFileTypes( ARRAYSIZE( c_rgSaveTypes ), c_rgSaveTypes );
+//                        if( SUCCEEDED( hr ) )
+//                        {
+//                            // Set the selected file type index to Word Docs for this example.
+//                            hr = pfd->SetFileTypeIndex( 3 );
+//                            if( SUCCEEDED( hr ) )
+//                            {
+//                                // Set the default extension to be ".doc" file.
+//                                hr = pfd->SetDefaultExtension( L"jpg;jpeg;png" );
+//                                if( SUCCEEDED( hr ) )
+//                                {
+//                                    // Show the dialog
+//                                    hr = pfd->Show( NULL );
+//                                    if( SUCCEEDED( hr ) )
+//                                    {
+//                                        // Obtain the result once the user clicks 
+//                                        // the 'Open' button.
+//                                        // The result is an IShellItem object.
+//                                        IShellItem *psiResult;
+//                                        hr = pfd->GetResult( &psiResult );
+//                                        if( SUCCEEDED( hr ) )
+//                                        {
+//                                            // We are just going to print out the 
+//                                            // name of the file for sample sake.
+//                                            PWSTR pszFilePath = NULL;
+//                                            hr = psiResult->GetDisplayName( SIGDN_FILESYSPATH,
+//                                                                            &pszFilePath );
+//                                            if( SUCCEEDED( hr ) )
+//                                            {
+//                                                
+//                                            }
+//                                            psiResult->Release();
+//                                        }
+//                                    }
+//                                }
+//                            }
+//                        }
+//                    }
+//                }
+//                // Unhook the event handler.
+//                //pfd->Unadvise( dwCookie );
+//            }
+//            //pfde->Release();
+//        }
+//        pfd->Release();
+//    }
+//    return hr;
+//}

BIN
Test/news.ltdb


BIN
Test/normal.ltds


+ 67 - 0
Test/patcher_News.cpp

@@ -0,0 +1,67 @@
+#include <KSGSStandart.h>
+
+var int breite = 480;
+var int höhe = 312;
+var TextFeld überschrift;
+var TextFeld patchNotes;
+var Knopf zurück;
+
+func void start()
+{
+	initTextFeld( überschrift, 0, 0, breite, 20, "News", 0x301 );
+	var Text txt = "";
+	txt += "Keine aktuellen News vorhanden.";
+	initTextFeld( patchNotes, 10, 30, 460, 222, txt, 0x1101 );
+	patchNotes.updateVScroll();
+	patchNotes.setVScrollZuZeile( 0 );
+	initKnopf( zurück, 190, 262, 100, 20, "Zurück", 0x1 );
+	zurück.setMausEreignis( "zME" );
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setText( t );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t, int style )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( style );
+}
+
+func bool maus( MausEreignis me )
+{
+	patchNotes.doMausEreignis( me );
+	zurück.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret = 0;
+	ret |= patchNotes.tick( z );
+	ret |= zurück.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	überschrift.render( rObj );
+	patchNotes.render( rObj );
+	zurück.render( rObj );
+}
+
+func bool zME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Patcher/Start" );
+	}
+	return true;
+}

+ 97 - 0
Test/patcher_PatchNotes.cpp

@@ -0,0 +1,97 @@
+#include <KSGSStandart.h>
+
+var int breite = 480;
+var int höhe = 312;
+var TextFeld überschrift;
+var TextFeld patchNotes;
+var Knopf zurück;
+
+func void start()
+{
+	initTextFeld( überschrift, 0, 0, breite, 20, "Patch Notes", 0x301 );
+	var Text txt = "";
+	txt += "Update: 0.0.0.34 erschienen am 19.10.2014 um 14:00 Uhr\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Minigame 'Asteroids'\n";
+	txt += "Behobene Fehler:\n";
+	txt += " - Verschiebbarkeit des Patchers\n";
+	txt += " - Anzeigefeler in den Patcher Optionen\n";
+	txt += " - Fokus des Client Fensters nach start\n";
+	txt += " - Absturz des Clients beim beenden\n";
+	txt += "__________________________________________________________\n";
+	txt += "Update: 0.0.0.33 erschienen am 24.08.2014. um 11:00 Uhr\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Sounds bei bestimmten Ereignissen\n";
+	txt += " - Neue Schrift\n";
+	txt += " - Die CPU Auslastung verringert\n";
+	txt += "Behobene Fehler:\n";
+	txt += " - Minigame Fangen: Sichtbarkeit des Spielers\n";
+	txt += " - Spiel Linie: Anzeigefehler in der Bestenliste\n";
+	txt += " - Stillstand nach Spiel durch Laden ersetzt\n";
+	txt += " - Spielstabilität erhöht\n";
+	txt += "___________________________________________________________\n";
+	txt += "Update: 0.0.0.32 erschienen am 05.08.2014 um 00:00 Uhr.\n";
+	txt += "Erneuerungen:\n";
+	txt += " - Aktualisieren von Spielen im Client\n";
+	txt += " - 'Minigames' Oberfläche\n";
+	txt += " - Erhalten von Kupfer durch online Spiele\n";
+	txt += " - 'Fertig' knopf in der Teamauswahl\n";
+	txt += "Minigames:\n";
+	txt += " - Blöcke\n";
+	txt += " - Snake\n";
+	txt += " - Fangen\n";
+	txt += " - Tetris\n";
+	initTextFeld( patchNotes, 10, 30, 460, 222, txt, 0x1101 );
+	patchNotes.updateVScroll();
+	patchNotes.setVScrollZuZeile( 0 );
+	initKnopf( zurück, 190, 262, 100, 20, "Zurück", 0x1 );
+	zurück.setMausEreignis( "zME" );
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setText( t );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t, int style )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( style );
+}
+
+func bool maus( MausEreignis me )
+{
+	patchNotes.doMausEreignis( me );
+	zurück.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret = 0;
+	ret |= patchNotes.tick( z );
+	ret |= zurück.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	überschrift.render( rObj );
+	patchNotes.render( rObj );
+	zurück.render( rObj );
+}
+
+func bool zME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Patcher/Start" );
+	}
+	return true;
+}

+ 73 - 0
Test/patcher_start.cpp

@@ -0,0 +1,73 @@
+#include <KSGSStandart.h>
+
+var int breite = 480;
+var int höhe = 312;
+var TextFeld überschrift;
+var Knopf patchNotes;
+var Knopf news;
+
+func void start()
+{
+	initTextFeld( überschrift, 0, 0, breite, 20, "Willkommen bei Kolja Strohm - Games!", 0x301 );
+	initKnopf( patchNotes, 10, 30, 120, 20, "Patch Notes", 0x1 );
+	patchNotes.setMausEreignis( "pNME" );
+	initKnopf( news, 10, 60, 120, 20, "News", 0x1 );
+	news.setMausEreignis( "nME" );
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setText( t );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t, int style )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( style );
+}
+
+func bool maus( MausEreignis me )
+{
+	patchNotes.doMausEreignis( me );
+	news.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret = 0;
+	ret |= patchNotes.tick( z );
+	ret |= news.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	überschrift.render( rObj );
+	patchNotes.render( rObj );
+	news.render( rObj );
+}
+
+func bool pNME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Patcher/PatchNotes" );
+	}
+	return true;
+}
+
+func bool nME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Patcher/News" );
+	}
+	return true;
+}

BIN
Test/seafloor.dds


+ 96 - 0
Test/seite.ksgs

@@ -0,0 +1,96 @@
+#include <KSGSStandart.h>
+
+var int breite = 480;
+var int höhe = 312;
+var TextFeld überschrift;
+var TextFeld nutzerBedingungen;
+var Knopf zurück;
+
+func void start()
+{
+	initTextFeld( überschrift, 0, 0, breite, 20, "Nutzer Bedingungen", 0x301 );
+	var Text txt = "";
+	txt += "Mit der Nutzung der Programme von Kolja Strohm - Games erklähren\n";
+	txt += "sie sich automatisch mit folgenden Bedingungen einverstanden.\n";
+	txt += "1. Service Bereitstellung\n";
+	txt += " Wir garantieren nicht für die einwandfreie Funktionsfähigkeit unserer\n";
+	txt += " Programme. Wir können die Server jederzeit abschalten.\n";
+	txt += "2. Lizenz zur Nutzung\n";
+	txt += " Wir gewähren ihnen hiermit eine widerrufliche Lizenz für die ausschließlich\n";
+	txt += " persönliche Nutzung unserer Programme. Gewerbliche nutzung für\n";
+	txt += " Unternehmenszwecke ist ausdrücklichst untersagt, kann aber durch\n";
+	txt += " Absprache mit uns erlaubt werden.\n";
+	txt += "3. Verstoß gegen die Nutzerbedingungen\n";
+	txt += " Wir sind in der Lage bei einem Verstoß gegen die Nutzer Bedingungen\n";
+	txt += " den betroffenen Account zu sperren oder andere Strafen durchzuführen.\n";
+	txt += " Hierzu kann auch der Verlust von zusätzlich erworbenen Inhalten gehören.\n";
+	txt += "4. Änderung der Nutzerbedingungen\n";
+	txt += " Wir können die Nutzerbedingungen jederzeit nach unserem Intresse ändern.\n";
+	txt += "5. Verbotenes\n";
+	txt += " Mit der nutzung unserer Programme verpflichten sie sich dazu unter keinen\n";
+	txt += " Umständen:\n";
+	txt += " 5.1 Cheats, Automatisierungssoftware (Bots), Hacks, Mods oder jedwede\n";
+  txt += "  sonstige nicht autorisierte Fremdsoftware, die der Veränderung des Service,\n";
+  txt += "  eines Spiels oder eines Spielverlaufs dient, herzustellen oder zu nutzen;\n";
+	txt += " 5.2 den Service, ein Spiel oder einen beliebigen Teil davon zu gewerblichen\n";
+  txt += "  Zwecken zu nutzen, einschließlich, jedoch nicht darauf beschränkt,\n";
+	txt += "  (a) um Werbeanzeigen oder sonstige Werbung zu verbreiten oder zu ermöglichen;\n";
+	txt += "  (b) um spielinterne Währung, spielinterne Gegenstände oder sonstige\n";
+	txt += "   spielinterne Güter zu sammeln, um diese außerhalb des Spiels zu verkaufen;\n";
+	txt += "  (c) um Accounts für unsere Programme und/oder ein Spiel zu verkaufen oder\n";
+  txt += "  damit Handel zu treiben; oder (d) um innerhalb eines Spieles Leistungen gegen\n";
+  txt += "  eine außerhalb eines Spieles erfolgende Bezahlung zu erbringen;\n";
+	initTextFeld( nutzerBedingungen, 10, 30, 460, 222, txt, 0x1101 );
+	nutzerBedingungen.updateVScroll();
+	nutzerBedingungen.setVScrollZuZeile( 0 );
+	initKnopf( zurück, 190, 262, 100, 20, "Zurück", 0x1 );
+	zurück.setMausEreignis( "zME" );
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setText( t );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t, int style )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( style );
+}
+
+func bool maus( MausEreignis me )
+{
+	nutzerBedingungen.doMausEreignis( me );
+	zurück.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret = 0;
+	ret |= nutzerBedingungen.tick( z );
+	ret |= zurück.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	überschrift.render( rObj );
+	nutzerBedingungen.render( rObj );
+	zurück.render( rObj );
+}
+
+func bool zME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Patcher/Start" );
+	}
+	return true;
+}

BIN
Test/ship.ltdb


+ 95 - 0
Test/spiel2.cpp

@@ -0,0 +1,95 @@
+#include <KSGSStandart.h>
+
+var Fenster frame;
+var TextFeld beschreibung;
+var int besitzStatus;
+var int erwerbbarStatus;
+var Bild goldBild;
+var Bild silberBild;
+var Bild kupferBild;
+var TextFeld versionbesitz;
+var TextFeld tvsv;
+var TextFeld tve;
+var TextFeld tvkosten;
+var TextFeld tvGoldTF;
+var TextFeld tvSilberTF;
+var TextFeld tvKopferTF;
+
+func void start()
+{
+	frame.setGröße( 555, 380 );
+	frame.setStyle( 0x3 );
+	var Text txt = "Bei dem Spiel Linie bewegen sich alle Spieler in einer konstanten Geschwindigkeit\n";
+	txt += "durch ein Spielfeld. Die Sieler können nur auf ihre Richtung einfluss nehmen, indem\n";
+	txt += "sie von sich aus gesehen entweder eine Linkskurve oder eine Rechtskurve machen.\n";
+	txt += "Jeder Spieler hinterlässt beim bewegen eine Linie, die von keinem Spieler berührt\n";
+	txt += "werden darf. Berührt ein Spieler eine solche Linie, hat er die Runde verloren. Jedes\n";
+	txt += "Spiel besteht aus mehreren Runden. Gewinnen tut am ende der Spieler, der in den\n";
+	txt += "meißten Runden am längsten überlebt hat. Viel Spaß beil Spielen!";
+	initTextFeld( beschreibung, 5, 5, 545, 120, txt, 0x101 );
+	initTextFeld( versionbesitz, 5, 125, 300, 20, "", 0x101 );
+	initTextFeld( tvsv, 5, 145, 300, 20, "", 0x101 );
+	initTextFeld( tve, 5, 280, 300, 20, "", 0x101 );
+	initTextFeld( tvkosten, 5, 305, 50, 20, "", 0x701 );
+	besitzStatus = Rückruf( "GetBesitzStatus" );
+	erwerbbarStatus = Rückruf( "GetErwerbbarStatus" );
+	if( besitzStatus == 1 )
+	{
+		versionbesitz.setText( "Du besitzt die Testversion dieses Spiels." );
+		txt = "Anzahl verbleibender Spiele: ";
+		txt += Rückruf( "GetTestVersionVerbleibend" );
+		tvsv.setText( txt );
+	}
+	if( besitzStatus == 2 )
+	{
+		versionbesitz.setText( "Du besitzt die Vollversion dieses Spiels." );
+	}
+	if( besitzStatus == 0 )
+	{
+		if( erwerbbarStatus != 0 && erwerbbarStatus != 2 )
+		{
+			tve.setText( "10 Spiele Testversion" );
+			tvkosten.setText( "Kosten: " );
+			var int preis = Rückruf( "GetPreis", 0 );
+			var Text preisT;
+			preisT += preis / 10000;
+
+		}
+		if( erwerbbarStatus != 0 && erwerbbarStatus != 1 )
+		{
+
+		}
+	}
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+	tf.setText( t );
+	frame.addMember( tf );
+}
+
+func bool maus( MausEreignis me )
+{
+	frame.doMausEreignis( me );
+	return me.verarbeitet;
+}
+
+func bool tastatur( TastaturEreignis te )
+{
+	frame.doTastaturEreignis( te );
+	return te.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	return frame.tick( z );
+}
+
+func void render( int xOff, int yOff, Bild rObj )
+{
+	frame.render( xOff, yOff, rObj );
+}

BIN
Test/sql.dll


BIN
Test/ssleay32.dll


BIN
Test/t.m2


BIN
Test/test.ltdb


BIN
Test/test.wav


+ 152 - 0
Test/test2.cpp

@@ -0,0 +1,152 @@
+#include <KSGSStandart.h>
+
+var Säule s1;
+var Säule s2;
+var Säule s3;
+var Säule s4;
+var Spieler p;
+var bool läuft = false;
+var bool sStart = true;
+
+class Säule
+{
+	private:
+		var double x = 0;
+		var int br = 100;
+		var int y = 300;
+		var int hö = 100;
+	public:
+		func void set( int n )
+		{
+			x = n * 300;
+			y = Rückruf( "zufall", 150, 450 );
+		}
+		func void tick( double zeit )
+		{
+			x = x - ( zeit * 60 );
+			if( (x + br) < 0 )
+			{
+				x = 1100;
+				y = ( ( ( ( y + 2 ) * ( zeit * 100 ) ) % 4 ) * 100 ) + 150;
+			}
+		}
+		func void render( Bild b )
+		{
+			b.füllRegion( x, 0, br, y, 0xFFFFFFFF );
+			b.füllRegion( x, y + hö, br, 900 - ( y + hö ), 0xFFFFFFFF );
+		}
+		func bool collidiert( int xp, int yp, int brp, int höp )
+		{
+			if( ( xp + brp ) > x && xp < ( x + br ) )
+			{
+				if( yp < y || ( yp + höp ) > ( y + hö ) ) { return true; }
+			}
+			return false;
+		}
+};
+
+class Spieler
+{
+	private:
+		var int x = 120;
+		var double y = 320;
+		var int br = 40;
+		var int hö = 40;
+		var double yS = 0;
+		var double score = 0;
+		var TextFeld scoreTF;
+	public:
+		func void set()
+		{
+			scoreTF.setPosition( 35, 35 );
+			scoreTF.setGröße( 100, 30 );
+			scoreTF.setStyle( 0x901 );
+			scoreTF.setSchriftFarbe( 0xFF00FF00 );
+			scoreTF.setSchriftGröße( 20 );
+			scoreTF.setText( "Score: 0" );
+			score = 0;
+			y = 320;
+			yS = 0;
+		}
+		func void tastatur( TastaturEreignis te )
+		{
+			yS = 10;
+		}
+		func void tick( double zeit )
+		{
+			score = score + ( zeit * 60 );
+			y -= ( yS * zeit * 20 );
+			yS -= ( zeit * 30 );
+			var int sc;
+			sc = ( score + 20 ) / 300;
+			var Text sct = "Score: ";
+			sct += sc;
+			scoreTF.setText( sct );
+		}
+		func void render( Bild b )
+		{
+			b.füllRegion( x, y, br, hö, 0xFF00FF00 );
+			scoreTF.render( 0, 0, b );
+		}
+		func bool collidiert( Säule s )
+		{
+			if( y < 0 ){ return true; }
+			if( (y + hö ) > 700 ){ return true; }
+			return s.collidiert( x, y, br, hö );
+		}
+};
+
+func void start()
+{
+	s1.set( 0 );
+	s2.set( 1 );
+	s3.set( 2 );
+	s4.set( 3 );
+	p.set();
+}
+
+func bool maus( MausEreignis me )
+{
+	return true;
+}
+
+func bool tastatur( TastaturEreignis te )
+{
+	if( te.id != 0 ){	return false; }
+	if( läuft != true )
+	{
+		if( sStart != true )
+		{
+	    s1.set( 0 );
+	    s2.set( 1 );
+	    s3.set( 2 );
+	    s4.set( 3 );
+		  p.set();
+		}
+		läuft = true;
+		sStart = false;
+	}
+	p.tastatur( te );
+	return true;
+}
+
+func bool tick( double zeit )
+{
+	if( läuft != true ){ return false; }
+	s1.tick( zeit );
+	s2.tick( zeit );
+	s3.tick( zeit );
+	s4.tick( zeit );
+	p.tick( zeit );
+	if( p.collidiert( s1 ) || p.collidiert( s2 ) || p.collidiert( s3 ) || p.collidiert( s4 ) ) { läuft = false; }
+	return true;
+}
+
+func void render( int xOff, int yOff, Bild rObj )
+{
+	s1.render( rObj );
+	s2.render( rObj );
+	s3.render( rObj );
+	s4.render( rObj );
+	p.render( rObj );
+}

+ 314 - 0
Test/test3d.cpp

@@ -0,0 +1,314 @@
+#include <Fenster.h>
+#include <Globals.h>
+#include <MausEreignis.h>
+#include <TastaturEreignis.h>
+#include <Bildschirm.h>
+#include <RenderThread.h>
+#include <d3d11.h>
+#include <Bild.h>
+#include <iostream>
+#include <D3DX11async.h>
+
+using namespace Framework;
+
+Bildschirm *bs;
+
+void FClose( void *p, void *zF )
+{
+    StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+}
+
+struct XMFLOAT3
+{
+    float x;
+    float y;
+    float z;
+};
+
+struct Vertex
+{
+    XMFLOAT3 pos;
+};
+
+class Kam3D : public Zeichnung
+{
+private:
+    ID3D11Texture2D *d3d11RenderTarget;
+    ID3D11Texture2D *d3d11Staging;
+    ID3D11RenderTargetView *d3d11RenderTargetView;
+    ID3D11DepthStencilView *d3d11DepthStencilView;
+    ID3D11ShaderResourceView *d3d11ShaderResourceView;
+    ID3D11DeviceContext *context;
+    ID3D11Device *device;
+
+
+    ID3D11Buffer *pVBuffer;    // global
+    ID3D11VertexShader *pVS;    // the vertex shader
+    ID3D11PixelShader *pPS;     // the pixel shader
+    ID3D11InputLayout *pLayout;    // global
+
+public:
+    Kam3D()
+        : Zeichnung()
+    {
+        d3d11RenderTarget = 0;
+    }
+    ~Kam3D()
+    {
+        d3d11RenderTarget->Release();
+        d3d11Staging->Release();
+        d3d11RenderTargetView->Release();
+        d3d11ShaderResourceView->Release();
+        pVBuffer->Release();
+        pVS->Release();
+        pPS->Release();
+        pLayout->Release();
+        //d3d11DepthStencilView->Release();
+    }
+
+    bool init( ID3D11Device *device, ID3D11DeviceContext *context )
+    {
+        this->context = context;
+        this->device = device;
+
+        D3D11_TEXTURE2D_DESC textureDesc;
+        HRESULT result;
+        D3D11_RENDER_TARGET_VIEW_DESC renderTargetViewDesc;
+        D3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc;
+        D3D11_SHADER_RESOURCE_VIEW_DESC shaderResourceViewDesc;
+
+
+        // Initialize the render target texture description.
+        ZeroMemory( &textureDesc, sizeof( textureDesc ) );
+
+        // Setup the render target texture description.
+        textureDesc.Width = getBreite();
+        textureDesc.Height = getHöhe();
+        textureDesc.MipLevels = 1;
+        textureDesc.ArraySize = 1;
+        textureDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
+        textureDesc.SampleDesc.Count = 1;
+        textureDesc.Usage = D3D11_USAGE_DEFAULT;
+        textureDesc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
+        textureDesc.CPUAccessFlags = 0;
+        textureDesc.MiscFlags = 0;
+
+        // Create the render target texture.
+        result = device->CreateTexture2D( &textureDesc, NULL, &d3d11RenderTarget );
+        if( FAILED( result ) )
+        {
+            return false;
+        }
+
+
+        // Initialize the render target texture description.
+        ZeroMemory( &textureDesc, sizeof( textureDesc ) );
+
+        // Setup the render target texture description.
+        textureDesc.Width = getBreite();
+        textureDesc.Height = getHöhe();
+        textureDesc.MipLevels = 1;
+        textureDesc.ArraySize = 1;
+        textureDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
+        textureDesc.SampleDesc.Count = 1;
+        textureDesc.Usage = D3D11_USAGE_STAGING;
+        textureDesc.BindFlags = 0;
+        textureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+        textureDesc.MiscFlags = 0;
+
+        // Create the render target texture.
+        result = device->CreateTexture2D( &textureDesc, NULL, &d3d11Staging );
+        if( FAILED( result ) )
+        {
+            return false;
+        }
+
+        // Setup the description of the render target view.
+        renderTargetViewDesc.Format = textureDesc.Format;
+        renderTargetViewDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
+        renderTargetViewDesc.Texture2D.MipSlice = 0;
+
+        // Create the render target view.
+        result = device->CreateRenderTargetView( d3d11RenderTarget, &renderTargetViewDesc, &d3d11RenderTargetView );
+        if( FAILED( result ) )
+        {
+            return false;
+        }
+
+        // Setup the description of the shader resource view.
+        shaderResourceViewDesc.Format = textureDesc.Format;
+        shaderResourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
+        shaderResourceViewDesc.Texture2D.MostDetailedMip = 0;
+        shaderResourceViewDesc.Texture2D.MipLevels = 1;
+
+        // Create the shader resource view.
+        result = device->CreateShaderResourceView( d3d11RenderTarget, &shaderResourceViewDesc, &d3d11ShaderResourceView );
+        if( FAILED( result ) )
+        {
+            return false;
+        }
+
+       /* ZeroMemory( &depthStencilViewDesc, sizeof( D3D11_DEPTH_STENCIL_VIEW_DESC ) );
+        depthStencilViewDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
+        depthStencilViewDesc.Flags = D3D11_DSV_FLAG::D3D11_DSV_READ_ONLY_DEPTH | D3D11_DSV_FLAG::D3D11_DSV_READ_ONLY_STENCIL;
+
+        result = device->CreateDepthStencilView( d3d11RenderTarget, &depthStencilViewDesc, &d3d11DepthStencilView );
+        if( FAILED( result ) )
+        {
+            return false;
+        }*/
+
+        InitGraphics();
+        InitPipeline();
+        return true;
+    }
+
+    void InitGraphics()
+    {
+        // create a triangle using the VERTEX struct
+        Vertex vertexData[ 3 ];
+        vertexData[ 0 ].pos = { 0.0f, 0.5f, 0.5f };
+        vertexData[ 1 ].pos = { 0.5f, -0.5f, 0.5f };
+        vertexData[ 2 ].pos = { -0.5f, -0.5f, 0.5f };
+
+
+        // create the vertex buffer
+        D3D11_BUFFER_DESC bd;
+        ZeroMemory( &bd, sizeof( bd ) );
+
+        bd.Usage = D3D11_USAGE_DYNAMIC;                // write access access by CPU and GPU
+        bd.ByteWidth = sizeof( Vertex ) * 3;             // size is the VERTEX struct * 3
+        bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;       // use as a vertex buffer
+        bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;    // allow CPU to write in buffer
+
+        device->CreateBuffer( &bd, NULL, &pVBuffer );       // create the buffer
+
+
+                                                         // copy the vertices into the buffer
+        D3D11_MAPPED_SUBRESOURCE ms;
+        context->Map( pVBuffer, NULL, D3D11_MAP_WRITE_DISCARD, NULL, &ms );    // map the buffer
+        memcpy( ms.pData, vertexData, sizeof( vertexData ) );                 // copy the data
+        context->Unmap( pVBuffer, NULL );                                      // unmap the buffer
+    }
+
+    void InitPipeline()
+    {
+        // load and compile the two shaders
+        ID3D10Blob *VS, *PS;
+        D3DX11CompileFromFile( "shader.hlsl", 0, 0, "VS", "vs_4_0", 0, 0, 0, &VS, 0, 0 );
+        D3DX11CompileFromFile( "shader.hlsl", 0, 0, "PS", "ps_4_0", 0, 0, 0, &PS, 0, 0 );
+
+        // encapsulate both shaders into shader objects
+        device->CreateVertexShader( VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS );
+        device->CreatePixelShader( PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS );
+
+        // set the shader objects
+        context->VSSetShader( pVS, 0, 0 );
+        context->PSSetShader( pPS, 0, 0 );
+
+        // create the input layout object
+        D3D11_INPUT_ELEMENT_DESC ied[] =
+        {
+            { "POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT,0,0, D3D11_INPUT_PER_VERTEX_DATA,0 }
+        };
+
+        device->CreateInputLayout( ied, 1, VS->GetBufferPointer(), VS->GetBufferSize(), &pLayout );
+
+        UINT stride = sizeof( Vertex );
+        UINT offset = 0;
+        context->IASetVertexBuffers( 0, 1, &pVBuffer, &stride, &offset );
+        context->IASetInputLayout( pLayout );
+        context->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
+
+        context->OMSetRenderTargets( 1, &d3d11RenderTargetView, 0 );
+        context->PSSetShaderResources( 1, 1, &d3d11ShaderResourceView );
+    }
+
+    void render( Bild &rObj )
+    {
+        float color[ 4 ];
+
+        // Setup the color to clear the buffer to.
+        color[ 0 ] = 0;
+        color[ 1 ] = 0;
+        color[ 2 ] = 0;
+        color[ 3 ] = 0;
+
+        // Clear the back buffer.
+        context->ClearRenderTargetView( d3d11RenderTargetView, color );
+        //context->ClearDepthStencilView( d3d11DepthStencilView, D3D11_CLEAR_DEPTH, 1.0f, 0 );
+        context->Draw( 3, 0 );    // draw 3 vertices, starting from vertex 0
+        
+
+        //--------------------------------------------------------------------------------
+        // Draw to Framework
+        context->CopyResource( d3d11Staging, d3d11RenderTarget );
+
+        D3D11_MAPPED_SUBRESOURCE buffer;
+        context->Map( d3d11Staging, 0, D3D11_MAP::D3D11_MAP_READ, 0, &buffer );
+
+        int *pixel = rObj.getBuffer();
+        for( int y = 0, pitch = 0, bry = pos.x + pos.y * rObj.getBreite(); y < gr.y; ++y, pitch += buffer.RowPitch, bry += rObj.getBreite() )
+            memcpy( &pixel[ bry ], &( (BYTE *)buffer.pData )[ pitch ], buffer.RowPitch );
+
+        context->Unmap( d3d11Staging, 0 );
+
+        std::cout << bs->getRenderZeit() << "\n";
+    }
+};
+
+int main()
+{
+    initFramework();
+
+
+    WFenster *f = new WFenster();
+    WNDCLASS fc = F_Normal( 0 );
+    fc.lpszClassName = "Test";
+    f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+    f->setGröße( 1600, 900 );
+    f->setVSchließAktion( FClose );
+    f->setMausAktion( _ret1ME );
+    f->setTastaturAktion( _ret1TE );
+    f->setAnzeigeModus( 1 );
+
+    bs = new Bildschirm( f->getThis() );
+    f->setBildschirm( bs->getThis() );
+    bs->setTestRend( 0 );
+    bs->setFüll( 0 );
+
+    RenderTh *r = new RenderTh();
+    r->setBildschirm( bs->getThis() );
+    r->setMaxFps( 60 );
+    r->beginn();
+
+    Kam3D *obj = new Kam3D();
+    obj->setPosition( 100, 100 );
+    obj->setGröße( 1000, 600 );
+    bs->addMember( obj );
+
+    ID3D11Device *device;
+    ID3D11DeviceContext *context;
+
+    D3D_FEATURE_LEVEL levels[] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0 };
+    D3D_FEATURE_LEVEL levelsOk[ 3 ];
+    HRESULT hr = D3D11CreateDevice( 0, D3D_DRIVER_TYPE_HARDWARE, 0, D3D11_CREATE_DEVICE_DEBUG, levels, 3, D3D11_SDK_VERSION, &device, levelsOk, &context );
+    if( hr == S_OK )
+    {
+        obj->init( device, context );
+    }
+
+    StartNachrichtenSchleife();
+
+    r->beenden();
+    r->release();
+    f->setBildschirm( 0 );
+    bs->release();
+    f->release();
+    delete obj;
+    context->Release();
+    device->Release();
+
+    releaseFramework();
+    return 0;
+}

+ 356 - 0
Test/test3dF.cpp

@@ -0,0 +1,356 @@
+#include <Globals.h>
+#include <Fenster.h>
+#include <MausEreignis.h>
+#include <TastaturEreignis.h>
+#include <Bildschirm.h>
+#include <RenderThread.h>
+#include <Zeichnung3D.h>
+#include <Model3D.h>
+#include <Bild.h>
+#include <Zeichnung.h>
+#include <Mat4.h>
+#include <time.h>
+#include <Render3D.h>
+#include <Welt3D.h>
+#include <Kam3D.h>
+#include <iostream>
+#include <Mat4.h>
+#include <Textur.h>
+#include <DXBuffer.h>
+#include <Cube.h>
+#include <Textur.h>
+#include <TexturList.h>
+#include <Klient.h>
+#include <Animation3D.h>
+#include <FrameworkMath.h>
+
+using namespace Framework;
+
+void FClose( void *p, void *zF )
+{
+    StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+}
+
+int kAnz = 10;
+Knochen **knochen;
+
+Model3D *createKnochenTestModel()
+{
+    Model3DData *model = new Model3DData();
+    float stdSize = 50;
+    float left, right, top, bottom;
+    // Calculate the screen coordinates of the left side of the bitmap.
+    left = (float)( ( stdSize / 2.0 ) * -1 );
+    // Calculate the screen coordinates of the right side of the bitmap.
+    right = left + (float)stdSize;
+    // Calculate the screen coordinates of the top of the bitmap.
+    top = (float)( stdSize / 2.0 );
+    // Calculate the screen coordinates of the bottom of the bitmap.
+    bottom = top - (float)stdSize;
+    float front = -stdSize / 2;
+    float back = front + stdSize;
+
+    Vertex3D *vertecies = new Vertex3D[ kAnz * 4 ];
+    for( int k = 0; k < kAnz; k++ )
+    {
+        for( int i = k * 4; i < 4 + k * 4; i++ )
+            vertecies[ i ].knochenId = k;
+        if( k == 0 )
+        {
+            vertecies[ 0 + k * 4 ].pos = Vec3<float >( left, top, 0 );
+            vertecies[ 0 + k * 4 ].tPos = Vec2< float >( 0.f, 0.f );
+            vertecies[ 1 + k * 4 ].pos = Vec3<float >( right, top, 0 );
+            vertecies[ 1 + k * 4 ].tPos = Vec2< float >( 1.f, 0.f );
+            vertecies[ 2 + k * 4 ].pos = Vec3<float >( left, bottom, 0 );
+            vertecies[ 2 + k * 4 ].tPos = Vec2< float >( 0.f, 1.f );
+            vertecies[ 3 + k * 4 ].pos = Vec3<float >( right, bottom, 0 );
+            vertecies[ 3 + k * 4 ].tPos = Vec2< float >( 1.f, 1.f );
+        }
+        else
+        {
+            vertecies[ 0 + k * 4 ].pos = Vec3<float >( left, top, 100 );
+            vertecies[ 0 + k * 4 ].tPos = Vec2< float >( 0.f, 0.f );
+            vertecies[ 1 + k * 4 ].pos = Vec3<float >( right, top, 100 );
+            vertecies[ 1 + k * 4 ].tPos = Vec2< float >( 1.f, 0.f );
+            vertecies[ 2 + k * 4 ].pos = Vec3<float >( left, bottom, 100 );
+            vertecies[ 2 + k * 4 ].tPos = Vec2< float >( 0.f, 1.f );
+            vertecies[ 3 + k * 4 ].pos = Vec3<float >( right, bottom, 100 );
+            vertecies[ 3 + k * 4 ].tPos = Vec2< float >( 1.f, 1.f );
+        }
+    }
+    model->setVertecies( vertecies, kAnz * 4 );
+
+    for( int k = 0; k < kAnz; k++ )
+    {
+        if( k == 0 || k == kAnz - 1 )
+        {
+            // front side
+            Polygon3D *p = new Polygon3D();
+            p->indexAnz = 6;
+            p->indexList = new int[ p->indexAnz ];
+            p->indexBuffer->setLength( p->indexAnz * 4 );
+            p->indexBuffer->setData( p->indexList );
+            p->indexList[ 0 ] = 0 + k * 4;
+            p->indexList[ 1 ] = 3 + k * 4;
+            p->indexList[ 2 ] = 2 + k * 4;
+            p->indexList[ 3 ] = 0 + k * 4;
+            p->indexList[ 4 ] = 1 + k * 4;
+            p->indexList[ 5 ] = 3 + k * 4;
+            model->addPolygon( p );
+        }
+        if( k != kAnz - 1 )
+        {
+            // right side
+            Polygon3D *p = new Polygon3D();
+            p->indexAnz = 6;
+            p->indexList = new int[ p->indexAnz ];
+            p->indexBuffer->setLength( p->indexAnz * 4 );
+            p->indexBuffer->setData( p->indexList );
+            p->indexList[ 0 ] = 1 + k * 4;
+            p->indexList[ 1 ] = 7 + k * 4;
+            p->indexList[ 2 ] = 3 + k * 4;
+            p->indexList[ 3 ] = 1 + k * 4;
+            p->indexList[ 4 ] = 5 + k * 4;
+            p->indexList[ 5 ] = 7 + k * 4;
+            model->addPolygon( p );
+            // left side
+            p = new Polygon3D();
+            p->indexAnz = 6;
+            p->indexList = new int[ p->indexAnz ];
+            p->indexBuffer->setLength( p->indexAnz * 4 );
+            p->indexBuffer->setData( p->indexList );
+            p->indexList[ 0 ] = 0 + k * 4;
+            p->indexList[ 1 ] = 2 + k * 4;
+            p->indexList[ 2 ] = 6 + k * 4;
+            p->indexList[ 3 ] = 0 + k * 4;
+            p->indexList[ 4 ] = 6 + k * 4;
+            p->indexList[ 5 ] = 4 + k * 4;
+            model->addPolygon( p );
+            // top side
+            p = new Polygon3D();
+            p->indexAnz = 6;
+            p->indexList = new int[ p->indexAnz ];
+            p->indexBuffer->setLength( p->indexAnz * 4 );
+            p->indexBuffer->setData( p->indexList );
+            p->indexList[ 0 ] = 4 + k * 4;
+            p->indexList[ 1 ] = 1 + k * 4;
+            p->indexList[ 2 ] = 0 + k * 4;
+            p->indexList[ 3 ] = 4 + k * 4;
+            p->indexList[ 4 ] = 5 + k * 4;
+            p->indexList[ 5 ] = 1 + k * 4;
+            model->addPolygon( p );
+            // down side
+            p = new Polygon3D();
+            p->indexAnz = 6;
+            p->indexList = new int[ p->indexAnz ];
+            p->indexBuffer->setLength( p->indexAnz * 4 );
+            p->indexBuffer->setData( p->indexList );
+            p->indexList[ 0 ] = 6 + k * 4;
+            p->indexList[ 1 ] = 2 + k * 4;
+            p->indexList[ 2 ] = 3 + k * 4;
+            p->indexList[ 3 ] = 6 + k * 4;
+            p->indexList[ 4 ] = 3 + k * 4;
+            p->indexList[ 5 ] = 7 + k * 4;
+            model->addPolygon( p );
+        }
+    }
+
+    Model3DTextur *textur = new Model3DTextur();
+    for( int k = 0; k < kAnz; k++ )
+    {
+        Textur *t = new Textur();
+        Bild *tb = new Bild();
+        tb->neuBild( 100, 100, 0xFF000000 | (rand() % 0xFFFFFF) );
+        t->setBildZ( tb );
+        textur->setPolygonTextur( k * 4, t->getThis() );
+        textur->setPolygonTextur( k * 4 + 1, t->getThis() );
+        textur->setPolygonTextur( k * 4 + 2, t->getThis() );
+        textur->setPolygonTextur( k * 4 + 3, t );
+    }
+    
+    Model3D *m3d = new Model3D();
+    m3d->setModelDaten( model );
+    m3d->setModelTextur( textur );
+    
+    Skelett *s = new Skelett();
+    knochen = new Knochen*[ kAnz ];
+    for( int k = 0; k < kAnz; k++ )
+    {
+        Knochen *kn = new Knochen( k );
+        if( k != 0 )
+            kn->setPosition( Vec3<float>( 0, 0, 100 ) );
+        s->addKnochen( kn, k - 1 );
+        knochen[ k ] = kn;
+    }
+    m3d->setSkelettZ( s );
+
+    Animation3D *animation = new Animation3D();
+    animation->addKeyFrame( 2, 20, Vec3<float>( 0, 0, 100 ), Vec3<float>( 2 * 3.14, 2 * 3.14, 2 * 3.14 ) );
+    animation->addKeyFrame( 2, 0, Vec3<float>( 0, 0, 100 ), Vec3<float>( 0, 0, 0 ) );
+    animation->addKeyFrame( 4, 20, Vec3<float>( 0, 0, 100 ), Vec3<float>( 2 * 3.14, 2 * 3.14, 2 * 3.14 ) );
+    animation->addKeyFrame( 4, 0, Vec3<float>( 0, 0, 100 ), Vec3<float>( 0, 0, 0 ) );
+    animation->addKeyFrame( 6, 20, Vec3<float>( 0, 0, 100 ), Vec3<float>( 2 * 3.14, 2 * 3.14, 2 * 3.14 ) );
+    animation->addKeyFrame( 6, 0, Vec3<float>( 0, 0, 100 ), Vec3<float>( 0, 0, 0 ) );
+    animation->addKeyFrame( 8, 20, Vec3<float>( 0, 0, 100 ), Vec3<float>( 2 * 3.14, 2 * 3.14, 2 * 3.14 ) );
+    animation->addKeyFrame( 8, 0, Vec3<float>( 0, 0, 100 ), Vec3<float>( 0, 0, 0 ) );
+    m3d->addAnimation( animation, 5 );
+
+    return m3d;
+}
+
+int _select = 0;
+int _achse = 0;
+
+bool taste( void *p, void *o, TastaturEreignis t )
+{
+    Vec3<float> r(0, 0, 0);
+    if( _achse == 0 )
+        r.x = 0.001;
+    if( _achse == 1 )
+        r.y = 0.001;
+    if( _achse == 2 )
+        r.z = 0.001;
+    if( t.id == TE_Press )
+    {
+        switch( t.taste )
+        {
+        case '0':
+            _select = 0;
+            break;
+        case '1':
+            _select = 1;
+            break;
+        case '2':
+            _select = 2;
+            break;
+        case '3':
+            _select = 3;
+            break;
+        case '4':
+            _select = 4;
+            break;
+        case '5':
+            _select = 5;
+            break;
+        case '6':
+            _select = 6;
+            break;
+        case '7':
+            _select = 7;
+            break;
+        case '8':
+            _select = 8;
+            break;
+        case '9':
+            _select = 9;
+            break;
+        case 'x':
+            _achse = 0;
+            break;
+        case 'y':
+            _achse = 1;
+            break;
+        case 'z':
+            _achse = 2;
+            break;
+        case '+':
+            knochen[ _select ]->setDrehung( knochen[ _select ]->getDrehung() + r );
+            break;
+        case '-':
+            knochen[ _select ]->setDrehung( knochen[ _select ]->getDrehung() - r );
+            break;
+        }
+    }
+    return false;
+}
+
+int main()
+{
+    initFramework();
+
+    Welt3D *welt = new Welt3D();
+    Kam3D *kamera = new Kam3D();
+    kamera->setPosition( Vec3< float >( 0, 75, 0 ) );
+    kamera->setWelt( welt );
+    kamera->setBildschirmSize( 1600, 900 );
+
+    WFenster *f = new WFenster();
+    WNDCLASS fc = F_Normal( 0 );
+    fc.lpszClassName = "Test";
+    f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+    f->setSize( 1600, 900 );
+    f->setVSchließAktion( FClose );
+    f->setMausAktion( _ret1ME );
+    f->setTastaturAktion( taste );
+    f->setAnzeigeModus( 1 );
+
+    Bildschirm3D *bs = new Bildschirm3D( f->getThis() );
+    f->setBildschirm( bs->getThis() );
+    bs->setFill( 1 );
+    bs->setFillFarbe( 0 );
+    //bs->setTestRend( 0 );
+    bs->addKamera( kamera );
+
+    Model3D *sat = createKnochenTestModel();
+    welt->addZeichnung( sat );
+    /*
+    int anzX = 100;
+    int anzZ = 100;
+
+    for( int i = 0; i < 100; i++ )
+    {
+        Bild *b = new Bild();
+        b->neuBild( 100, 100, 0xFF000000 | ( ( rand() % 0xFF ) << 16 ) | ( ( rand() % 0xFF ) << 8 ) | ( rand() % 0xFF ) );
+        b->fillCircle( 50, 50, 15, 0 );
+        Textur *t = new Textur();
+        t->setBildZ( b );
+        zTexturRegister()->addTextur( t, Text( i ) );
+    }
+
+    Cube **test = new Cube*[ anzX * anzZ ];
+    for( int i = 0; i < anzX; i++ )
+    {
+        for( int j = 0; j < anzZ; j++ )
+        {
+            test[ i + j * anzZ ] = new Cube( 100 );
+            test[ i + j * anzZ ]->setPosition( i * 100.f - 100 * ( anzX / 2 ), 0, j * 100.f - 100 * ( anzZ / 2 ) );
+            test[ i + j * anzZ ]->setTextur( rand() % 100 );
+            test[ i + j * anzZ ]->setAlpha( 1 );
+            test[ i + j * anzZ ]->setDrehung( Vec3< float >( ( rand() % 10 ) / 10.f * 6.28f, ( rand() % 10 ) / 10.f * 6.28f, ( rand() % 10 ) / 10.f * 6.28f ) );
+            welt->addZeichnung( test[ i + j * anzZ ] );
+        }
+    }*/
+
+    ZeichnungHintergrund *zh = new ZeichnungHintergrund();
+    zh->setStyle( ZeichnungHintergrund::Style::Sichtbar | ZeichnungHintergrund::Style::Hintergrund | ZeichnungHintergrund::Style::Buffered );
+    zh->setHintergrundFarbe( 0 );
+    zh->setAlphaFeldFarbe( 0xA0FF0000 );
+    zh->setAlphaFeldStrength( 5 );
+    zh->setSize( 1580, 860 );
+    zh->setPosition( 10, 10 );
+    bs->addMember( zh );
+
+    RenderTh *r = new RenderTh();
+    r->setBildschirm( bs->getThis() );
+    r->setMaxFps( 60 );
+    r->beginn();
+
+    StartNachrichtenSchleife();
+
+    r->beenden();
+    r->release();
+    /*
+    for( int i = 0; i < anzX * anzZ; i++ )
+        test[ i ]->release();
+    delete[] test;*/
+    delete zh;
+
+    f->setBildschirm( 0 );
+    bs->release();
+    f->release();
+    welt->release();
+    kamera->release();
+
+    releaseFramework();
+    return 0;
+}

+ 32 - 0
Test/texture.ps

@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+// Filename: texture.ps
+////////////////////////////////////////////////////////////////////////////////
+
+
+/////////////
+// GLOBALS //
+/////////////
+Texture2D shaderTexture;
+SamplerState SampleType;
+
+
+//////////////
+// TYPEDEFS //
+//////////////
+struct PixelInputType
+{
+    float4 position : SV_POSITION;
+    float2 tex : TEXCOORD0;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Pixel Shader
+////////////////////////////////////////////////////////////////////////////////
+float4 TexturePixelShader(PixelInputType input) : SV_TARGET
+{
+    //return float4( 0.5, 0.5, 0.5, 0.5 );
+    // Sample the pixel color from the texture using the sampler at this texture coordinate location.
+    float4 textureColor = shaderTexture.Sample(SampleType, input.tex);
+    return textureColor;
+}

+ 54 - 0
Test/texture.vs

@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+// Filename: texture.vs
+////////////////////////////////////////////////////////////////////////////////
+
+
+/////////////
+// GLOBALS //
+/////////////
+cbuffer MatrixBuffer
+{
+    matrix worldMatrix;
+    matrix viewMatrix;
+    matrix projectionMatrix;
+};
+
+
+//////////////
+// TYPEDEFS //
+//////////////
+struct VertexInputType
+{
+    float4 position : POSITION;
+    float2 tex : TEXCOORD0;
+};
+
+struct PixelInputType
+{
+    float4 position : SV_POSITION;
+    float2 tex : TEXCOORD0;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Vertex Shader
+////////////////////////////////////////////////////////////////////////////////
+PixelInputType TextureVertexShader( VertexInputType input )
+{
+    //return input;
+    PixelInputType output;
+    
+    // Change the position vector to be 4 units for proper matrix calculations.
+    input.position.w = 1.0f;
+    
+    // Store the texture coordinates for the pixel shader.
+    output.tex = input.tex;
+
+    // Calculate the position of the vertex against the world, view, and projection matrices.
+    output.position = input.position;
+    output.position = mul( input.position, worldMatrix );
+    output.position = mul( output.position, viewMatrix );
+    output.position = mul( output.position, projectionMatrix );
+    
+    return output;
+}

+ 88 - 0
Test/tmp.cpp

@@ -0,0 +1,88 @@
+#include <KSGSStandart.h>
+
+class TextErscheinen
+{
+private:
+    var TextFeld beschreibung;
+    var Text txt;
+    var int num;
+    var int län;
+    var double z;
+public:
+    func void init()
+    {
+        initTextFeld( beschreibung, 5, 5, 568, 418, "", 0x101 );
+        txt = "Bei dem spiel Linie bewegen sich die Spieler duch ein Spielfeld und können nur ihre Richtung beeinflussen. Dabei hinterlässt Jeder Spieler eine Linie die nicht berührt werden darf. Viel spaß wünscht ihnen Kolja-Strohm Games.";
+        län = txt.getLänge();
+        num = 0;
+        z = 0;
+    }
+    func bool next( double zeit )
+    {
+        z += zeit;
+        if( ( z > 0.03 ) && ( num < län ) )
+        {
+            var Text t;
+            t = beschreibung.getText();
+            while( z > 0.03 )
+            {
+                z -= 0.03;
+                t.anhängen( txt.getTeilText( num, num + 1 ) );
+                num += 1;
+                if( num >= län )
+                {
+                    break;
+                }
+            }
+            beschreibung.setText( t );
+            beschreibung.setTextNachGröße();
+            return true;
+        }
+        return false;
+    }
+    func void render( Bild b )
+    {
+        beschreibung.render( b );
+    }
+};
+
+var TextErscheinen beschreibung;
+
+func void start()
+{
+    beschreibung.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+    tf.setPosition( x, y );
+    tf.setGröße( br, hö );
+    tf.setStyle( style );
+    tf.setSchriftFarbe( 0xFFFFFFFF );
+    tf.setText( t );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+    k.setPosition( x, y );
+    k.setGröße( br, hö );
+    k.setText( t );
+    k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+    return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+    var bool ret;
+    ret = beschreibung.next( z );
+    return ret;
+}
+
+func void render( Bild rObj )
+{
+    beschreibung.render( rObj );
+}