diff --git a/Doc/dxwnd_manual.odt b/Doc/dxwnd_manual.odt new file mode 100644 index 0000000..680c4af Binary files /dev/null and b/Doc/dxwnd_manual.odt differ diff --git a/Include/DShow.h b/Include/DShow.h new file mode 100644 index 0000000..5ac6f08 --- /dev/null +++ b/Include/DShow.h @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// File: DShow.h +// +// Desc: DirectShow top-level include file +// +// Copyright (c) 2000-2001, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + +#ifndef __DSHOW_INCLUDED__ +#define __DSHOW_INCLUDED__ + +/////////////////////////////////////////////////////////////////////////// +// Set up constants & pragmas for the compiler +/////////////////////////////////////////////////////////////////////////// +#ifdef _MSC_VER +// disable some level-4 warnings, use #pragma warning(default:###) to re-enable +#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter +#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union +#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated +#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated +#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed" + +#if _MSC_VER>=1100 +#define AM_NOVTABLE __declspec(novtable) +#else +#define AM_NOVTABLE +#endif +#endif // MSC_VER + +/////////////////////////////////////////////////////////////////////////// +// Include standard Windows files +/////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + +#ifndef NO_DSHOW_STRSAFE +#define NO_SHLWAPI_STRFCNS +#include +#endif + +#ifndef NUMELMS + #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0])) +#endif + +/////////////////////////////////////////////////////////////////////////// +// Include DirectShow include files +/////////////////////////////////////////////////////////////////////////// +#include // Generated IDL header file for streams interfaces +#include // ActiveMovie video interfaces and definitions + +#ifdef DSHOW_USE_AMAUDIO +#include // ActiveMovie audio interfaces and definitions +#endif + +#include // generated from control.odl +#include // event code definitions +#include // declaration of type GUIDs and well-known clsids +#include // HRESULT status and error definitions +#include // External device control interface defines +#include // audio filter device error event codes +#include // DVD error event codes + +/////////////////////////////////////////////////////////////////////////// +// Define OLE Automation constants +/////////////////////////////////////////////////////////////////////////// +#ifndef OATRUE +#define OATRUE (-1) +#endif // OATRUE +#ifndef OAFALSE +#define OAFALSE (0) +#endif // OAFALSE + +/////////////////////////////////////////////////////////////////////////// +// Define Win64 interfaces if not already defined +/////////////////////////////////////////////////////////////////////////// + +// InterlockedExchangePointer +#ifndef InterlockedExchangePointer +#define InterlockedExchangePointer(Target, Value) \ + (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value)) +#endif + + +#endif // __DSHOW_INCLUDED__ diff --git a/Include/dxwnd.h b/Include/dxwnd.h index 7931a6e..0ab3f87 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -69,6 +69,10 @@ #define FAKEVERSION 0x00400000 // pretends the platvorm is a given window version / subversion #define FULLRECTBLT 0x00800000 // blit to primary surface using NULL source & dest rect #define NOPALETTEUPDATE 0x01000000 // Do not refresh primary surface on palette updates +#define SUPPRESSIME 0x02000000 // suppress IME +#define NOBANNER 0x04000000 // suppress fancy logo & banneer effects +#define WINDOWIZE 0x08000000 // Run in a Window (default TRUE) +#define LIMITRESOURCES 0x10000000 // Limit resources to fit an old program's expectations // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/build/dxwnd.dll b/build/dxwnd.dll index 5768299..fb64dee 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbf061c43c802f58ed4d3d3d76595047fe9d3ce6b6fce822bdfb492e5d945845 -size 277504 +oid sha256:e57051bb941d5540bc3ff00785953fc614543989bd451522af2759f240fb2298 +size 297984 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 214197f..908d25e 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:752c9f62bae2b46682c477c8a72062dda4c38f33732bcd62be8b4b9324bebdb8 -size 488960 +oid sha256:deb192e6aa9d77b5a60a663c39fe0d39a6ca3c100179a9e0c71e6f11d85d18b4 +size 498688 diff --git a/build/dxwnd.sample.ini b/build/dxwnd.sample.ini index fdc3617..de2462e 100644 --- a/build/dxwnd.sample.ini +++ b/build/dxwnd.sample.ini @@ -89,7 +89,7 @@ path5=d:\Games\ALIFE\ALIFE.EXE module5= ver5=1 flag5=134217762 -flagg5=160 +flagg5=32 tflag5=2 initx5=0 inity5=0 @@ -105,9 +105,9 @@ title6=Age of Empires path6=D:\Games\Age of Empires\EMPIRES.EXE module6= ver6=0 -flag6=402653219 -flagg6=4112 -tflag6=258 +flag6=402653347 +flagg6=2166800 +tflag6=259 initx6=0 inity6=0 minx6=0 @@ -154,11 +154,11 @@ sizx8=800 sizy8=600 title9=Age of Wonders path9=D:\Games\Age of Wonders\AoW.exe -module9= +module9=VideoP.dpl vcl30.dpl ver9=0 flag9=545390594 flagg9=17 -tflag9=259 +tflag9=130 initx9=0 inity9=0 minx9=0 @@ -989,7 +989,7 @@ title58=Dream Aquarium path58=D:\Program Files\Dream Aquarium\Dream_Aquarium.scr module58= ver58=9 -flag58=671088641 +flag58=679477249 flagg58=303104 tflag58=256 initx58=0 @@ -1059,7 +1059,7 @@ module62= ver62=0 flag62=134545443 flagg62=18 -tflag62=259 +tflag62=2 initx62=0 inity62=0 minx62=0 @@ -2264,7 +2264,7 @@ title133=Resident Evil path133=D:\Games\Resident Evil\residentevil.patched.exe module133= ver133=1 -flag133=134226019 +flag133=134217827 flagg133=128 tflag133=2 initx133=0 @@ -2944,9 +2944,9 @@ title173=Tomb Raider 2 the Golden Mask path173=D:\Games\TR2 Golden Mask\T2GOLD.EXE module173= ver173=0 -flag173=704643106 -flagg173=17842176 -tflag173=259 +flag173=570687522 +flagg173=3227648 +tflag173=291 initx173=0 inity173=0 minx173=0 @@ -3065,7 +3065,7 @@ module180= ver180=0 flag180=671236130 flagg180=256 -tflag180=259 +tflag180=258 initx180=0 inity180=0 minx180=0 @@ -3080,9 +3080,9 @@ title181=Warcraft 2 Battlenet Edition path181=D:\Games\Warcraft 2\Warcraft II BNE.exe module181= ver181=0 -flag181=268452003 -flagg181=16 -tflag181=259 +flag181=24739 +flagg181=2183184 +tflag181=3 initx181=0 inity181=0 minx181=0 @@ -3201,7 +3201,7 @@ maxfps2=0 maxfps3=0 maxfps4=0 maxfps5=0 -maxfps6=10 +maxfps6=40 maxfps7=40 maxfps8=0 maxfps9=0 @@ -3982,12 +3982,12 @@ maxfps198=20 initts198=-9 title199=Urban Assault CD path199=D:\Games\Urban Assault CD\UA.EXE -module199= +module199=quartz opengllib199= ver199=0 -flag199=671236130 -flagg199=33024 -tflag199=259 +flag199=537280546 +flagg199=8388864 +tflag199=435 initx199=0 inity199=0 minx199=0 @@ -4044,9 +4044,9 @@ title202=Pandemonium 2 path202=D:\Games\Pandemonium 2\pandy.exe module202= opengllib202= -ver202=1 -flag202=134217730 -flagg202=1048577 +ver202=0 +flag202=671219714 +flagg202=1 tflag202=0 initx202=0 inity202=0 @@ -4126,7 +4126,7 @@ module206= opengllib206= ver206=0 flag206=2 -flagg206=16777248 +flagg206=32 tflag206=0 initx206=0 inity206=0 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index 213aabb..1c303e9 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -54,3 +54,9 @@ Hooked extDirectDrawEnumerate/Ex ddraw calls to handle Hide multi-monitor option. Detected directshow activation through CoCreateInstance and hooked quartz.dll segment: now Urban Assault movies don't require "Full RECT Blit" option to be set. Updated DDSurface::Release hook + +v2.02.12 +GUI: Tabbed setup panel. More space for more future options. +DLL: (optional) splash screen +probably, some regression bugs.... + diff --git a/dll/Thumbs.db b/dll/Thumbs.db new file mode 100644 index 0000000..dfd424f Binary files /dev/null and b/dll/Thumbs.db differ diff --git a/dll/dderr.c b/dll/dderr.c new file mode 100644 index 0000000..a0b8dfe --- /dev/null +++ b/dll/dderr.c @@ -0,0 +1,138 @@ +/* +* +* Function : DDError() +* +* Purpose : Traces an error (DirectDraw) +* +*/ + +void DDError(HRESULT hErr) +{ +char dderr[256]; +char string[1024]; + +switch (hErr) +{ +case DDERR_DDSCAPSCOMPLEXREQUIRED : sprintf(dderr, "DDERR_DDSCAPSCOMPLEXREQUIRED: New for DirectX 7.0. The surface requires the DDSCAPS_COMPLEX flag."); break; +case DDERR_DEVICEDOESNTOWNSURFACE : sprintf(dderr, "DDERR_DEVICEDOESNTOWNSURFACE: Surfaces created by one DirectDraw device cannot be used directly by another DirectDraw device."); break; +case DDERR_EXPIRED : sprintf(dderr, "DDERR_EXPIRED: The data has expired and is therefore no longer valid."); break; +case DDERR_INVALIDSTREAM : sprintf(dderr, "DDERR_INVALIDSTREAM: The specified stream contains invalid data."); break; +case DDERR_MOREDATA : sprintf(dderr, "DDERR_MOREDATA: There is more data available than the specified buffer size can hold."); break; +case DDERR_NEWMODE : sprintf(dderr, "DDERR_NEWMODE: New for DirectX 7.0. When IDirectDraw7::StartModeTest is called with the DDSMT_ISTESTREQUIRED flag, it may return this value to denote that some or all of the resolutions can and should be tested. IDirectDraw7::EvaluateMode returns this value to indicate that the test has switched to a new display mode."); break; +case DDERR_NODRIVERSUPPORT : sprintf(dderr, "DDERR_NODRIVERSUPPORT: New for DirectX 7.0. Testing cannot proceed because the display adapter driver does not enumerate refresh rates."); break; +case DDERR_NOFOCUSWINDOW : sprintf(dderr, "DDERR_NOFOCUSWINDOW: An attempt was made to create or set a device window without first setting the focus window."); break; +case DDERR_NOMONITORINFORMATION : sprintf(dderr, "DDERR_NOMONITORINFORMATION: New for DirectX 7.0. Testing cannot proceed because the monitor has no associated EDID data."); break; +case DDERR_NONONLOCALVIDMEM : sprintf(dderr, "DDERR_NONONLOCALVIDMEM: An attempt was made to allocate nonlocal video memory from a device that does not support nonlocal video memory."); break; +case DDERR_NOOPTIMIZEHW : sprintf(dderr, "DDERR_NOOPTIMIZEHW: The device does not support optimized surfaces."); break; +case DDERR_NOSTEREOHARDWARE : sprintf(dderr, "DDERR_NOSTEREOHARDWARE: There is no stereo hardware present or available."); break; +case DDERR_NOSURFACELEFT : sprintf(dderr, "DDERR_NOSURFACELEFT: There is no hardware present that supports stereo surfaces."); break; +case DDERR_NOTLOADED : sprintf(dderr, "DDERR_NOTLOADED: The surface is an optimized surface, but it has not yet been allocated any memory."); break; +case DDERR_OVERLAPPINGRECTS : sprintf(dderr, "DDERR_OVERLAPPINGRECTS: The source and destination rectangles are on the same surface and overlap each other."); break; +case DDERR_TESTFINISHED : sprintf(dderr, "DDERR_TESTFINISHED: New for DirectX 7.0. When returned by the IDirectDraw7::StartModeTest method, this value means that no test could be initiated because all the resolutions chosen for testing already have refresh rate information in the registry. When returned by IDirectDraw7::EvaluateMode, the value means that DirectDraw has completed a refresh rate test."); break; +case DDERR_VIDEONOTACTIVE : sprintf(dderr, "DDERR_VIDEONOTACTIVE: The video port is not active."); break; +case DDERR_ALREADYINITIALIZED : sprintf(dderr, "DDERR_ALREADYINITIALIZED: The object has already been initialized."); break; +case DDERR_CANNOTATTACHSURFACE : sprintf(dderr, "DDERR_CANNOTATTACHSURFACE: A surface cannot be attached to another requested surface."); break; +case DDERR_CANNOTDETACHSURFACE : sprintf(dderr, "DDERR_CANNOTDETACHSURFACE: A surface cannot be detached from another requested surface."); break; +case DDERR_CURRENTLYNOTAVAIL : sprintf(dderr, "DDERR_CURRENTLYNOTAVAIL: No support is currently available"); break; +case DDERR_EXCEPTION : sprintf(dderr, "DDERR_EXCEPTION: An exception was encountered while performing the requested operation."); break; +case DDERR_GENERIC : sprintf(dderr, "DDERR_GENERIC: There is an undefined error condition."); break; +case DDERR_HEIGHTALIGN : sprintf(dderr, "DDERR_HEIGHTALIGN: The height of the provided rectangle is not a multiple of the required alignment."); break; +case DDERR_INCOMPATIBLEPRIMARY : sprintf(dderr, "DDERR_INCOMPATIBLEPRIMARY: The primary surface creation request does not match the existing primary surface."); break; +case DDERR_INVALIDCAPS : sprintf(dderr, "DDERR_INVALIDCAPS: One or more of the capability bits passed to the callback function are incorrect."); break; +case DDERR_INVALIDCLIPLIST : sprintf(dderr, "DDERR_INVALIDCLIPLIST: DirectDraw does not support the provided clip list."); break; +case DDERR_INVALIDMODE : sprintf(dderr, "DDERR_INVALIDMODE: DirectDraw does not support the requested mode."); break; +case DDERR_INVALIDOBJECT : sprintf(dderr, "DDERR_INVALIDOBJECT: DirectDraw received a pointer that was an invalid DirectDraw object."); break; +case DDERR_INVALIDPARAMS : sprintf(dderr, "DDERR_INVALIDPARAMS: One or more of the parameters passed to the method are incorrect."); break; +case DDERR_INVALIDPIXELFORMAT : sprintf(dderr, "DDERR_INVALIDPIXELFORMAT: The pixel format was invalid as specified."); break; +case DDERR_INVALIDRECT : sprintf(dderr, "DDERR_INVALIDRECT: The provided rectangle was invalid."); break; +case DDERR_LOCKEDSURFACES : sprintf(dderr, "DDERR_LOCKEDSURFACES: One or more surfaces are locked, causing the failure of the requested operation."); break; +case DDERR_NO3D : sprintf(dderr, "DDERR_NO3D: No 3-D hardware or emulation is present."); break; +case DDERR_NOALPHAHW : sprintf(dderr, "DDERR_NOALPHAHW: No alpha-acceleration hardware is present or available, causing the failure of the requested operation."); break; +case DDERR_NOCLIPLIST : sprintf(dderr, "DDERR_NOCLIPLIST: No clip list is available."); break; +case DDERR_NOCOLORCONVHW : sprintf(dderr, "DDERR_NOCOLORCONVHW: No color-conversion hardware is present or available."); break; +case DDERR_NOCOOPERATIVELEVELSET : sprintf(dderr, "DDERR_NOCOOPERATIVELEVELSET: A create function was called without the IDirectDraw7::SetCooperativeLevel method."); break; +case DDERR_NOCOLORKEY : sprintf(dderr, "DDERR_NOCOLORKEY: The surface does not currently have a color key."); break; +case DDERR_NOCOLORKEYHW : sprintf(dderr, "DDERR_NOCOLORKEYHW: There is no hardware support for the destination color key."); break; +case DDERR_NODIRECTDRAWSUPPORT : sprintf(dderr, "DDERR_NODIRECTDRAWSUPPORT: DirectDraw support is not possible with the current display driver."); break; +case DDERR_NOEXCLUSIVEMODE : sprintf(dderr, "DDERR_NOEXCLUSIVEMODE: The operation requires the application to have exclusive mode, but the application does not have exclusive mode."); break; +case DDERR_NOFLIPHW : sprintf(dderr, "DDERR_NOFLIPHW: Flipping visible surfaces is not supported."); break; +case DDERR_NOGDI : sprintf(dderr, "DDERR_NOGDI: No GDI is present."); break; +case DDERR_NOMIRRORHW : sprintf(dderr, "DDERR_NOMIRRORHW: No mirroring hardware is present or available."); break; +case DDERR_NOTFOUND : sprintf(dderr, "DDERR_NOTFOUND: The requested item was not found."); break; +case DDERR_NOOVERLAYHW : sprintf(dderr, "DDERR_NOOVERLAYHW: No overlay hardware is present or available."); break; +case DDERR_NORASTEROPHW : sprintf(dderr, "DDERR_NORASTEROPHW: No appropriate raster-operation hardware is present or available."); break; +case DDERR_NOROTATIONHW : sprintf(dderr, "DDERR_NOROTATIONHW: No rotation hardware is present or available."); break; +case DDERR_NOSTRETCHHW : sprintf(dderr, "DDERR_NOSTRETCHHW: There is no hardware support for stretching."); break; +case DDERR_NOT4BITCOLOR : sprintf(dderr, "DDERR_NOT4BITCOLOR: The DirectDrawSurface object is not using a 4-bit color palette, and the requested operation requires a 4-bit color palette."); break; +case DDERR_NOT4BITCOLORINDEX : sprintf(dderr, "DDERR_NOT4BITCOLORINDEX: The DirectDrawSurface object is not using a 4-bit color index palette, and the requested operation requires a 4-bit color index palette."); break; +case DDERR_NOT8BITCOLOR : sprintf(dderr, "DDERR_NOT8BITCOLOR: The DirectDrawSurface object is not using an 8-bit color palette, and the requested operation requires an 8-bit color palette."); break; +case DDERR_NOTEXTUREHW : sprintf(dderr, "DDERR_NOTEXTUREHW: The operation cannot be carried out because no texture-mapping hardware is present or available."); break; +case DDERR_NOVSYNCHW : sprintf(dderr, "DDERR_NOVSYNCHW: There is no hardware support for vertical blank synchronized operations."); break; +case DDERR_NOZBUFFERHW : sprintf(dderr, "DDERR_NOZBUFFERHW: The operation to create a z-buffer in display memory or to perform a blit, using a z-buffer cannot be carried out because there is no hardware support for z-buffers."); break; +case DDERR_NOZOVERLAYHW : sprintf(dderr, "DDERR_NOZOVERLAYHW: The overlay surfaces cannot be z-layered, based on the z-order because the hardware does not support z-ordering of overlays."); break; +case DDERR_OUTOFCAPS : sprintf(dderr, "DDERR_OUTOFCAPS: The hardware needed for the requested operation has already been allocated."); break; +case DDERR_OUTOFMEMORY : sprintf(dderr, "DDERR_OUTOFMEMORY: DirectDraw does not have enough memory to perform the operation."); break; +case DDERR_OUTOFVIDEOMEMORY : sprintf(dderr, "DDERR_OUTOFVIDEOMEMORY: DirectDraw does not have enough display memory to perform the operation."); break; +case DDERR_OVERLAYCANTCLIP : sprintf(dderr, "DDERR_OVERLAYCANTCLIP: The hardware does not support clipped overlays."); break; +case DDERR_OVERLAYCOLORKEYONLYONEACTIVE : sprintf(dderr, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE: An attempt was made to have more than one color key active on an overlay."); break; +case DDERR_PALETTEBUSY : sprintf(dderr, "DDERR_PALETTEBUSY: Access to this palette is refused because the palette is locked by another thread."); break; +case DDERR_COLORKEYNOTSET : sprintf(dderr, "DDERR_COLORKEYNOTSET: No source color key is specified for this operation."); break; +case DDERR_SURFACEALREADYATTACHED : sprintf(dderr, "DDERR_SURFACEALREADYATTACHED: An attempt was made to attach a surface to another surface to which it is already attached."); break; +case DDERR_SURFACEALREADYDEPENDENT : sprintf(dderr, "DDERR_SURFACEALREADYDEPENDENT: An attempt was made to make a surface a dependency of another surface on which it is already dependent."); break; +case DDERR_SURFACEBUSY : sprintf(dderr, "DDERR_SURFACEBUSY: Access to the surface is refused because the surface is locked by another thread."); break; +case DDERR_CANTLOCKSURFACE : sprintf(dderr, "DDERR_CANTLOCKSURFACE: Access to this surface is refused because an attempt was made to lock the primary surface without DCI support."); break; +case DDERR_SURFACEISOBSCURED : sprintf(dderr, "DDERR_SURFACEISOBSCURED: Access to the surface is refused because the surface is obscured."); break; +case DDERR_SURFACELOST : sprintf(dderr, "DDERR_SURFACELOST: Access to the surface is refused because the surface memory is gone. Call the IDirectDrawSurface7::Restore method on this surface to restore the memory associated with it."); break; +case DDERR_SURFACENOTATTACHED : sprintf(dderr, "DDERR_SURFACENOTATTACHED: The requested surface is not attached."); break; +case DDERR_TOOBIGHEIGHT : sprintf(dderr, "DDERR_TOOBIGHEIGHT: The height requested by DirectDraw is too large."); break; +case DDERR_TOOBIGSIZE : sprintf(dderr, "DDERR_TOOBIGSIZE: The size requested by DirectDraw is too large. However, the individual height and width are valid sizes."); break; +case DDERR_TOOBIGWIDTH : sprintf(dderr, "DDERR_TOOBIGWIDTH: The width requested by DirectDraw is too large."); break; +case DDERR_UNSUPPORTED : sprintf(dderr, "DDERR_UNSUPPORTED: The operation is not supported."); break; +case DDERR_UNSUPPORTEDFORMAT : sprintf(dderr, "DDERR_UNSUPPORTEDFORMAT: The pixel format requested is not supported by DirectDraw."); break; +case DDERR_UNSUPPORTEDMASK : sprintf(dderr, "DDERR_UNSUPPORTEDMASK: The bitmask in the pixel format requested is not supported by DirectDraw."); break; +case DDERR_VERTICALBLANKINPROGRESS : sprintf(dderr, "DDERR_VERTICALBLANKINPROGRESS: A vertical blank is in progress."); break; +case DDERR_WASSTILLDRAWING : sprintf(dderr, "DDERR_WASSTILLDRAWING: The previous blit operation that is transferring information to or from this surface is incomplete."); break; +case DDERR_XALIGN : sprintf(dderr, "DDERR_XALIGN: The provided rectangle was not horizontally aligned on a required boundary."); break; +case DDERR_INVALIDDIRECTDRAWGUID : sprintf(dderr, "DDERR_INVALIDDIRECTDRAWGUID: The globally unique identifier (GUID) passed to the DirectDrawCreate function is not a valid DirectDraw driver identifier."); break; +case DDERR_DIRECTDRAWALREADYCREATED : sprintf(dderr, "DDERR_DIRECTDRAWALREADYCREATED: A DirectDraw object representing this driver has already been created for this process."); break; +case DDERR_NODIRECTDRAWHW : sprintf(dderr, "DDERR_NODIRECTDRAWHW: Hardware-only DirectDraw object creation is not possible; the driver does not support any hardware."); break; +case DDERR_PRIMARYSURFACEALREADYEXISTS : sprintf(dderr, "DDERR_PRIMARYSURFACEALREADYEXISTS: This process has already created a primary surface."); break; +case DDERR_NOEMULATION : sprintf(dderr, "DDERR_NOEMULATION: Software emulation is not available."); break; +case DDERR_REGIONTOOSMALL : sprintf(dderr, "DDERR_REGIONTOOSMALL: The region passed to the IDirectDrawClipper::GetClipList method is too small."); break; +case DDERR_CLIPPERISUSINGHWND : sprintf(dderr, "DDERR_CLIPPERISUSINGHWND: An attempt was made to set a clip list for a DirectDrawClipper object that is already monitoring a window handle."); break; +case DDERR_NOCLIPPERATTACHED : sprintf(dderr, "DDERR_NOCLIPPERATTACHED: No DirectDrawClipper object is attached to the surface object."); break; +case DDERR_NOHWND : sprintf(dderr, "DDERR_NOHWND: Clipper notification requires a window handle, or no window handle has been previously set as the cooperative level window handle."); break; +case DDERR_HWNDSUBCLASSED : sprintf(dderr, "DDERR_HWNDSUBCLASSED: DirectDraw is prevented from restoring state because the DirectDraw cooperative-level window handle has been subclassed."); break; +case DDERR_HWNDALREADYSET : sprintf(dderr, "DDERR_HWNDALREADYSET: The DirectDraw cooperative-level window handle has already been set. It cannot be reset while the process has surfaces or palettes created."); break; +case DDERR_NOPALETTEATTACHED : sprintf(dderr, "DDERR_NOPALETTEATTACHED: No palette object is attached to this surface."); break; +case DDERR_NOPALETTEHW : sprintf(dderr, "DDERR_NOPALETTEHW: There is no hardware support for 16- or 256-color palettes."); break; +case DDERR_BLTFASTCANTCLIP : sprintf(dderr, "DDERR_BLTFASTCANTCLIP: A DirectDrawClipper object is attached to a source surface that has passed into a call to the IDirectDrawSurface7::BltFast method."); break; +case DDERR_NOBLTHW : sprintf(dderr, "DDERR_NOBLTHW: No blitter hardware is present."); break; +case DDERR_NODDROPSHW : sprintf(dderr, "DDERR_NODDROPSHW: No DirectDraw raster-operation (ROP) hardware is available."); break; +case DDERR_OVERLAYNOTVISIBLE : sprintf(dderr, "DDERR_OVERLAYNOTVISIBLE: The IDirectDrawSurface7::GetOverlayPosition method was called on a hidden overlay."); break; +case DDERR_NOOVERLAYDEST : sprintf(dderr, "DDERR_NOOVERLAYDEST: The IDirectDrawSurface7::GetOverlayPosition method is called on an overlay that the IDirectDrawSurface7::UpdateOverlay method has not been called on to establish as a destination."); break; +case DDERR_INVALIDPOSITION : sprintf(dderr, "DDERR_INVALIDPOSITION: The position of the overlay on the destination is no longer legal."); break; +case DDERR_NOTAOVERLAYSURFACE : sprintf(dderr, "DDERR_NOTAOVERLAYSURFACE: An overlay component is called for a nonoverlay surface."); break; +case DDERR_EXCLUSIVEMODEALREADYSET : sprintf(dderr, "DDERR_EXCLUSIVEMODEALREADYSET: An attempt was made to set the cooperative level when it was already set to exclusive."); break; +case DDERR_NOTFLIPPABLE : sprintf(dderr, "DDERR_NOTFLIPPABLE: An attempt was made to flip a surface that cannot be flipped."); break; +case DDERR_CANTDUPLICATE : sprintf(dderr, "DDERR_CANTDUPLICATE: Primary and 3-D surfaces, or surfaces that are implicitly created, cannot be duplicated."); break; +case DDERR_NOTLOCKED : sprintf(dderr, "DDERR_NOTLOCKED: An attempt was made to unlock a surface that was not locked."); break; +case DDERR_CANTCREATEDC : sprintf(dderr, "DDERR_CANTCREATEDC: Windows cannot create any more device contexts (DCs), or a DC has requested a palette-indexed surface when the surface had no palette and the display mode was not palette-indexed (in this case DirectDraw cannot select a proper palette into the DC)."); break; +case DDERR_NODC : sprintf(dderr, "DDERR_NODC: No device context (DC) has ever been created for this surface."); break; +case DDERR_WRONGMODE : sprintf(dderr, "DDERR_WRONGMODE: This surface cannot be restored because it was created in a different mode."); break; +case DDERR_IMPLICITLYCREATED : sprintf(dderr, "DDERR_IMPLICITLYCREATED: The surface cannot be restored because it is an implicitly created surface."); break; +case DDERR_NOTPALETTIZED : sprintf(dderr, "DDERR_NOTPALETTIZED: The surface being used is not a palette-based surface."); break; +case DDERR_UNSUPPORTEDMODE : sprintf(dderr, "DDERR_UNSUPPORTEDMODE: The display is currently in an unsupported mode."); break; +case DDERR_NOMIPMAPHW : sprintf(dderr, "DDERR_NOMIPMAPHW: No mipmap-capable texture mapping hardware is present or available."); break; +case DDERR_INVALIDSURFACETYPE : sprintf(dderr, "DDERR_INVALIDSURFACETYPE: The surface was of the wrong type."); break; +case DDERR_DCALREADYCREATED : sprintf(dderr, "DDERR_DCALREADYCREATED: A device context (DC) has already been returned for this surface. Only one DC can be retrieved for each surface."); break; +case DDERR_CANTPAGELOCK : sprintf(dderr, "DDERR_CANTPAGELOCK: An attempt to page-lock a surface failed. Page lock does not work on a display-memory surface or an emulated primary surface."); break; +case DDERR_CANTPAGEUNLOCK : sprintf(dderr, "DDERR_CANTPAGEUNLOCK: An attempt to page-unlock a surface failed. Page unlock does not work on a display-memory surface or an emulated primary surface."); break; +case DDERR_NOTPAGELOCKED : sprintf(dderr, "DDERR_NOTPAGELOCKED: An attempt was made to page-unlock a surface with no outstanding page locks."); break; +case DDERR_NOTINITIALIZED : sprintf(dderr, "DDERR_NOTINITIALIZED: An attempt was made to call an interface method of a DirectDraw object created by CoCreateInstance before the object was initialized."); break; +default : sprintf(dderr, "Unknown Error"); break; +} + +sprintf(string, "DirectDraw Error %s\n", dderr); +OutputDebugString(string); +} \ No newline at end of file diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index 69aec6b..d1e0360 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -13,6 +13,8 @@ #include "syslibs.h" #undef DXWDECLARATIONS #include "dxhelper.h" +#include "Ime.h" +#include "Winnls32.h" dxwCore dxw; @@ -40,7 +42,7 @@ static char *Flag2Names[32]={ "LIMITFPS", "SKIPFPS", "SHOWFPS", "HIDEMULTIMONITOR", "TIMESTRETCH", "HOOKOPENGL", "WALLPAPERMODE", "SHOWHWCURSOR", "HOOKGDI", "SHOWFPSOVERLAY", "FAKEVERSION", "FULLRECTBLT", - "NOPALETTEUPDATE", "", "", "", + "NOPALETTEUPDATE", "SUPPRESSIME", "NOBANNER", "WINDOWIZE", "", "", "", "", }; @@ -358,6 +360,8 @@ void AdjustWindowPos(HWND hwnd, DWORD width, DWORD height) if(!(*pSetWindowPos)(hwnd, 0, wp.x, wp.y, wp.cx, wp.cy, 0)){ OutTraceE("AdjustWindowPos: ERROR err=%d at %d\n", GetLastError(), __LINE__); } + + dxw.ShowBanner(hwnd); return; } @@ -562,6 +566,31 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp #endif switch(message){ + case WM_NCCREATE: + if(dxw.dwFlags2 & SUPPRESSIME){ + OutTraceD("WindowProc: SUPPRESS IME\n"); + typedef BOOL (WINAPI *ImmDisableIME_Type)(DWORD); + ImmDisableIME_Type pImmDisableIME; + HMODULE ImmLib; + ImmLib=(*pLoadLibraryA)("Imm32"); + pImmDisableIME=(ImmDisableIME_Type)(*pGetProcAddress)(ImmLib,"ImmDisableIME"); + (*pImmDisableIME)(-1); + } + break; + case WM_IME_SETCONTEXT: + case WM_IME_NOTIFY: + case WM_IME_CONTROL: + case WM_IME_COMPOSITIONFULL: + case WM_IME_SELECT: + case WM_IME_CHAR: + case WM_IME_REQUEST: + case WM_IME_KEYDOWN: + case WM_IME_KEYUP: + if(dxw.dwFlags2 & SUPPRESSIME){ + OutTraceD("WindowProc: SUPPRESS WinMsg=[0x%x]%s(%x,%x)\n", message, ExplainWinMessage(message), wparam, lparam); + return 0; + } + break; case WM_NCHITTEST: if((dxw.dwFlags2 & FIXNCHITTEST) && (dxw.dwFlags1 & MODIFYMOUSE)){ // mouse processing POINT cursor; @@ -1133,6 +1162,7 @@ void HookExceptionHandler(void) void HookModule(char *module, int dxversion) { HookSysLibs(module); + //if(dxw.dwFlags2 & SUPPRESSIME) HookImeLib(module); if(dxw.dwFlags2 & HOOKGDI) HookGDILib(module); if(dxw.dwFlags1 & HOOKDI) HookDirectInput(module, dxversion); HookDirectDraw(module, dxversion); @@ -1141,6 +1171,59 @@ void HookModule(char *module, int dxversion) if(dxw.dwFlags2 & HOOKOPENGL) HookOpenGLLibs(module, dxw.CustomOpenGLLib); } +void ForceHookOpenGL() // to do ..... +{ + HMODULE hGlLib; + //hGlLib=(*pLoadLibraryA)("OpenGL32.dll"); + hGlLib=LoadLibrary("OpenGL32.dll"); + OutTrace("hGlLib=%x\n",hGlLib); + pglViewport=(glViewport_Type)GetProcAddress(hGlLib, "glViewport"); + if(pglViewport) + HookAPI(NULL, "OpenGL32.dll", pglViewport, "glViewport", extglViewport); + //SetHook(void *target, void *hookproc, void **hookedproc, char *hookname); + pglScissor=(glScissor_Type)GetProcAddress(hGlLib, "glScissor"); + if(pglScissor) HookAPI(NULL, "OpenGL32.dll", pglScissor, "glScissor", extglScissor); + pglGetIntegerv=(glGetIntegerv_Type)GetProcAddress(hGlLib, "glGetIntegerv"); + if(pglGetIntegerv) HookAPI(NULL, "OpenGL32.dll", pglGetIntegerv, "glGetIntegerv", extglGetIntegerv); + pglDrawBuffer=(glDrawBuffer_Type)GetProcAddress(hGlLib, "glDrawBuffer"); + if(pglDrawBuffer) HookAPI(NULL, "OpenGL32.dll", pglDrawBuffer, "glDrawBuffer", extglDrawBuffer); +} + +void DisableIME() +{ + BOOL res; + HMODULE hm; + hm=GetModuleHandle("User32"); + // here, GetProcAddress may be not hooked yet! + if(!pGetProcAddress) pGetProcAddress=GetProcAddress; +#ifdef USEWINNLSENABLE + typedef BOOL (WINAPI *WINNLSEnableIME_Type)(HWND, BOOL); + WINNLSEnableIME_Type pWINNLSEnableIME; + pWINNLSEnableIME=(WINNLSEnableIME_Type)(*pGetProcAddress)(hm, "WINNLSEnableIME"); + OutTrace("DisableIME: GetProcAddress(WINNLSEnableIME)=%x\n", pWINNLSEnableIME); + if(!pWINNLSEnableIME) return; + SetLastError(0); + res=(*pWINNLSEnableIME)(NULL, FALSE); + OutTrace("IME previous state=%x error=%d\n", res, GetLastError()); +#else + typedef LRESULT (WINAPI *SendIMEMessage_Type)(HWND, LPARAM); + SendIMEMessage_Type pSendIMEMessage; + pSendIMEMessage=(SendIMEMessage_Type)(*pGetProcAddress)(hm, "SendIMEMessage"); + OutTrace("DisableIME: GetProcAddress(SendIMEMessage)=%x\n", pSendIMEMessage); + if(!pSendIMEMessage) return; + HGLOBAL imeh; + IMESTRUCT *imes; + imeh=GlobalAlloc(GMEM_MOVEABLE|GMEM_SHARE, sizeof(IMESTRUCT)); + imes=(IMESTRUCT *)imeh; + //imes->fnc=IME_SETLEVEL; + imes->fnc=7; + imes->wParam=1; + SetLastError(0); + res=(*pSendIMEMessage)(dxw.GethWnd(), (LPARAM)imeh); + OutTrace("res=%x error=%d\n", res, GetLastError()); +#endif +} + int HookInit(TARGETMAP *target, HWND hwnd) { BOOL res; @@ -1171,14 +1254,16 @@ int HookInit(TARGETMAP *target, HWND hwnd) } if(dxw.dwFlags1 & HANDLEEXCEPTIONS) HookExceptionHandler(); - if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(NULL); + //if(dxw.dwFlags2 & SUPPRESSIME) DisableIME(); if (dxw.dwTFlags & DXPROXED){ HookDDProxy(NULL, dxw.dwTargetDDVersion); return 0; } + //ForceHookOpenGL(); + // make InitPosition used for both DInput and DDraw InitPosition(target->initx, target->inity, target->minx, target->miny, target->maxx, target->maxy); @@ -1189,6 +1274,8 @@ int HookInit(TARGETMAP *target, HWND hwnd) HookModule(NULL, dxw.dwTargetDDVersion); sModule=strtok(dxw.gsModules," "); while (sModule) { + HMODULE hm; + hm=(*pLoadLibraryA)(sModule); OutTraceD("HookInit: hooking additional module=%s\n", sModule); if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(sModule); HookModule(sModule, dxw.dwTargetDDVersion); @@ -1207,6 +1294,7 @@ int HookInit(TARGETMAP *target, HWND hwnd) if(!res) OutTraceE("MoveWindow ERROR: dxw.hParentWnd=%x err=%d at %d\n", dxw.hParentWnd, GetLastError(), __LINE__); } + return 0; } diff --git a/dll/dxhook.h b/dll/dxhook.h index 8c3d789..1e59b44 100644 --- a/dll/dxhook.h +++ b/dll/dxhook.h @@ -1,8 +1,9 @@ -int HookDirectDraw(char *, int); -int HookDDProxy(char *, int); -int HookDirect3D(char *, int); -int HookOle32(char *, int); -int HookDirectInput(char *, int); -void InitPosition(int, int, int, int, int, int); +extern int HookDirectDraw(char *, int); +extern int HookDDProxy(char *, int); +extern int HookDirect3D(char *, int); +extern int HookOle32(char *, int); +extern int HookDirectInput(char *, int); +extern void HookImeLib(char *); +extern void InitPosition(int, int, int, int, int, int); //void InitWindowPos(int, int, int, int); extern LPCSTR ProcToString(LPCSTR proc); diff --git a/dll/dxwbanner.bmp b/dll/dxwbanner.bmp new file mode 100644 index 0000000..1926d51 Binary files /dev/null and b/dll/dxwbanner.bmp differ diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index a48f16a..085aa9e 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -2,6 +2,7 @@ #include "dxwnd.h" #include "dxwcore.hpp" #include "syslibs.h" +#include "resource.h" /* ------------------------------------------------------------------ */ // Constructor, destructor, initialization.... @@ -611,4 +612,44 @@ char *dxwCore::GetTSCaption(int shift) char *dxwCore::GetTSCaption(void) { return GetTSCaption(TimeShift); +} + +void dxwCore::ShowBanner(HWND hwnd) +{ + static BOOL JustOnce=FALSE; + extern HMODULE hInst; + BITMAP bm; + HDC hClientDC; + HBITMAP g_hbmBall; + RECT client; + + if(JustOnce || (dwFlags2 & NOBANNER)) return; + JustOnce=TRUE; + + hClientDC=GetDC(hwnd); + (*pGetClientRect)(hwnd, &client); + //BitBlt(hClientDC, 0, 0, wp.cx, wp.cy, NULL, 0, 0, BLACKNESS); + BitBlt(hClientDC, 0, 0, client.right, client.bottom, NULL, 0, 0, BLACKNESS); + g_hbmBall = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BANNER)); + HDC hdcMem = CreateCompatibleDC(hClientDC); + HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, g_hbmBall); + GetObject(g_hbmBall, sizeof(bm), &bm); + for (int i=1; i<=16; i++){ + int w, h; + w=(bm.bmWidth*i)/8; + h=(bm.bmHeight*i)/8; + StretchBlt(hClientDC, (client.right-w)/2, (client.bottom-h)/2, w, h, hdcMem, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY); + Sleep(40); + } + for (int i=16; i>=8; i--){ + int w, h; + w=(bm.bmWidth*i)/8; + h=(bm.bmHeight*i)/8; + BitBlt(hClientDC, 0, 0, client.right, client.bottom, NULL, 0, 0, BLACKNESS); + StretchBlt(hClientDC, (client.right-w)/2, (client.bottom-h)/2, w, h, hdcMem, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY); + Sleep(40); + } + SelectObject(hdcMem, hbmOld); + DeleteDC(hdcMem); + Sleep(200); } \ No newline at end of file diff --git a/dll/dxwcore.hpp b/dll/dxwcore.hpp index 2415f3e..5d32bdd 100644 --- a/dll/dxwcore.hpp +++ b/dll/dxwcore.hpp @@ -50,6 +50,7 @@ public: // methods char *GetTSCaption(int); char *GetTSCaption(void); void DoSlow(int); + void ShowBanner(HWND); public: // simple data variables DDPIXELFORMAT ActualPixelFormat; diff --git a/dll/dxwnd.aps b/dll/dxwnd.aps new file mode 100644 index 0000000..d183332 Binary files /dev/null and b/dll/dxwnd.aps differ diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 1b347f7..6a25ec2 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include #include "dxwnd.h" -#define VERSION "2.02.11" +#define VERSION "2.02.12" LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam); diff --git a/dll/dxwnd.rc b/dll/dxwnd.rc new file mode 100644 index 0000000..2705594 --- /dev/null +++ b/dll/dxwnd.rc @@ -0,0 +1,70 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_BANNER BITMAP "dxwbanner.bmp" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/dll/dxwnd.vs2005.vcproj b/dll/dxwnd.vs2005.vcproj deleted file mode 100644 index 15b3c7a..0000000 --- a/dll/dxwnd.vs2005.vcproj +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index eb53580..089797b 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/dxwnd.vs2008.vcproj b/dll/dxwnd.vs2008.vcproj index 2a1b7ce..bef3683 100644 --- a/dll/dxwnd.vs2008.vcproj +++ b/dll/dxwnd.vs2008.vcproj @@ -272,6 +272,10 @@ RelativePath="dxwnd.def" > + + @@ -340,6 +344,10 @@ /> + + @@ -381,6 +389,10 @@ RelativePath=".\hddraw.h" > + + @@ -390,6 +402,10 @@ Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" > + + diff --git a/dll/hddraw.cpp b/dll/hddraw.cpp index 44c8903..5875bf2 100644 --- a/dll/hddraw.cpp +++ b/dll/hddraw.cpp @@ -525,6 +525,8 @@ HRESULT STDAPICALLTYPE extCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, res=extDirectDrawCreateEx(NULL, (LPDIRECTDRAW *)&ppv, IID_IDirectDraw7, 0); if(res)OutTraceD("DirectDrawCreateEx: res=%x(%s)\n", res, ExplainDDError(res)); break; + case 0xe436ebb3: + break; } } @@ -2844,6 +2846,7 @@ HRESULT WINAPI extLock(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect, LPDIRECTDRAWSUR HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFACE lpdds, LPRECT lprect) { HRESULT res; + //RECT screen, rect; BOOL IsPrim; IsPrim=dxw.IsAPrimarySurface(lpdds); @@ -3325,7 +3328,6 @@ HRESULT WINAPI extReleaseS(LPDIRECTDRAWSURFACE lpdds) IsClosed=1; }; - // avoid crashing.... res = IsClosed ? 0 :(*pReleaseS)(lpdds); OutTraceD("Release(S): lpdds=%x%s refcount=%d\n", lpdds, IsPrim?"(PRIM)":"", res); diff --git a/dll/imelib.cpp b/dll/imelib.cpp new file mode 100644 index 0000000..eb8648a --- /dev/null +++ b/dll/imelib.cpp @@ -0,0 +1,81 @@ +#define _WIN32_WINNT 0x0600 +#define WIN32_LEAN_AND_MEAN +#include +#include +#include +#include "dxwnd.h" +#include "dxwcore.hpp" +#include "dxhook.h" +#include "syslibs.h" +#include "dxhelper.h" + +BOOL WINAPI extImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) +{ + OutTraceD("ImmNotifyIME: hIMC=%x dwAction=%x dwIndex=%x dwValue=%x\n", hIMC, dwAction, dwIndex, dwValue); + return(*pImmNotifyIME)(hIMC, dwAction, dwIndex, dwValue); +} + +HIMC WINAPI extImmCreateContext(void) +{ + OutTraceD("ImmCreateContext\n"); + return(*pImmCreateContext)(); +} + +BOOL WINAPI extImmDestroyContext(HIMC hIMC) +{ + OutTraceD("ImmDestroyContext: hIMC=%x\n", hIMC); + return(*pImmDestroyContext)(hIMC); +} + +BOOL WINAPI extImmSetOpenStatus(HIMC hIMC, BOOL fOpen) +{ + OutTraceD("ImmSetOpenStatus: hIMC=%x fOpen=%x\n", hIMC, fOpen); + return(*pImmSetOpenStatus)(hIMC, fOpen); +} + +HIMC WINAPI extImmAssociateContext(HWND hwnd, HIMC hIMC) +{ + OutTraceD("ImmAssociateContext: hwnd=%x hIMC=%x\n", hwnd, hIMC); + //return NULL; + return(*pImmAssociateContext)(hwnd, hIMC); +} + +BOOL WINAPI extImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm) +{ + OutTraceD("ImmSetCompositionWindow: hIMC=%x lpCompForm=%x\n", hIMC, lpCompForm); + return(*pImmSetCompositionWindow)(hIMC, lpCompForm); +} + +BOOL WINAPI extImmSetCompositionString(HIMC hIMC, DWORD dwIndex, LPVOID lpComp, DWORD dwCompLen, LPVOID lpRead, DWORD dwReadLen) +{ + OutTraceD("ImmSetCompositionString: hIMC=%x dwIndex=%x lpComp=%x dwCompLen=%x dwRead=%x dwReadLen=%x\n", hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen); + return (*pImmSetCompositionString)(hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen); +} + +BOOL WINAPI extImmGetOpenStatus(HIMC hIMC) +{ + OutTraceD("ImmGetOpenStatus: hIMC=%x\n", hIMC); + return(*pImmGetOpenStatus)(hIMC); +} + +void HookImeLib(char *module) +{ + void *tmp; + + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmNotifyIME", extImmNotifyIME); + if(tmp) pImmNotifyIME = (ImmNotifyIME_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmCreateContext", extImmCreateContext); + if(tmp) pImmCreateContext = (ImmCreateContext_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmDestroyContext", extImmDestroyContext); + if(tmp) pImmDestroyContext = (ImmDestroyContext_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmSetOpenStatus", extImmSetOpenStatus); + if(tmp) pImmSetOpenStatus = (ImmSetOpenStatus_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmAssociateContext", extImmAssociateContext); + if(tmp) pImmAssociateContext = (ImmAssociateContext_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmSetCompositionWindow", extImmSetCompositionWindow); + if(tmp) pImmSetCompositionWindow = (ImmSetCompositionWindow_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmSetCompositionStringA", extImmSetCompositionString); + if(tmp) pImmSetCompositionString = (ImmSetCompositionString_Type)tmp; + tmp = HookAPI(module, "IMM32.dll", NULL, "ImmGetOpenStatus", extImmGetOpenStatus); + if(tmp) pImmGetOpenStatus = (ImmGetOpenStatus_Type)tmp; +} diff --git a/dll/resource.h b/dll/resource.h new file mode 100644 index 0000000..52de46d --- /dev/null +++ b/dll/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by dxwnd.rc +// +#define IDB_BITMAP1 101 +#define IDB_BANNER 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/dll/syslibs.cpp b/dll/syslibs.cpp index 066f06a..25b31d3 100644 --- a/dll/syslibs.cpp +++ b/dll/syslibs.cpp @@ -1109,7 +1109,7 @@ int WINAPI extGetDeviceCaps(HDC hdc, int nindex) // are NOT implemented and may cause later troubles! case RASTERCAPS: if(dxw.dwFlags2 & INIT8BPP) { - res = RC_PALETTE; + res |= RC_PALETTE; // v2.02.12 OutTraceD("GetDeviceCaps: fix RASTERCAPS setting RC_PALETTE cap=%x\n",res); } break; @@ -1556,8 +1556,12 @@ HMODULE WINAPI extLoadLibraryA(LPCTSTR lpFileName) idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - - HookSysLibs(NULL); + //if(idx==SYSLIBIDX_MAX) { + // OutTraceD("LoadLibraryA: hook %s\n", lpName); + // HookModule((char *)lpName, 0); + //} + //HookSysLibs(NULL); + HookModule(NULL, 0); return ret; } @@ -1585,8 +1589,12 @@ HMODULE WINAPI extLoadLibraryW(LPCWSTR lpFileName) idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - - HookSysLibs(NULL); + //if(idx==SYSLIBIDX_MAX) { + // OutTraceD("LoadLibraryW: hook %s\n", lpName); + // HookModule((char *)lpName, 0); + //} + //HookSysLibs(NULL); + HookModule(NULL, 0); return ret; } @@ -1614,8 +1622,12 @@ HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - - HookSysLibs(NULL); + //if(idx==SYSLIBIDX_MAX) { + // OutTraceD("LoadLibraryExA: hook %s\n", lpName); + // HookModule((char *)lpName, 0); + //} + //HookSysLibs(NULL); + HookModule(NULL, 0); return ret; } @@ -1643,8 +1655,12 @@ HMODULE WINAPI extLoadLibraryExW(LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - - HookSysLibs(NULL); + //if(idx==SYSLIBIDX_MAX) { + // OutTraceD("LoadLibraryExW: hook %s\n", lpName); + // HookModule((char *)lpName, 0); + //} + //HookSysLibs(NULL); + HookModule(NULL, 0); return ret; } @@ -2782,4 +2798,5 @@ DWORD WINAPI extGetVersion(void) } return dwVersion; -} \ No newline at end of file +} + diff --git a/dll/syslibs.h b/dll/syslibs.h index b2b4f1a..74aa82a 100644 --- a/dll/syslibs.h +++ b/dll/syslibs.h @@ -13,6 +13,15 @@ user32.dll.dll type definitions ====================================================================*/ +typedef BOOL (WINAPI *ImmNotifyIME_Type)(HIMC, DWORD, DWORD, DWORD); +typedef HIMC (WINAPI *ImmCreateContext_Type)(void); +typedef BOOL (WINAPI *ImmDestroyContext_Type)(HIMC); +typedef BOOL (WINAPI *ImmSetOpenStatus_Type)(HIMC, BOOL); +typedef HIMC (WINAPI *ImmAssociateContext_Type)(HWND, HIMC); +typedef BOOL (WINAPI *ImmSetCompositionWindow_Type)(HIMC, LPCOMPOSITIONFORM); +typedef BOOL (WINAPI *ImmSetCompositionString_Type)(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD); +typedef BOOL (WINAPI *ImmGetOpenStatus_Type)(HIMC); + // GDI32.dll: typedef BOOL (WINAPI *BitBlt_Type)(HDC, int, int, int, int, HDC, int, int, DWORD); typedef HDC (WINAPI *CreateCompatibleDC_Type)(HDC); @@ -117,6 +126,15 @@ hooked APIs real pointers #define DXWINITIALIZED #endif +DXWEXTERN ImmNotifyIME_Type pImmNotifyIME DXWINITIALIZED; +DXWEXTERN ImmCreateContext_Type pImmCreateContext DXWINITIALIZED; +DXWEXTERN ImmDestroyContext_Type pImmDestroyContext DXWINITIALIZED; +DXWEXTERN ImmSetOpenStatus_Type pImmSetOpenStatus DXWINITIALIZED; +DXWEXTERN ImmAssociateContext_Type pImmAssociateContext DXWINITIALIZED; +DXWEXTERN ImmSetCompositionWindow_Type pImmSetCompositionWindow DXWINITIALIZED; +DXWEXTERN ImmSetCompositionString_Type pImmSetCompositionString DXWINITIALIZED; +DXWEXTERN ImmGetOpenStatus_Type pImmGetOpenStatus DXWINITIALIZED; + // GDI32.dll: DXWEXTERN BitBlt_Type pGDIBitBlt DXWINITIALIZED; DXWEXTERN CreateCompatibleDC_Type pGDICreateCompatibleDC DXWINITIALIZED; @@ -209,6 +227,15 @@ DXWEXTERN timeGetTime_Type ptimeGetTime DXWINITIALIZED; hook procedures (possibly more tnan one per each API...) ====================================================================*/ +extern BOOL WINAPI extImmNotifyIME(HIMC, DWORD, DWORD, DWORD); +extern HIMC WINAPI extImmCreateContext(void); +extern BOOL WINAPI extImmDestroyContext(HIMC); +extern BOOL WINAPI extImmSetOpenStatus(HIMC, BOOL); +extern HIMC WINAPI extImmAssociateContext(HWND, HIMC); +extern BOOL WINAPI extImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM); +extern BOOL WINAPI extImmSetCompositionString(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD); +extern BOOL WINAPI extImmGetOpenStatus(HIMC); + // GDI32.dll: extern BOOL WINAPI extGDIBitBlt(HDC, int, int, int, int, HDC, int, int, DWORD); extern HDC WINAPI extGDICreateCompatibleDC(HDC); diff --git a/host/Resource.h b/host/Resource.h index 35612be..bec78df 100644 --- a/host/Resource.h +++ b/host/Resource.h @@ -25,6 +25,18 @@ #define IDI_RUN6 148 #define IDD_STATUS 149 #define IDD_TIMESLIDER 150 +#define IDD_TAB_PROGRAM 152 +#define IDD_TAB_LOG 153 +#define IDD_TAB_DIRECTX 154 +#define IDD_TAB_MOUSE 155 +#define IDD_TAB_TIMING 156 +#define IDD_TAB_WINDOW 157 +#define IDD_TAB_EMPTY 158 +#define IDD_TAB_EMPTY1 159 +#define IDD_TAB_OPENGL 159 +#define IDD_TAB_COMPAT 160 +#define IDD_TAB_EMPTY2 161 +#define IDD_TAB_GDI 161 #define IDC_AUTO 300 #define IDC_DIRECTX1 301 #define IDC_DIRECTX7 302 @@ -107,6 +119,8 @@ #define IDC_KEEPASPECTRATIO 1070 #define IDC_LIMITRESOURCES 1071 #define IDC_FORCEWINRESIZE 1072 +#define IDC_LIMITRESOURCES2 1072 +#define IDC_SUPPRESSIME 1072 #define IDC_DISABLEGAMMARAMP 1073 #define IDC_FIXNCHITTEST 1074 #define IDC_LIMITFPS 1075 @@ -128,6 +142,9 @@ #define IDC_LIST2 1088 #define IDC_LISTTS 1088 #define IDC_LISTFAKE 1089 +#define IDC_TABPANEL 1090 +#define IDC_WINDOWIZE 1091 +#define IDC_NOBANNER 1092 #define ID_MODIFY 32771 #define ID_DELETE 32772 #define ID_ADD 32773 @@ -167,9 +184,9 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 152 +#define _APS_NEXT_RESOURCE_VALUE 153 #define _APS_NEXT_COMMAND_VALUE 32816 -#define _APS_NEXT_CONTROL_VALUE 1089 +#define _APS_NEXT_CONTROL_VALUE 1091 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/host/TabCompat.cpp b/host/TabCompat.cpp new file mode 100644 index 0000000..c274bf3 --- /dev/null +++ b/host/TabCompat.cpp @@ -0,0 +1,68 @@ +// TabDirectX.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabCompat.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabCompat dialog + +CTabCompat::CTabCompat(CWnd* pParent /*=NULL*/) +// : CTargetDlg(pParent) + : CDialog(CTabCompat::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabCompat) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabCompat::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_FAKEVERSION, cTarget->m_FakeVersion); + DDX_LBIndex(pDX, IDC_LISTFAKE, cTarget->m_FakeVersionId); + DDX_Check(pDX, IDC_HANDLEEXCEPTIONS, cTarget->m_HandleExceptions); + DDX_Check(pDX, IDC_LIMITRESOURCES, cTarget->m_LimitResources); + DDX_Check(pDX, IDC_SUPPRESSIME, cTarget->m_SuppressIME); +} + +BEGIN_MESSAGE_MAP(CTabCompat, CDialog) + //{{AFX_MSG_MAP(CTabCompat) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabCompat message handlers + +static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]= +{ + {5, 0, "Windows 2000"}, + {5, 1, "Windows XP"}, + {5, 2, "Windows Server 2003"}, + {6, 0, "Windows Vista"}, + {6, 1, "Windows 7"}, + {6, 2, "Windows 8"} +}; + +BOOL CTabCompat::OnInitDialog() +{ + AfxEnableControlContainer(); + CListBox *List; + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + int i; + List=(CListBox *)this->GetDlgItem(IDC_LISTFAKE); + List->ResetContent(); + for(i=0; i<6; i++) List->AddString(WinVersions[i].sName); + List->SetCurSel(cTarget->m_FakeVersion); + CDialog::OnInitDialog(); + return TRUE; +} \ No newline at end of file diff --git a/host/TabCompat.h b/host/TabCompat.h new file mode 100644 index 0000000..0178123 --- /dev/null +++ b/host/TabCompat.h @@ -0,0 +1,50 @@ +#if !defined(AFX_TABCOMPAT_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABCOMPAT_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabDirectX.h : header file +// +#include "resource.h" +#include "TargetDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX dialog + +//class CTabCompat : public CTargetDlg +class CTabCompat : public CDialog +{ +// Construction +public: + CTabCompat(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTabDirectX) + enum { IDD = IDD_TAB_COMPAT }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabDirectX) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + BOOL OnInitDialog(); + + // Generated message map functions + //{{AFX_MSG(CTabDirectX) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABTHREE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) diff --git a/host/TabDirectX.cpp b/host/TabDirectX.cpp new file mode 100644 index 0000000..848cf3d --- /dev/null +++ b/host/TabDirectX.cpp @@ -0,0 +1,63 @@ +// TabDirectX.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabDirectX.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX dialog + +CTabDirectX::CTabDirectX(CWnd* pParent /*=NULL*/) + : CDialog(CTabDirectX::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabDirectX) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabDirectX::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Radio(pDX, IDC_AUTO, cTarget->m_DXVersion); + DDX_Check(pDX, IDC_EMULATESURFACE, cTarget->m_EmulateSurface); + DDX_Check(pDX, IDC_NOEMULATESURFACE, cTarget->m_NoEmulateSurface); + DDX_Check(pDX, IDC_EMULATEBUFFER, cTarget->m_EmulateBuffer); + + DDX_Check(pDX, IDC_HANDLEDC, cTarget->m_HandleDC); + DDX_Check(pDX, IDC_SUPPRESSCLIPPING, cTarget->m_SuppressClipping); + DDX_Check(pDX, IDC_BLITFROMBACKBUFFER, cTarget->m_BlitFromBackBuffer); + DDX_Check(pDX, IDC_AUTOREFRESH, cTarget->m_AutoRefresh); + DDX_Check(pDX, IDC_VIDEOTOSYSTEMMEM, cTarget->m_VideoToSystemMem); + DDX_Check(pDX, IDC_USERGB565, cTarget->m_UseRGB565); + DDX_Check(pDX, IDC_SUPPRESSDXERRORS, cTarget->m_SuppressDXErrors); + DDX_Check(pDX, IDC_CLIENTREMAPPING, cTarget->m_ClientRemapping); + DDX_Check(pDX, IDC_MAPGDITOPRIMARY, cTarget->m_MapGDIToPrimary); + DDX_Check(pDX, IDC_BACKBUFATTACH, cTarget->m_BackBufAttach); + DDX_Check(pDX, IDC_FULLRECTBLT, cTarget->m_FullRectBlt); + DDX_Check(pDX, IDC_NOPALETTEUPDATE, cTarget->m_NoPaletteUpdate); + // DirectInput + DDX_Check(pDX, IDC_HOOKDI, cTarget->m_HookDI); + DDX_Text(pDX, IDC_INITX, cTarget->m_InitX); + DDX_Text(pDX, IDC_INITY, cTarget->m_InitY); + DDX_Text(pDX, IDC_MAXX, cTarget->m_MaxX); + DDX_Text(pDX, IDC_MAXY, cTarget->m_MaxY); + DDX_Text(pDX, IDC_MINX, cTarget->m_MinX); + DDX_Text(pDX, IDC_MINY, cTarget->m_MinY); +} + +BEGIN_MESSAGE_MAP(CTabDirectX, CDialog) + //{{AFX_MSG_MAP(CTabDirectX) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX message handlers diff --git a/host/TabDirectX.h b/host/TabDirectX.h new file mode 100644 index 0000000..cda485b --- /dev/null +++ b/host/TabDirectX.h @@ -0,0 +1,47 @@ +#if !defined(AFX_TABDIRECTX_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABDIRECTX_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabDirectX.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX dialog + +class CTabDirectX : public CDialog +{ +// Construction +public: + CTabDirectX(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTabDirectX) + enum { IDD = IDD_TAB_DIRECTX }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabDirectX) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabDirectX) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif diff --git a/host/TabGDI.cpp b/host/TabGDI.cpp new file mode 100644 index 0000000..b0890d6 --- /dev/null +++ b/host/TabGDI.cpp @@ -0,0 +1,41 @@ +// TabGDI.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabGDI.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs dialog + +CTabGDI::CTabGDI(CWnd* pParent /*=NULL*/) + : CDialog(CTabGDI::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabGDI) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabGDI::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_DISABLEGAMMARAMP, cTarget->m_DisableGammaRamp); + DDX_Check(pDX, IDC_FIXTEXTOUT, cTarget->m_FixTextOut); + DDX_Check(pDX, IDC_HOOKGDI, cTarget->m_HookGDI); +} + +BEGIN_MESSAGE_MAP(CTabGDI, CDialog) + //{{AFX_MSG_MAP(CTabLogs) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs message handlers diff --git a/host/TabGDI.h b/host/TabGDI.h new file mode 100644 index 0000000..d97b00f --- /dev/null +++ b/host/TabGDI.h @@ -0,0 +1,47 @@ +#if !defined(AFX_TABGDI_H__7E062B52_3B6E_44C4_B58E_AAD73592C8E3__INCLUDED_) +#define AFX_TABGDI_H__7E062B52_3B6E_44C4_B58E_AAD73592C8E3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabLogs.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs dialog + +class CTabGDI : public CDialog +{ +// Construction +public: + CTabGDI(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTabLogs) + enum { IDD = IDD_TAB_GDI }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabLogs) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabLogs) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif diff --git a/host/TabLogs.cpp b/host/TabLogs.cpp new file mode 100644 index 0000000..209dc75 --- /dev/null +++ b/host/TabLogs.cpp @@ -0,0 +1,47 @@ +// TabLogs.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabLogs.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs dialog + +CTabLogs::CTabLogs(CWnd* pParent /*=NULL*/) + : CDialog(CTabLogs::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabLogs) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabLogs::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_OUTTRACE, cTarget->m_OutTrace); + DDX_Check(pDX, IDC_OUTDEBUG, cTarget->m_OutDebug); + DDX_Check(pDX, IDC_CURSORTRACE, cTarget->m_CursorTrace); + DDX_Check(pDX, IDC_LOGENABLED, cTarget->m_LogEnabled); + DDX_Check(pDX, IDC_OUTWINMESSAGES, cTarget->m_OutWinMessages); + DDX_Check(pDX, IDC_OUTDXTRACE, cTarget->m_OutDXTrace); + DDX_Check(pDX, IDC_DXPROXED, cTarget->m_DXProxed); + DDX_Check(pDX, IDC_ASSERT, cTarget->m_AssertDialog); + DDX_Check(pDX, IDC_IMPORTTABLE, cTarget->m_ImportTable); +} + +BEGIN_MESSAGE_MAP(CTabLogs, CDialog) + //{{AFX_MSG_MAP(CTabLogs) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs message handlers diff --git a/host/TabLogs.h b/host/TabLogs.h new file mode 100644 index 0000000..96eb8fb --- /dev/null +++ b/host/TabLogs.h @@ -0,0 +1,47 @@ +#if !defined(AFX_TABLOGS_H__7E062B52_3B6E_44C4_B58E_AAD73592C8E3__INCLUDED_) +#define AFX_TABLOGS_H__7E062B52_3B6E_44C4_B58E_AAD73592C8E3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabLogs.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabLogs dialog + +class CTabLogs : public CDialog +{ +// Construction +public: + CTabLogs(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTabLogs) + enum { IDD = IDD_TAB_LOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabLogs) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabLogs) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif diff --git a/host/TabMouse.cpp b/host/TabMouse.cpp new file mode 100644 index 0000000..11885af --- /dev/null +++ b/host/TabMouse.cpp @@ -0,0 +1,49 @@ +// TabDirectX.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabMouse.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabMouse dialog + +CTabMouse::CTabMouse(CWnd* pParent /*=NULL*/) +// : CTargetDlg(pParent) + : CDialog(CTabMouse::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabMouse) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabMouse::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_MODIFYMOUSE, cTarget->m_ModifyMouse); + DDX_Check(pDX, IDC_HIDEHWCURSOR, cTarget->m_HideHwCursor); + DDX_Check(pDX, IDC_SHOWHWCURSOR, cTarget->m_ShowHwCursor); + DDX_Check(pDX, IDC_ENABLECLIPPING, cTarget->m_EnableClipping); + DDX_Check(pDX, IDC_CLIPCURSOR, cTarget->m_CursorClipping); + DDX_Check(pDX, IDC_KEEPCURSORWITHIN, cTarget->m_KeepCursorWithin); + DDX_Check(pDX, IDC_KEEPCURSORFIXED, cTarget->m_KeepCursorFixed); + DDX_Check(pDX, IDC_MESSAGEPROC, cTarget->m_MessageProc); + DDX_Check(pDX, IDC_FIXNCHITTEST, cTarget->m_FixNCHITTEST); + DDX_Check(pDX, IDC_SLOW, cTarget->m_SlowDown); +} + +BEGIN_MESSAGE_MAP(CTabMouse, CDialog) + //{{AFX_MSG_MAP(CTabMouse) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabMouse message handlers diff --git a/host/TabMouse.h b/host/TabMouse.h new file mode 100644 index 0000000..f0c1054 --- /dev/null +++ b/host/TabMouse.h @@ -0,0 +1,49 @@ +#if !defined(AFX_TABMOUSE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABMOUSE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabDirectX.h : header file +// +#include "resource.h" +#include "TargetDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX dialog + +//class CTabMouse : public CTargetDlg +class CTabMouse : public CDialog +{ +// Construction +public: + CTabMouse(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CTabDirectX) + enum { IDD = IDD_TAB_MOUSE }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabDirectX) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabDirectX) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABTHREE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) diff --git a/host/TabOpenGL.cpp b/host/TabOpenGL.cpp new file mode 100644 index 0000000..e81fec4 --- /dev/null +++ b/host/TabOpenGL.cpp @@ -0,0 +1,48 @@ +// TabOpenGL.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabOpenGL.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabOpenGL dialog + +CTabOpenGL::CTabOpenGL(CWnd* pParent /*=NULL*/) + : CDialog(CTabOpenGL::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabOpenGL) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabOpenGL::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL); + DDX_Text(pDX, IDC_OPENGLLIB, cTarget->m_OpenGLLib); +} + +BOOL CTabOpenGL::OnInitDialog() +{ + AfxEnableControlContainer(); + CDialog::OnInitDialog(); + return TRUE; +} + + +BEGIN_MESSAGE_MAP(CTabOpenGL, CDialog) + //{{AFX_MSG_MAP(CTabOpenGL) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabOpenGL message handlers diff --git a/host/TabOpenGL.h b/host/TabOpenGL.h new file mode 100644 index 0000000..53c0aa5 --- /dev/null +++ b/host/TabOpenGL.h @@ -0,0 +1,48 @@ +#if !defined(AFX_TABOPENGL_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABOPENGL_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabOpenGL.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabOpenGL dialog + +class CTabOpenGL : public CDialog +{ +// Construction +public: + CTabOpenGL(CWnd* pParent = NULL); // standard constructor + BOOL OnInitDialog(); + +// Dialog Data + //{{AFX_DATA(CTabOpenGL) + enum { IDD = IDD_TAB_OPENGL }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabOpenGL) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabOpenGL) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif \ No newline at end of file diff --git a/host/TabProgram.cpp b/host/TabProgram.cpp new file mode 100644 index 0000000..7b2898c --- /dev/null +++ b/host/TabProgram.cpp @@ -0,0 +1,63 @@ +// TabProgram.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabProgram.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabProgram dialog + +CTabProgram::CTabProgram(CWnd* pParent /*=NULL*/) + : CDialog(CTabProgram::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabProgram) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +void CTabProgram::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Control(pDX, IDC_FILE, cTarget->m_File); + DDX_Text(pDX, IDC_FILE, cTarget->m_FilePath); + DDX_Text(pDX, IDC_MODULE, cTarget->m_Module); + DDX_Text(pDX, IDC_TITLE, cTarget->m_Title); + DDX_Check(pDX, IDC_UNNOTIFY, cTarget->m_UnNotify); + DDX_Check(pDX, IDC_WINDOWIZE, cTarget->m_Windowize); + DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner); + DDX_Check(pDX, IDC_SAVELOAD, cTarget->m_SaveLoad); + DDX_Check(pDX, IDC_HANDLEALTF4, cTarget->m_HandleAltF4); + DDX_Text(pDX, IDC_POSX, cTarget->m_PosX); + DDX_Text(pDX, IDC_POSY, cTarget->m_PosY); + DDX_Text(pDX, IDC_SIZX, cTarget->m_SizX); + DDX_Text(pDX, IDC_SIZY, cTarget->m_SizY); +} + +BEGIN_MESSAGE_MAP(CTabProgram, CDialog) + //{{AFX_MSG_MAP(CTabProgram) + // NOTE: the ClassWizard will add message map macros here + ON_BN_CLICKED(IDC_OPEN, OnOpen) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabProgram message handlers + +void CTabProgram::OnOpen() +{ + // TODO: Please add your control notification handler code here + char path[MAX_PATH]; + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + cTarget->m_File.GetWindowText(path, MAX_PATH); + CFileDialog dlg( TRUE, "*.*", path, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "Program (*.exe)|*.exe|All Files (*.*)|*.*||", this); + if( dlg.DoModal() == IDOK) cTarget->m_File.SetWindowText(dlg.GetPathName()); +} \ No newline at end of file diff --git a/host/TabProgram.h b/host/TabProgram.h new file mode 100644 index 0000000..7e32976 --- /dev/null +++ b/host/TabProgram.h @@ -0,0 +1,45 @@ +#if !defined(AFX_TABPROGRAM_H__4F1DD92C_C67D_48AE_A73F_02D7EDA0580E__INCLUDED_) +#define AFX_TABPROGRAM_H__4F1DD92C_C67D_48AE_A73F_02D7EDA0580E__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabProgram.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabProgram dialog + +class CTabProgram : public CDialog +{ +// Construction +public: + CTabProgram(CWnd* pParent = NULL); // standard constructor + void OnOpen(void); + +// Dialog Data + //{{AFX_DATA(CTabProgram) + enum { IDD = IDD_TAB_PROGRAM }; + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabProgram) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabProgram) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif diff --git a/host/TabTiming.cpp b/host/TabTiming.cpp new file mode 100644 index 0000000..6be5ff4 --- /dev/null +++ b/host/TabTiming.cpp @@ -0,0 +1,69 @@ +// TabDirectX.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabTiming.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabTiming dialog + + +CTabTiming::CTabTiming(CWnd* pParent /*=NULL*/) + : CDialog(CTabTiming::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabTiming) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CTabTiming::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_LIMITFPS, cTarget->m_LimitFPS); + DDX_Check(pDX, IDC_SKIPFPS, cTarget->m_SkipFPS); + DDX_Check(pDX, IDC_SHOWFPS, cTarget->m_ShowFPS); + DDX_Check(pDX, IDC_SHOWFPSOVERLAY, cTarget->m_ShowFPSOverlay); + DDX_Check(pDX, IDC_TIMESTRETCH, cTarget->m_TimeStretch); + DDX_Text(pDX, IDC_MAXFPS, cTarget->m_MaxFPS); + DDX_LBIndex(pDX, IDC_LISTTS, cTarget->m_InitTS); + //{{AFX_DATA_MAP(CTabTiming) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BOOL CTabTiming::OnInitDialog() +{ + + AfxEnableControlContainer(); + + CListBox *List; + CDialog::OnInitDialog(); + int i; + extern char *GetTSCaption(int); + List=(CListBox *)this->GetDlgItem(IDC_LISTTS); + List->ResetContent(); + for(i=-8; i<=8; i++) List->AddString(GetTSCaption(i)); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + List->SetCurSel(cTarget->m_InitTS); + + return TRUE; +} + + +BEGIN_MESSAGE_MAP(CTabTiming, CDialog) + //{{AFX_MSG_MAP(CTabTiming) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabTiming message handlers diff --git a/host/TabTiming.h b/host/TabTiming.h new file mode 100644 index 0000000..0b626db --- /dev/null +++ b/host/TabTiming.h @@ -0,0 +1,48 @@ +#if !defined(AFX_TABTIMING_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABTIMING_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabTiming.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabDirectX dialog + +class CTabTiming : public CDialog +{ +// Construction +public: + CTabTiming(CWnd* pParent = NULL); // standard constructor + BOOL OnInitDialog(); + +// Dialog Data + //{{AFX_DATA(CTabDirectX) + enum { IDD = IDD_TAB_TIMING }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabDirectX) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabDirectX) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABTHREE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) diff --git a/host/TabWindow.cpp b/host/TabWindow.cpp new file mode 100644 index 0000000..9d926f6 --- /dev/null +++ b/host/TabWindow.cpp @@ -0,0 +1,64 @@ +// TabOpenGL.cpp : implementation file +// + +#include "stdafx.h" +#include "TargetDlg.h" +#include "TabWindow.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabWindow dialog + + +CTabWindow::CTabWindow(CWnd* pParent /*=NULL*/) + : CDialog(CTabWindow::IDD, pParent) +{ + //{{AFX_DATA_INIT(CTabWindow) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CTabWindow::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent())); + DDX_Check(pDX, IDC_FIXWINFRAME, cTarget->m_FixWinFrame); + DDX_Check(pDX, IDC_PREVENTMAXIMIZE, cTarget->m_PreventMaximize); + DDX_Check(pDX, IDC_LOCKWINPOS, cTarget->m_LockWinPos); + DDX_Check(pDX, IDC_LOCKWINSTYLE, cTarget->m_LockWinStyle); + DDX_Check(pDX, IDC_FIXPARENTWIN, cTarget->m_FixParentWin); + DDX_Check(pDX, IDC_MODALSTYLE, cTarget->m_ModalStyle); + DDX_Check(pDX, IDC_KEEPASPECTRATIO, cTarget->m_KeepAspectRatio); + DDX_Check(pDX, IDC_FORCEWINRESIZE, cTarget->m_ForceWinResize); + DDX_Check(pDX, IDC_HIDEMULTIMONITOR, cTarget->m_HideMultiMonitor); + DDX_Check(pDX, IDC_WALLPAPERMODE, cTarget->m_WallpaperMode); + DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin); + DDX_Check(pDX, IDC_RECOVERSCREENMODE, cTarget->m_RecoverScreenMode); + DDX_Check(pDX, IDC_REFRESHONRESIZE, cTarget->m_RefreshOnResize); + DDX_Check(pDX, IDC_INIT8BPP, cTarget->m_Init8BPP); + DDX_Check(pDX, IDC_INIT16BPP, cTarget->m_Init16BPP); +} + +BOOL CTabWindow::OnInitDialog() +{ + + AfxEnableControlContainer(); + CDialog::OnInitDialog(); + return TRUE; +} + + +BEGIN_MESSAGE_MAP(CTabWindow, CDialog) + //{{AFX_MSG_MAP(CTabWindow) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabWindow message handlers diff --git a/host/TabWindow.h b/host/TabWindow.h new file mode 100644 index 0000000..b43de83 --- /dev/null +++ b/host/TabWindow.h @@ -0,0 +1,48 @@ +#if !defined(AFX_TABWINDOW_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_) +#define AFX_TABWINDOW_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabTiming.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CTabWindow dialog + +class CTabWindow : public CDialog +{ +// Construction +public: + CTabWindow(CWnd* pParent = NULL); // standard constructor + BOOL OnInitDialog(); + +// Dialog Data + //{{AFX_DATA(CTabWindow) + enum { IDD = IDD_TAB_WINDOW }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTabWindow) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CTabWindow) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif \ No newline at end of file diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 44c8e3b..ee343f7 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -16,7 +16,6 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CTargetDlg Dialog - CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) : CDialog(CTargetDlg::IDD, pParent) { @@ -35,7 +34,11 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_DXProxed = FALSE; m_HandleDC = FALSE; m_HandleExceptions = FALSE; + m_SuppressIME = FALSE; + m_LimitResources = FALSE; m_UnNotify = FALSE; + m_Windowize = TRUE; + m_NoBanner = FALSE; m_FilePath = _T(""); m_Module = _T(""); m_SaveLoad = FALSE; @@ -101,408 +104,43 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) } - - -//void TSCombo::OnEnable(BOOL bEnable) -//{ -// CComboBox::OnEnable(bEnable); -// -// // Get edit control which happens to be the first child window -// CEdit* pEdit = (CEdit*)GetWindow(GW_CHILD); -// -// // Always have the edit box enabled -// pEdit->EnableWindow(TRUE); -// -// // Set read only is combo box is disabled -// pEdit->SetReadOnly(!bEnable); -//} - -static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]= -{ - {5, 0, "Windows 2000"}, - {5, 1, "Windows XP"}, - {5, 2, "Windows Server 2003"}, - {6, 0, "Windows Vista"}, - {6, 1, "Windows 7"}, - {6, 2, "Windows 8"} -}; - BOOL CTargetDlg::OnInitDialog() { - - CListBox *List; + AfxEnableControlContainer(); CDialog::OnInitDialog(); - int i; - extern char *GetTSCaption(int); - List=(CListBox *)this->GetDlgItem(IDC_LISTTS); - List->ResetContent(); - for(i=-8; i<=8; i++) List->AddString(GetTSCaption(i)); - List->SetCurSel(m_InitTS); - List=(CListBox *)this->GetDlgItem(IDC_LISTFAKE); - List->ResetContent(); - for(i=0; i<6; i++) List->AddString(WinVersions[i].sName); - List->SetCurSel(m_FakeVersion); + m_tabdxTabCtrl.InsertItem(0, _T("Main")); + m_tabdxTabCtrl.InsertItem(1, _T("Window")); + m_tabdxTabCtrl.InsertItem(2, _T("Mouse")); + m_tabdxTabCtrl.InsertItem(3, _T("Timing")); + m_tabdxTabCtrl.InsertItem(4, _T("Log")); + m_tabdxTabCtrl.InsertItem(5, _T("DirectX")); + m_tabdxTabCtrl.InsertItem(6, _T("OpenGL")); + m_tabdxTabCtrl.InsertItem(7, _T("GDI")); + m_tabdxTabCtrl.InsertItem(8, _T("Compat")); + m_tabdxTabCtrl.Init(); return TRUE; } +void CTargetDlg::OnOK() +{ + m_tabdxTabCtrl.OnOK(); + CDialog::OnOK(); +} + void CTargetDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTargetDlg) - DDX_Control(pDX, IDC_FILE, m_File); - DDX_Radio(pDX, IDC_AUTO, m_DXVersion); - DDX_Check(pDX, IDC_EMULATESURFACE, m_EmulateSurface); - DDX_Check(pDX, IDC_NOEMULATESURFACE, m_NoEmulateSurface); - DDX_Check(pDX, IDC_EMULATEBUFFER, m_EmulateBuffer); - DDX_Check(pDX, IDC_HOOKDI, m_HookDI); - DDX_Check(pDX, IDC_MODIFYMOUSE, m_ModifyMouse); - DDX_Check(pDX, IDC_OUTTRACE, m_OutTrace); - DDX_Check(pDX, IDC_OUTDEBUG, m_OutDebug); - DDX_Check(pDX, IDC_CURSORTRACE, m_CursorTrace); - DDX_Check(pDX, IDC_LOGENABLED, m_LogEnabled); - DDX_Check(pDX, IDC_OUTWINMESSAGES, m_OutWinMessages); - DDX_Check(pDX, IDC_OUTDXTRACE, m_OutDXTrace); - DDX_Check(pDX, IDC_DXPROXED, m_DXProxed); - DDX_Check(pDX, IDC_ASSERT, m_AssertDialog); - DDX_Check(pDX, IDC_IMPORTTABLE, m_ImportTable); - DDX_Check(pDX, IDC_HANDLEDC, m_HandleDC); - DDX_Check(pDX, IDC_HANDLEEXCEPTIONS, m_HandleExceptions); - DDX_Check(pDX, IDC_UNNOTIFY, m_UnNotify); - DDX_Text(pDX, IDC_FILE, m_FilePath); - DDX_Text(pDX, IDC_MODULE, m_Module); - DDX_Text(pDX, IDC_TITLE, m_Title); - DDX_Check(pDX, IDC_SAVELOAD, m_SaveLoad); - DDX_Check(pDX, IDC_SLOW, m_SlowDown); - DDX_Check(pDX, IDC_BLITFROMBACKBUFFER, m_BlitFromBackBuffer); - DDX_Check(pDX, IDC_SUPPRESSCLIPPING, m_SuppressClipping); - DDX_Check(pDX, IDC_DISABLEGAMMARAMP, m_DisableGammaRamp); - DDX_Check(pDX, IDC_AUTOREFRESH, m_AutoRefresh); - DDX_Check(pDX, IDC_FIXWINFRAME, m_FixWinFrame); - DDX_Check(pDX, IDC_HIDEHWCURSOR, m_HideHwCursor); - DDX_Check(pDX, IDC_SHOWHWCURSOR, m_ShowHwCursor); - DDX_Check(pDX, IDC_ENABLECLIPPING, m_EnableClipping); - DDX_Check(pDX, IDC_CLIPCURSOR, m_CursorClipping); - DDX_Check(pDX, IDC_VIDEOTOSYSTEMMEM, m_VideoToSystemMem); - DDX_Check(pDX, IDC_FIXTEXTOUT, m_FixTextOut); - DDX_Check(pDX, IDC_KEEPCURSORWITHIN, m_KeepCursorWithin); - DDX_Check(pDX, IDC_KEEPCURSORFIXED, m_KeepCursorFixed); - DDX_Check(pDX, IDC_USERGB565, m_UseRGB565); - DDX_Check(pDX, IDC_SUPPRESSDXERRORS, m_SuppressDXErrors); - DDX_Check(pDX, IDC_PREVENTMAXIMIZE, m_PreventMaximize); - DDX_Check(pDX, IDC_CLIENTREMAPPING, m_ClientRemapping); - DDX_Check(pDX, IDC_MAPGDITOPRIMARY, m_MapGDIToPrimary); - DDX_Check(pDX, IDC_LOCKWINPOS, m_LockWinPos); - DDX_Check(pDX, IDC_LOCKWINSTYLE, m_LockWinStyle); - DDX_Check(pDX, IDC_FIXPARENTWIN, m_FixParentWin); - DDX_Check(pDX, IDC_MODALSTYLE, m_ModalStyle); - DDX_Check(pDX, IDC_KEEPASPECTRATIO, m_KeepAspectRatio); - DDX_Check(pDX, IDC_FORCEWINRESIZE, m_ForceWinResize); - DDX_Check(pDX, IDC_HOOKGDI, m_HookGDI); - DDX_Check(pDX, IDC_HIDEMULTIMONITOR, m_HideMultiMonitor); - DDX_Check(pDX, IDC_WALLPAPERMODE, m_WallpaperMode); - DDX_Check(pDX, IDC_HOOKCHILDWIN, m_HookChildWin); - DDX_Check(pDX, IDC_MESSAGEPROC, m_MessageProc); - DDX_Check(pDX, IDC_FIXNCHITTEST, m_FixNCHITTEST); - DDX_Check(pDX, IDC_RECOVERSCREENMODE, m_RecoverScreenMode); - DDX_Check(pDX, IDC_REFRESHONRESIZE, m_RefreshOnResize); - DDX_Check(pDX, IDC_INIT8BPP, m_Init8BPP); - DDX_Check(pDX, IDC_INIT16BPP, m_Init16BPP); - DDX_Check(pDX, IDC_BACKBUFATTACH, m_BackBufAttach); - DDX_Check(pDX, IDC_HANDLEALTF4, m_HandleAltF4); - DDX_Check(pDX, IDC_LIMITFPS, m_LimitFPS); - DDX_Check(pDX, IDC_SKIPFPS, m_SkipFPS); - DDX_Check(pDX, IDC_SHOWFPS, m_ShowFPS); - DDX_Check(pDX, IDC_SHOWFPSOVERLAY, m_ShowFPSOverlay); - DDX_Check(pDX, IDC_TIMESTRETCH, m_TimeStretch); - DDX_Check(pDX, IDC_HOOKOPENGL, m_HookOpenGL); - DDX_Check(pDX, IDC_FAKEVERSION, m_FakeVersion); - DDX_Check(pDX, IDC_FULLRECTBLT, m_FullRectBlt); - DDX_Check(pDX, IDC_NOPALETTEUPDATE, m_NoPaletteUpdate); - DDX_Text(pDX, IDC_INITX, m_InitX); - DDX_Text(pDX, IDC_INITY, m_InitY); - DDX_Text(pDX, IDC_MAXX, m_MaxX); - DDX_Text(pDX, IDC_MAXY, m_MaxY); - DDX_Text(pDX, IDC_MINX, m_MinX); - DDX_Text(pDX, IDC_MINY, m_MinY); - DDX_Text(pDX, IDC_POSX, m_PosX); - DDX_Text(pDX, IDC_POSY, m_PosY); - DDX_Text(pDX, IDC_SIZX, m_SizX); - DDX_Text(pDX, IDC_SIZY, m_SizY); - DDX_Text(pDX, IDC_MAXFPS, m_MaxFPS); - //DDX_Text(pDX, IDC_INITTS, m_InitTS); - DDX_LBIndex(pDX, IDC_LISTTS, m_InitTS); - DDX_LBIndex(pDX, IDC_LISTFAKE, m_FakeVersionId); + DDX_Control(pDX, IDC_TABPANEL, m_tabdxTabCtrl); //}}AFX_DATA_MAP } - BEGIN_MESSAGE_MAP(CTargetDlg, CDialog) //{{AFX_MSG_MAP(CTargetDlg) - ON_BN_CLICKED(IDC_OPEN, OnOpen) //}}AFX_MSG_MAP - ON_BN_CLICKED(IDC_UNNOTIFY, &CTargetDlg::OnBnClickedUnnotify) - ON_BN_CLICKED(IDC_EMULATEBUFFER, &CTargetDlg::OnBnClickedEmulateBuffer) - ON_BN_CLICKED(IDC_EMULATESURFACE, &CTargetDlg::OnBnClickedEmulateSurface) - ON_BN_CLICKED(IDC_NOEMULATESURFACE, &CTargetDlg::OnBnClickedNoEmulateSurface) - ON_BN_CLICKED(IDC_OUTTRACE, &CTargetDlg::OnBnClickedOuttrace) - ON_BN_CLICKED(IDC_LOGENABLED, &CTargetDlg::OnBnClickedLogEnabled) - ON_BN_CLICKED(IDC_HANDLEDC, &CTargetDlg::OnBnClickedHandleDC) - ON_BN_CLICKED(IDC_HANDLEEXCEPTIONS, &CTargetDlg::OnBnClickedHandleExceptions) - //ON_BN_CLICKED(IDC_TRANSPARENTWIN, &CTargetDlg::OnBnClickedBlitFromBackBuffer) - //ON_BN_CLICKED(IDC_TRANSPARENTALL, &CTargetDlg::OnBnClickedTransparentAll) - //ON_BN_CLICKED(IDC_ABSOLUTECOORD, &CTargetDlg::OnBnClickedAbsolutecoord) - ON_BN_CLICKED(IDC_AUTOREFRESH, &CTargetDlg::OnBnClickedAutorefresh) - ON_BN_CLICKED(IDC_FIXWINFRAME, &CTargetDlg::OnBnClickedFixWinFrame) - //ON_BN_CLICKED(IDC_HIDEHWCURSOR, &CTargetDlg::OnBnClickedHideHwCursor) - ON_BN_CLICKED(IDC_ENABLECLIPPING, &CTargetDlg::OnBnClickedEnableClipping) - ON_BN_CLICKED(IDC_VIDEOTOSYSTEMMEM, &CTargetDlg::OnBnClickedHandleCursorPos) - ON_BN_CLICKED(IDC_FIXTEXTOUT, &CTargetDlg::OnBnClickedFixTextOut) - ON_BN_CLICKED(IDC_KEEPCURSORWITHIN, &CTargetDlg::OnBnClickedKeepCursorWithin) - ON_BN_CLICKED(IDC_KEEPCURSORFIXED, &CTargetDlg::OnBnClickedKeepCursorFixed) - ON_BN_CLICKED(IDC_USERGB565, &CTargetDlg::OnBnClickedUseRGB565) - ON_BN_CLICKED(IDC_SUPPRESSDXERRORS, &CTargetDlg::OnBnClickedCursorScaling) - ON_BN_CLICKED(IDC_PREVENTMAXIMIZE, &CTargetDlg::OnBnClickedPreventMaximize) - ON_BN_CLICKED(IDC_CLIENTREMAPPING, &CTargetDlg::OnBnClickedClientRemapping) - ON_BN_CLICKED(IDC_MAPGDITOPRIMARY, &CTargetDlg::OnBnClickedMapGDIToPrimary) - ON_BN_CLICKED(IDC_LOCKWINPOS, &CTargetDlg::OnBnClickedLockWinPos) - ON_BN_CLICKED(IDC_LOCKWINSTYLE, &CTargetDlg::OnBnClickedLockWinStyle) - ON_BN_CLICKED(IDC_HOOKCHILDWIN, &CTargetDlg::OnBnClickedHookChildWin) - ON_BN_CLICKED(IDC_MESSAGEPROC, &CTargetDlg::OnBnClickedMessageProc) - ON_BN_CLICKED(IDC_RECOVERSCREENMODE, &CTargetDlg::OnBnClickedRecoverScreenMode) - ON_BN_CLICKED(IDC_REFRESHONRESIZE, &CTargetDlg::OnBnClickedRefreshOnResize) - ON_BN_CLICKED(IDC_INIT8BPP, &CTargetDlg::OnBnClickedInit8BPP) - ON_BN_CLICKED(IDC_INIT16BPP, &CTargetDlg::OnBnClickedInit16BPP) - ON_BN_CLICKED(IDC_BACKBUFATTACH, &CTargetDlg::OnBnClickedBackBufAttach) - ON_BN_CLICKED(IDC_HANDLEALTF4, &CTargetDlg::OnBnClickedHandleAltF4) - ON_EN_CHANGE(IDC_MAXX, &CTargetDlg::OnEnChangeMaxx) - ON_EN_CHANGE(IDC_INITX, &CTargetDlg::OnEnChangeInitx) + END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTargetDlg Message Handler - -void CTargetDlg::OnOpen() -{ - // TODO: Please add your control notification handler code here - char path[MAX_PATH]; - m_File.GetWindowText(path, MAX_PATH); - CFileDialog dlg( TRUE, "*.*", path, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "Program (*.exe)|*.exe|All Files (*.*)|*.*||", this); - if( dlg.DoModal() == IDOK) m_File.SetWindowText(dlg.GetPathName()); -} - -void CTargetDlg::OnBnClickedUnnotify() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedEmulateSurface() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedNoEmulateSurface() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedEmulateBuffer() -{ - // TODO: Add your control notification handler code here -} -void CTargetDlg::OnBnClickedOuttrace() -{ - // TODO: Add your control notification handler code here -} -void CTargetDlg::OnBnClickedLogEnabled() -{ - // TODO: Add your control notification handler code here -} -void CTargetDlg::OnBnClickedHandleDC() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedHandleExceptions() -{ - // TODO: Add your control notification handler code here -} -//void CTargetDlg::OnBnClickedBlitFromBackBuffer() -//{ -// // TODO: Add your control notification handler code here -//} -// -//void CTargetDlg::OnBnClickedTransparentAll() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnEnChangeFile2() -{ - // TODO: If this is a RICHEDIT control, the control will not - // send this notification unless you override the CDialog::OnInitDialog() - // function and call CRichEditCtrl().SetEventMask() - // with the ENM_CHANGE flag ORed into the mask. - - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedAbsolutecoord() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnBnClickedAutorefresh() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedFixWinFrame() -{ - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedHideHwCursor() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnBnClickedEnableClipping() -{ - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedMouseToScreen() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnBnClickedHandleCursorPos() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedFixTextOut() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedKeepCursorWithin() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedKeepCursorFixed() -{ - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedNullRectBlit() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnBnClickedUseRGB565() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedCursorScaling() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedPreventMaximize() -{ - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedResetPrimary() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnBnClickedClientRemapping() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedMapGDIToPrimary() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedLockWinPos() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedLockWinStyle() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedHookChildWin() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedMessageProc() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedRecoverScreenMode() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedRefreshOnResize() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedInit8BPP() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedInit16BPP() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedBackBufAttach() -{ - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnBnClickedHandleAltF4() -{ - // TODO: Add your control notification handler code here -} - -//void CTargetDlg::OnBnClickedEmulateModeX() -//{ -// // TODO: Add your control notification handler code here -//} - -void CTargetDlg::OnEnChangeMaxx() -{ - // TODO: If this is a RICHEDIT control, the control will not - // send this notification unless you override the CDialog::OnInitDialog() - // function and call CRichEditCtrl().SetEventMask() - // with the ENM_CHANGE flag ORed into the mask. - - // TODO: Add your control notification handler code here -} - -void CTargetDlg::OnEnChangeInitx() -{ - // TODO: If this is a RICHEDIT control, the control will not - // send this notification unless you override the CDialog::OnInitDialog() - // function and call CRichEditCtrl().SetEventMask() - // with the ENM_CHANGE flag ORed into the mask. - - // TODO: Add your control notification handler code here -} diff --git a/host/TargetDlg.h b/host/TargetDlg.h index c6619ae..629ffb9 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -6,7 +6,7 @@ #endif // _MSC_VER > 1000 // TargetDlg.h : Header file // - +#include "dxTabCtrl.h" ///////////////////////////////////////////////////////////////////////////// // CTargetDlg Dialog @@ -16,10 +16,12 @@ class CTargetDlg : public CDialog // Constructor public: CTargetDlg(CWnd* pParent = NULL); // Standard constructor + void OnOK(); // Dialog Data //{{AFX_DATA(CTargetDlg) enum { IDD = IDD_TARGET }; + CDXTabCtrl m_tabdxTabCtrl; CEdit m_File; int m_DXVersion; BOOL m_EmulateSurface; @@ -38,6 +40,8 @@ public: BOOL m_ImportTable; BOOL m_HandleDC; BOOL m_UnNotify; + BOOL m_Windowize; + BOOL m_NoBanner; CString m_FilePath; CString m_Module; CString m_Title; @@ -90,6 +94,8 @@ public: BOOL m_FakeVersion; BOOL m_FullRectBlt; BOOL m_NoPaletteUpdate; + BOOL m_LimitResources; + BOOL m_SuppressIME; int m_InitX; int m_InitY; int m_MaxX; @@ -115,51 +121,17 @@ public: // Implementation protected: - // Generated message map functions //{{AFX_MSG(CTargetDlg) afx_msg void OnOpen(); //}}AFX_MSG DECLARE_MESSAGE_MAP() -public: - afx_msg void OnBnClickedUnnotify(); - afx_msg void OnBnClickedEmulateBuffer(); - afx_msg void OnBnClickedEmulateSurface(); - afx_msg void OnBnClickedNoEmulateSurface(); - afx_msg void OnBnClickedOuttrace(); - afx_msg void OnBnClickedLogEnabled(); - afx_msg void OnBnClickedHandleDC(); - afx_msg void OnEnChangeFile2(); - afx_msg void OnBnClickedAutorefresh(); - afx_msg void OnBnClickedFixWinFrame(); - //afx_msg void OnBnClickedHideHwCursor(); - afx_msg void OnBnClickedEnableClipping(); - afx_msg void OnBnClickedHandleCursorPos(); - afx_msg void OnBnClickedFixTextOut(); - afx_msg void OnBnClickedKeepCursorWithin(); - afx_msg void OnBnClickedKeepCursorFixed(); - afx_msg void OnBnClickedUseRGB565(); - afx_msg void OnBnClickedCursorScaling(); - afx_msg void OnBnClickedPreventMaximize(); - afx_msg void OnBnClickedClientRemapping(); - afx_msg void OnBnClickedMapGDIToPrimary(); - afx_msg void OnBnClickedLockWinPos(); - afx_msg void OnBnClickedLockWinStyle(); - afx_msg void OnBnClickedHookChildWin(); - afx_msg void OnBnClickedMessageProc(); - afx_msg void OnBnClickedRecoverScreenMode(); - afx_msg void OnBnClickedRefreshOnResize(); - afx_msg void OnBnClickedInit8BPP(); - afx_msg void OnBnClickedInit16BPP(); - afx_msg void OnBnClickedBackBufAttach(); - afx_msg void OnBnClickedHandleAltF4(); - afx_msg void OnBnClickedHandleExceptions(); - afx_msg void OnEnChangeMaxx(); - afx_msg void OnEnChangeInitx(); + public: virtual BOOL OnInitDialog(); + }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ Will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_TARGETDLG_H__683E529D_7282_484C_A403_367A6A90CC57__INCLUDED_) +#endif \ No newline at end of file diff --git a/host/dxTabCtrl.cpp b/host/dxTabCtrl.cpp new file mode 100644 index 0000000..593e662 --- /dev/null +++ b/host/dxTabCtrl.cpp @@ -0,0 +1,131 @@ +// dxTabCtrl.cpp : implementation file +// +///////////////////////////////////////////////////// +// This class is provided as is and Ben Hill takes no +// responsibility for any loss of any kind in connection +// to this code. +///////////////////////////////////////////////////// +// Is is meant purely as a educational tool and may +// contain bugs. +///////////////////////////////////////////////////// +// ben@shido.fsnet.co.uk +// http://www.shido.fsnet.co.uk +///////////////////////////////////////////////////// +// Thanks to a mystery poster in the C++ forum on +// www.codeguru.com I can't find your name to say thanks +// for your Control drawing code. If you are that person +// thank you very much. I have been able to use some of +// you ideas to produce this sample application. +///////////////////////////////////////////////////// + +#include "stdafx.h" +#include "dxTabCtrl.h" + +#include "TabProgram.h" +#include "TabLogs.h" +#include "TabDirectX.h" +#include "TabMouse.h" +#include "TabTiming.h" +#include "TabWindow.h" +#include "TabOpenGL.h" +#include "TabCompat.h" +#include "TabGDI.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CDXTabCtrl + +CDXTabCtrl::CDXTabCtrl() +{ + m_tabPages[0]=new CTabProgram; + m_tabPages[1]=new CTabWindow; + m_tabPages[2]=new CTabMouse; + m_tabPages[3]=new CTabTiming; + m_tabPages[4]=new CTabLogs; + m_tabPages[5]=new CTabDirectX; + m_tabPages[6]=new CTabOpenGL; + m_tabPages[7]=new CTabGDI; + m_tabPages[8]=new CTabCompat; + + m_nNumberOfPages=9; +} + +CDXTabCtrl::~CDXTabCtrl() +{ + for(int nCount=0; nCount < m_nNumberOfPages; nCount++){ + delete m_tabPages[nCount]; + } +} + +void CDXTabCtrl::Init() +{ + m_tabCurrent=0; + + m_tabPages[0]->Create(IDD_TAB_PROGRAM, this); + m_tabPages[1]->Create(IDD_TAB_WINDOW, this); + m_tabPages[2]->Create(IDD_TAB_MOUSE, this); + m_tabPages[3]->Create(IDD_TAB_TIMING, this); + m_tabPages[4]->Create(IDD_TAB_LOG, this); + m_tabPages[5]->Create(IDD_TAB_DIRECTX, this); + m_tabPages[6]->Create(IDD_TAB_OPENGL, this); + m_tabPages[7]->Create(IDD_TAB_GDI, this); + m_tabPages[8]->Create(IDD_TAB_COMPAT, this); + + for(int nCount=0; nCount < m_nNumberOfPages; nCount++){ + m_tabPages[nCount]->ShowWindow(nCount ? SW_HIDE:SW_SHOW); + } + + SetRectangle(); +} + +void CDXTabCtrl::SetRectangle() +{ + CRect tabRect, itemRect; + int nX, nY, nXc, nYc; + + GetClientRect(&tabRect); + GetItemRect(0, &itemRect); + + nX=itemRect.left; + nY=itemRect.bottom+1; + nXc=tabRect.right-itemRect.left-1; + nYc=tabRect.bottom-nY-1; + + m_tabPages[0]->SetWindowPos(&wndTop, nX, nY, nXc, nYc, SWP_SHOWWINDOW); + for(int nCount=1; nCount < m_nNumberOfPages; nCount++){ + m_tabPages[nCount]->SetWindowPos(&wndTop, nX, nY, nXc, nYc, SWP_HIDEWINDOW); + } +} + +BEGIN_MESSAGE_MAP(CDXTabCtrl, CTabCtrl) + //{{AFX_MSG_MAP(CDXTabCtrl) + ON_WM_LBUTTONDOWN() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDXTabCtrl message handlers + +void CDXTabCtrl::OnLButtonDown(UINT nFlags, CPoint point) +{ + CTabCtrl::OnLButtonDown(nFlags, point); + + if(m_tabCurrent != GetCurFocus()){ + m_tabPages[m_tabCurrent]->ShowWindow(SW_HIDE); + m_tabCurrent=GetCurFocus(); + m_tabPages[m_tabCurrent]->ShowWindow(SW_SHOW); + m_tabPages[m_tabCurrent]->SetFocus(); + } +} + +void CDXTabCtrl::OnOK() +{ + for(int nCount=0; nCount < m_nNumberOfPages; nCount++){ + m_tabPages[nCount]->UpdateData(TRUE); + } +} diff --git a/host/dxTabCtrl.h b/host/dxTabCtrl.h new file mode 100644 index 0000000..683399f --- /dev/null +++ b/host/dxTabCtrl.h @@ -0,0 +1,56 @@ +#if !defined(AFX_MYTABCTRL_H__F3E8650F_019C_479F_9E0F_60FE1181F49F__INCLUDED_) +#define AFX_MYTABCTRL_H__F3E8650F_019C_479F_9E0F_60FE1181F49F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// dxTabCtrl.h : header file +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// CDXTabCtrl window + +class CDXTabCtrl : public CTabCtrl +{ +// Construction +public: + CDXTabCtrl(); + CDialog *m_tabPages[9]; + int m_tabCurrent; + int m_nNumberOfPages; + enum { IDD = IDC_TABPANEL }; + +// Attributes +public: + +// Operations +public: + void Init(); + void SetRectangle(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDXTabCtrl) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDXTabCtrl(); + void OnOK(); + + // Generated message map functions +protected: + //{{AFX_MSG(CDXTabCtrl) + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MYTABCTRL_H__F3E8650F_019C_479F_9E0F_60FE1181F49F__INCLUDED_) diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index a3169e1..15035d3 100644 Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index df43ace..8de255c 100644 --- a/host/dxwndhost.rc +++ b/host/dxwndhost.rc @@ -195,134 +195,14 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP END -IDD_TARGET DIALOGEX 0, 0, 675, 225 +IDD_TARGET DIALOGEX 0, 0, 273, 248 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Target" FONT 9, "Arial", 400, 0, 0x0 BEGIN - EDITTEXT IDC_FILE,7,36,139,12,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_OPEN,150,38,11,14 - CONTROL "Automatic",IDC_AUTO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,84,57,10 - CONTROL "DirectX1~6",IDC_DIRECTX1,"Button",BS_AUTORADIOBUTTON,14,94,59,10 - CONTROL "DirectX7",IDC_DIRECTX7,"Button",BS_AUTORADIOBUTTON,14,104,41,10 - CONTROL "DirectX8",IDC_DIRECTX8,"Button",BS_AUTORADIOBUTTON,14,114,41,10 - CONTROL "DirectX9",IDC_DIRECTX9,"Button",BS_AUTORADIOBUTTON,14,124,40,10 - CONTROL "None/OpenGL",IDC_NODIRECTX,"Button",BS_AUTORADIOBUTTON,14,134,61,10 - CONTROL "Do not notify on task switch",IDC_UNNOTIFY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,134,106,10 - CONTROL "None",IDC_NOEMULATESURFACE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,158,66,10 - CONTROL "Primary Surface",IDC_EMULATESURFACE,"Button",BS_AUTORADIOBUTTON,14,178,66,10 - CONTROL "Primary Buffer",IDC_EMULATEBUFFER,"Button",BS_AUTORADIOBUTTON,14,168,67,10 - CONTROL "DirectInput Hooking",IDC_HOOKDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,124,83,10 - CONTROL "Correct mouse position",IDC_MODIFYMOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,34,97,10 - CONTROL "DxWnd",IDC_OUTTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,114,62,10 - CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,144,105,10 - DEFPUSHBUTTON "OK",IDOK,629,204,40,14 - PUSHBUTTON "Cancel",IDCANCEL,568,204,40,14 - GROUPBOX "DirectX Version Hook",IDC_STATIC,7,75,77,72,WS_GROUP - LTEXT "DirectInput initial coord. and X,Y range",IDC_STATIC,430,195,125,8 - LTEXT "X",IDC_STATIC,425,208,8,8 - LTEXT "Y",IDC_STATIC,448,208,8,8 - LTEXT "(",IDC_STATIC,473,208,8,8 - LTEXT ",",IDC_STATIC,493,208,8,8 - LTEXT ")-(",IDC_STATIC,512,208,9,8 - LTEXT ",",IDC_STATIC,537,208,8,8 - LTEXT ")",IDC_STATIC,556,208,8,8 - EDITTEXT IDC_INITX,431,206,14,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - EDITTEXT IDC_INITY,453,206,14,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - EDITTEXT IDC_MINX,476,206,14,12,ES_AUTOHSCROLL,WS_EX_RIGHT - EDITTEXT IDC_MINY,497,206,14,12,ES_AUTOHSCROLL,WS_EX_RIGHT - EDITTEXT IDC_MAXX,520,206,14,12,ES_AUTOHSCROLL,WS_EX_RIGHT - EDITTEXT IDC_MAXY,541,206,14,12,ES_AUTOHSCROLL,WS_EX_RIGHT - CONTROL "Handle DC",IDC_HANDLEDC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,24,67,10 - EDITTEXT IDC_MODULE,7,60,139,12,ES_AUTOHSCROLL - CONTROL "Auto Primary Surface Refresh",IDC_AUTOREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,34,108,8 - CONTROL "Fix Window Frame Style",IDC_FIXWINFRAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,14,103,9 - CONTROL "Hide Cursor",IDC_HIDEHWCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,14,100,9 - CONTROL "Intercept GDI Cursor Clipping",IDC_ENABLECLIPPING, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,74,106,9 - LTEXT "Hooked Module:",IDC_STATIC,7,51,66,8 - GROUPBOX "Cursor handling",IDC_STATIC,298,3,120,105 - GROUPBOX "DirectDraw Surface handling",IDC_STATIC,172,3,120,138 - CONTROL "VIDEO->SYSTEM surf. on fail",IDC_VIDEOTOSYSTEMMEM, - "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,180,54,108,8 - CONTROL "Fix TextOutA placement",IDC_FIXTEXTOUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,164,107,9 - GROUPBOX "Generic",IDC_STATIC,299,111,120,89 - CONTROL "Keep cursor within window",IDC_KEEPCURSORWITHIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,54,105,9 - CONTROL "Set 16BPP RGB565 encoding",IDC_USERGB565,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,44,108,8 - CONTROL "Suppress DX common errors",IDC_SUPPRESSDXERRORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,64,109,9 - CONTROL "Prevent Win Maximize",IDC_PREVENTMAXIMIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,24,98,9 - GROUPBOX "Trace",IDC_STATIC,90,75,74,115 - CONTROL "Win Events",IDC_OUTWINMESSAGES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,124,62,10 - CONTROL "DirectX ",IDC_OUTDXTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,134,62,10 - EDITTEXT IDC_TITLE,7,12,139,12,ES_AUTOHSCROLL - LTEXT "Path:",IDC_STATIC,7,27,66,8 - LTEXT "Name:",IDC_STATIC,7,3,66,8 - CONTROL "Slow down",IDC_SLOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,154,88,10 - CONTROL "Force cursor clipping",IDC_CLIPCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,44,107,9 - CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,74,102,9 - CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,164,93,10 - GROUPBOX "Windows handling",IDC_STATIC,424,3,120,167 - CONTROL "Lock win coordinates",IDC_LOCKWINPOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,34,98,9 - CONTROL "Hook CHILD windows",IDC_HOOKCHILDWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,54,98,9 - LTEXT "Window initial position && size",IDC_STATIC,12,195,98,8 - LTEXT "X",IDC_STATIC,8,208,8,8 - LTEXT "Y",IDC_STATIC,34,208,8,8 - LTEXT "W",IDC_STATIC,57,208,8,8 - LTEXT "H",IDC_STATIC,84,208,8,8 - EDITTEXT IDC_POSX,15,206,16,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - EDITTEXT IDC_POSY,40,206,16,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - EDITTEXT IDC_SIZX,65,206,16,12,ES_AUTOHSCROLL,WS_EX_RIGHT - EDITTEXT IDC_SIZY,90,206,16,12,ES_AUTOHSCROLL,WS_EX_RIGHT - CONTROL "Message processing",IDC_MESSAGEPROC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,84,98,9 - CONTROL "Map GDI HDC to Primary DC",IDC_MAPGDITOPRIMARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,14,102,9 - CONTROL "Recover screen mode",IDC_RECOVERSCREENMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,64,98,9 - CONTROL "Refresh on win resize",IDC_REFRESHONRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,74,98,9 - CONTROL "Make Backbuf attachable",IDC_BACKBUFATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,84,102,9 - CONTROL "ddraw Proxy",IDC_DXPROXED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,94,62,10 - CONTROL "Assert Dialog",IDC_ASSERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,104,62,10 - CONTROL "Simulate 8BPP desktop",IDC_INIT8BPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,84,98,9 - CONTROL "Simulate 16BPP desktop",IDC_INIT16BPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,94,98,9 - CONTROL "Keep cursor fixed",IDC_KEEPCURSORFIXED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,64,105,9 - CONTROL "Lock win style",IDC_LOCKWINSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,44,98,9 - CONTROL "Enable Trace",IDC_LOGENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,84,62,10 - CONTROL "Cursor/Mouse",IDC_CURSORTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,144,62,10 - CONTROL "Import Table",IDC_IMPORTTABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,154,62,10 - CONTROL "Handle Exceptions",IDC_HANDLEEXCEPTIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,174,93,10 - CONTROL "Fix Parent Window",IDC_FIXPARENTWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,104,98,9 - CONTROL "Debug",IDC_OUTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,164,62,10 - CONTROL "Blit from BackBuffer",IDC_BLITFROMBACKBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,94,102,9 - GROUPBOX "Emulation",IDC_STATIC,7,149,78,42,WS_GROUP - CONTROL "Suppress clipping",IDC_SUPPRESSCLIPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,104,102,9 - CONTROL "Modal Style",IDC_MODALSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,114,98,9 - CONTROL "Keep aspect ratio",IDC_KEEPASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,124,98,9 - CONTROL "Limit available resources",IDC_LIMITRESOURCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,184,93,10 - CONTROL "Force win resize",IDC_FORCEWINRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,134,98,9 - CONTROL "fix WM_NCHITTEST",IDC_FIXNCHITTEST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,94,98,9 - CONTROL "Limit",IDC_LIMITFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,112,28,9 - EDITTEXT IDC_MAXFPS,635,115,26,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - CONTROL "Skip",IDC_SKIPFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,122,27,9 - LTEXT "delay (msec)",IDC_STATIC,591,117,43,8 - GROUPBOX "Frame per Second",IDC_STATIC,549,102,120,68 - CONTROL "Show FPS on title",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,134,72,9 - GROUPBOX "",IDC_STATIC,555,108,110,24 - CONTROL "Hide multi-monitor config.",IDC_HIDEMULTIMONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,144,98,9 - CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,154,75,9 - GROUPBOX "OpenGL",IDC_STATIC,549,3,120,50 - CONTROL "Hook OpenGL",IDC_HOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,14,98,9 - EDITTEXT IDC_OPENGLLIB,554,36,108,12,ES_AUTOHSCROLL - LTEXT "Custom OpenGL library",IDC_STATIC,566,26,94,8 - CONTROL "Show Cursor",IDC_SHOWHWCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,24,100,9 - CONTROL "Wallpaper mode",IDC_WALLPAPERMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,154,98,9 - GROUPBOX "GDI Handling",IDC_STATIC,172,144,120,62 - CONTROL "Hook GDI",IDC_HOOKGDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,154,102,9 - CONTROL "Disable setting gamma ramp",IDC_DISABLEGAMMARAMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,174,102,9 - CONTROL "Show FPS overlay",IDC_SHOWFPSOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,144,72,9 - LISTBOX IDC_LISTTS,635,135,26,27,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Fake Version",IDC_STATIC,551,55,118,44 - CONTROL "",IDC_FAKEVERSION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,558,74,10,9 - LISTBOX IDC_LISTFAKE,577,67,84,27,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL "Full RECT Blit",IDC_FULLRECTBLT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,114,102,9 - CONTROL "Palette update don't Blit",IDC_NOPALETTEUPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,124,102,9 + DEFPUSHBUTTON "OK",IDOK,225,227,40,14 + PUSHBUTTON "Cancel",IDCANCEL,176,227,40,14 + CONTROL "",IDC_TABPANEL,"SysTabControl32",0x0,7,3,260,220 END IDD_STATUS DIALOGEX 0, 0, 186, 95 @@ -352,6 +232,191 @@ BEGIN LTEXT ":16",IDC_STATIC,149,30,15,9 END +IDD_TAB_PROGRAM DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + EDITTEXT IDC_TITLE,7,22,162,14,ES_AUTOHSCROLL + LTEXT "Name:",IDC_STATIC,7,9,77,9 + EDITTEXT IDC_FILE,7,54,162,14,ES_AUTOHSCROLL + EDITTEXT IDC_MODULE,7,85,162,14,ES_AUTOHSCROLL + LTEXT "Hooked Module:",IDC_STATIC,7,73,77,9 + LTEXT "Path:",IDC_STATIC,7,42,77,9 + PUSHBUTTON "...",IDC_OPEN,176,53,13,16 + LTEXT "Window initial position && size",IDC_STATIC,10,184,115,9 + LTEXT "X",IDC_STATIC,10,200,9,9 + LTEXT "Y",IDC_STATIC,41,200,9,9 + LTEXT "W",IDC_STATIC,69,200,9,9 + LTEXT "H",IDC_STATIC,99,200,9,9 + EDITTEXT IDC_POSX,18,196,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + EDITTEXT IDC_POSY,47,196,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + EDITTEXT IDC_SIZX,77,196,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT + EDITTEXT IDC_SIZY,105,196,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT + CONTROL "Do not notify on task switch",IDC_UNNOTIFY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,112,124,12 + CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,122,123,12 + CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,132,109,12 + CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,142,124,12 + GROUPBOX "Generic",IDC_STATIC,7,103,140,72 + CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,152,124,12 +END + +IDD_TAB_LOG DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + GROUPBOX "Logs",IDC_STATIC,7,3,87,133 + CONTROL "Win Events",IDC_OUTWINMESSAGES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,69,73,12 + CONTROL "DirectX ",IDC_OUTDXTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,81,73,12 + CONTROL "DxWnd",IDC_OUTTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,58,73,12 + CONTROL "Assert Dialog",IDC_ASSERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,47,73,12 + CONTROL "ddraw Proxy",IDC_DXPROXED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,35,73,12 + CONTROL "Cursor/Mouse",IDC_CURSORTRACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,93,73,12 + CONTROL "Import Table",IDC_IMPORTTABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,73,12 + CONTROL "Debug",IDC_OUTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,116,73,12 + CONTROL "Enable Trace",IDC_LOGENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,13,73,12 +END + +IDD_TAB_DIRECTX DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Automatic",IDC_AUTO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,13,67,12 + CONTROL "DirectX1~6",IDC_DIRECTX1,"Button",BS_AUTORADIOBUTTON,14,25,69,12 + CONTROL "DirectX7",IDC_DIRECTX7,"Button",BS_AUTORADIOBUTTON,14,37,48,12 + CONTROL "DirectX8",IDC_DIRECTX8,"Button",BS_AUTORADIOBUTTON,14,48,48,12 + CONTROL "DirectX9",IDC_DIRECTX9,"Button",BS_AUTORADIOBUTTON,14,59,47,12 + CONTROL "None",IDC_NODIRECTX,"Button",BS_AUTORADIOBUTTON,14,71,71,12 + CONTROL "None",IDC_NOEMULATESURFACE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,14,99,77,12 + CONTROL "Primary Surface",IDC_EMULATESURFACE,"Button",BS_AUTORADIOBUTTON,14,122,77,12 + CONTROL "Primary Buffer",IDC_EMULATEBUFFER,"Button",BS_AUTORADIOBUTTON,14,110,67,12 + GROUPBOX "DirectX Version Hook",IDC_STATIC,6,3,98,83,WS_GROUP + GROUPBOX "Emulation",IDC_STATIC,6,88,98,49,WS_GROUP + CONTROL "Handle DC",IDC_HANDLEDC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,26,78,12 + CONTROL "Auto Primary Surface Refresh",IDC_AUTOREFRESH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,38,126,9 + GROUPBOX "DirectDraw Surface handling",IDC_STATIC,112,3,181,158 + CONTROL "VIDEO->SYSTEM surf. on fail",IDC_VIDEOTOSYSTEMMEM, + "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,118,61,126,9 + CONTROL "Set 16BPP RGB565 encoding",IDC_USERGB565,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,50,126,9 + CONTROL "Suppress DX common errors",IDC_SUPPRESSDXERRORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,73,127,10 + CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,85,119,10 + CONTROL "Map GDI HDC to Primary DC",IDC_MAPGDITOPRIMARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,15,119,10 + CONTROL "Make Backbuf attachable",IDC_BACKBUFATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,96,119,10 + CONTROL "Blit from BackBuffer",IDC_BLITFROMBACKBUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,107,119,10 + CONTROL "Suppress clipping",IDC_SUPPRESSCLIPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,119,119,10 + CONTROL "Full RECT Blit",IDC_FULLRECTBLT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,131,119,10 + CONTROL "Palette update don't Blit",IDC_NOPALETTEUPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,142,119,10 + LTEXT "DirectInput initial coord. and X,Y range",IDC_STATIC,19,194,146,9 + LTEXT "X",IDC_STATIC,13,209,9,9 + LTEXT "Y",IDC_STATIC,40,209,9,9 + LTEXT "(",IDC_STATIC,69,209,9,9 + LTEXT ",",IDC_STATIC,92,209,9,9 + LTEXT ")-(",IDC_STATIC,114,209,11,9 + LTEXT ",",IDC_STATIC,144,209,9,9 + LTEXT ")",IDC_STATIC,166,209,9,9 + EDITTEXT IDC_INITX,20,206,17,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + EDITTEXT IDC_INITY,46,206,17,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + EDITTEXT IDC_MINX,72,206,17,14,ES_AUTOHSCROLL,WS_EX_RIGHT + EDITTEXT IDC_MINY,97,206,17,14,ES_AUTOHSCROLL,WS_EX_RIGHT + EDITTEXT IDC_MAXX,124,206,17,14,ES_AUTOHSCROLL,WS_EX_RIGHT + EDITTEXT IDC_MAXY,148,206,17,14,ES_AUTOHSCROLL,WS_EX_RIGHT + CONTROL "DirectInput Hooking",IDC_HOOKDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,179,97,12 + GROUPBOX "DirectInput",IDC_STATIC,7,169,286,64 +END + +IDD_TAB_MOUSE DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Correct mouse position",IDC_MODIFYMOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,38,113,12 + CONTROL "Hide Cursor",IDC_HIDEHWCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,15,117,10 + CONTROL "Intercept GDI Cursor Clipping",IDC_ENABLECLIPPING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,85,124,10 + GROUPBOX "Cursor handling",IDC_STATIC,7,3,140,144 + CONTROL "Keep cursor within window",IDC_KEEPCURSORWITHIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,61,123,10 + CONTROL "Force cursor clipping",IDC_CLIPCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,50,125,10 + CONTROL "Message processing",IDC_MESSAGEPROC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,96,115,10 + CONTROL "Keep cursor fixed",IDC_KEEPCURSORFIXED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,73,123,10 + CONTROL "fix WM_NCHITTEST",IDC_FIXNCHITTEST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,107,115,10 + CONTROL "Show Cursor",IDC_SHOWHWCURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,27,117,10 + CONTROL "Slow down mouse polling",IDC_SLOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,118,103,12 +END + +IDD_TAB_TIMING DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Limit",IDC_LIMITFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,19,33,10 + CONTROL "Skip",IDC_SKIPFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,31,31,10 + LTEXT "delay (msec)",IDC_STATIC,52,25,50,9 + GROUPBOX "Frame per Second",IDC_STATIC,7,7,140,78 + CONTROL "Show FPS on title",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,60,84,10 + CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,123,87,10 + CONTROL "Show FPS overlay",IDC_SHOWFPSOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,84,10 + EDITTEXT IDC_MAXFPS,104,23,31,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT + LISTBOX IDC_LISTTS,104,102,31,55,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Time Stretching",IDC_STATIC,7,94,139,70 +END + +IDD_TAB_WINDOW DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Fix Window Frame Style",IDC_FIXWINFRAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,16,120,10 + CONTROL "Prevent Win Maximize",IDC_PREVENTMAXIMIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,28,115,10 + GROUPBOX "Windows handling",IDC_STATIC,6,4,140,193 + CONTROL "Lock win coordinates",IDC_LOCKWINPOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,39,115,10 + CONTROL "Hook CHILD windows",IDC_HOOKCHILDWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,62,115,10 + CONTROL "Recover screen mode",IDC_RECOVERSCREENMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,74,115,10 + CONTROL "Refresh on win resize",IDC_REFRESHONRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,86,115,10 + CONTROL "Simulate 8BPP desktop",IDC_INIT8BPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,97,115,10 + CONTROL "Simulate 16BPP desktop",IDC_INIT16BPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,108,115,10 + CONTROL "Lock win style",IDC_LOCKWINSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,51,115,10 + CONTROL "Fix Parent Window",IDC_FIXPARENTWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,120,115,10 + CONTROL "Modal Style",IDC_MODALSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,132,115,10 + CONTROL "Keep aspect ratio",IDC_KEEPASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,143,115,10 + CONTROL "Force win resize",IDC_FORCEWINRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,154,115,10 + CONTROL "Hide multi-monitor config.",IDC_HIDEMULTIMONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,166,115,10 + CONTROL "Wallpaper mode",IDC_WALLPAPERMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,178,115,10 +END + +IDD_TAB_EMPTY DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN +END + +IDD_TAB_OPENGL DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + GROUPBOX "OpenGL",IDC_STATIC,7,3,140,58 + LTEXT "Custom OpenGL library",IDC_STATIC,15,29,110,9 + CONTROL "Hook OpenGL",IDC_HOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,15,115,10 + EDITTEXT IDC_OPENGLLIB,13,41,126,14,ES_AUTOHSCROLL +END + +IDD_TAB_COMPAT DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + GROUPBOX "Fake Version",IDC_STATIC,7,3,139,64 + CONTROL "",IDC_FAKEVERSION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,26,12,10 + LISTBOX IDC_LISTFAKE,39,15,98,43,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + CONTROL "Handle Exceptions",IDC_HANDLEEXCEPTIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,201,109,12 + CONTROL "Limit available resources",IDC_LIMITRESOURCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,212,109,12 + CONTROL "Suppress IME",IDC_SUPPRESSIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,190,109,12 +END + +IDD_TAB_GDI DIALOGEX 0, 0, 300, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Fix TextOutA placement",IDC_FIXTEXTOUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,26,125,10 + GROUPBOX "GDI Handling",IDC_STATIC,6,3,140,51 + CONTROL "Hook GDI",IDC_HOOKGDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,15,119,10 + CONTROL "Disable setting gamma ramp",IDC_DISABLEGAMMARAMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,38,119,10 +END + ///////////////////////////////////////////////////////////////////////////// // @@ -410,9 +475,9 @@ BEGIN IDD_TARGET, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 669 + RIGHTMARGIN, 267 TOPMARGIN, 3 - BOTTOMMARGIN, 218 + BOTTOMMARGIN, 241 HORZGUIDE, 91 END @@ -431,6 +496,86 @@ BEGIN TOPMARGIN, 7 BOTTOMMARGIN, 58 END + + IDD_TAB_PROGRAM, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_LOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_DIRECTX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_MOUSE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_TIMING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_WINDOW, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_EMPTY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_OPENGL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_COMPAT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END + + IDD_TAB_GDI, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 293 + TOPMARGIN, 7 + BOTTOMMARGIN, 233 + END END #endif // APSTUDIO_INVOKED diff --git a/host/dxwndhost.vs2005.sln b/host/dxwndhost.vs2005.sln deleted file mode 100644 index df99804..0000000 --- a/host/dxwndhost.vs2005.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwndhost", "dxwndhost.vs2005.vcproj", "{FD0B0234-8EC5-43C0-A384-1B881DD3D925}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Debug|Win32.ActiveCfg = Debug|Win32 - {FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Debug|Win32.Build.0 = Debug|Win32 - {FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Release|Win32.ActiveCfg = Release|Win32 - {FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/host/dxwndhost.vs2005.suo b/host/dxwndhost.vs2005.suo deleted file mode 100644 index bd01432..0000000 Binary files a/host/dxwndhost.vs2005.suo and /dev/null differ diff --git a/host/dxwndhost.vs2005.vcproj b/host/dxwndhost.vs2005.vcproj deleted file mode 100644 index a6ab141..0000000 --- a/host/dxwndhost.vs2005.vcproj +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index 7664761..1cb3ed0 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhost.vs2008.vcproj b/host/dxwndhost.vs2008.vcproj index 0838f91..b4870bd 100644 --- a/host/dxwndhost.vs2008.vcproj +++ b/host/dxwndhost.vs2008.vcproj @@ -218,6 +218,10 @@ Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > + + @@ -352,6 +356,42 @@ RelativePath=".\SystemTray.h" > + + + + + + + + + + + + + + + + + + @@ -381,6 +421,10 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl" > + + @@ -413,6 +457,42 @@ RelativePath="StdAfx.h" > + + + + + + + + + + + + + + + + + + diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index def934f..a40fd95 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -372,6 +372,8 @@ void CDxwndhostView::OnModify() dlg.m_OpenGLLib = TargetMaps[i].OpenGLLib; dlg.m_Title = TitleMaps[i].title; dlg.m_UnNotify = TargetMaps[i].flags & UNNOTIFY ? 1 : 0; + dlg.m_Windowize = TargetMaps[i].flags2 & WINDOWIZE ? 1 : 0; + dlg.m_NoBanner = TargetMaps[i].flags2 & NOBANNER ? 1 : 0; dlg.m_EmulateSurface = TargetMaps[i].flags & EMULATESURFACE ? 1 : 0; dlg.m_NoEmulateSurface = TargetMaps[i].flags & EMULATEFLAGS ? 0 : 1; dlg.m_EmulateBuffer = TargetMaps[i].flags & EMULATEBUFFER ? 1 : 0; @@ -388,6 +390,8 @@ void CDxwndhostView::OnModify() dlg.m_ImportTable = TargetMaps[i].tflags & OUTIMPORTTABLE ? 1 : 0; dlg.m_HandleDC = TargetMaps[i].flags & HANDLEDC ? 1 : 0; dlg.m_HandleExceptions = TargetMaps[i].flags & HANDLEEXCEPTIONS ? 1 : 0; + dlg.m_SuppressIME = TargetMaps[i].flags2 & SUPPRESSIME ? 1 : 0; + dlg.m_LimitResources = TargetMaps[i].flags2 & LIMITRESOURCES ? 1 : 0; dlg.m_SaveLoad = TargetMaps[i].flags & SAVELOAD ? 1 : 0; dlg.m_SlowDown = TargetMaps[i].flags & SLOWDOWN ? 1 : 0; dlg.m_BlitFromBackBuffer = TargetMaps[i].flags & BLITFROMBACKBUFFER ? 1 : 0; @@ -459,6 +463,8 @@ void CDxwndhostView::OnModify() TargetMaps[i].flags2 = 0; TargetMaps[i].tflags = 0; if(dlg.m_UnNotify) TargetMaps[i].flags |= UNNOTIFY; + if(dlg.m_Windowize) TargetMaps[i].flags2 |= WINDOWIZE; + if(dlg.m_NoBanner) TargetMaps[i].flags2 |= NOBANNER; if(dlg.m_NoEmulateSurface) { dlg.m_EmulateSurface = FALSE; dlg.m_EmulateBuffer = FALSE; @@ -489,6 +495,8 @@ void CDxwndhostView::OnModify() if(dlg.m_ImportTable) TargetMaps[i].tflags |= OUTIMPORTTABLE; if(dlg.m_HandleDC) TargetMaps[i].flags |= HANDLEDC; if(dlg.m_HandleExceptions) TargetMaps[i].flags |= HANDLEEXCEPTIONS; + if(dlg.m_LimitResources) TargetMaps[i].flags2 |= LIMITRESOURCES; + if(dlg.m_SuppressIME) TargetMaps[i].flags2 |= SUPPRESSIME; if(dlg.m_SaveLoad) TargetMaps[i].flags |= SAVELOAD; if(dlg.m_SlowDown) TargetMaps[i].flags |= SLOWDOWN; if(dlg.m_BlitFromBackBuffer) TargetMaps[i].flags |= BLITFROMBACKBUFFER; @@ -753,6 +761,8 @@ void CDxwndhostView::OnAdd() TargetMaps[i].flags2 = 0; TargetMaps[i].tflags = 0; if(dlg.m_UnNotify) TargetMaps[i].flags |= UNNOTIFY; + if(dlg.m_Windowize) TargetMaps[i].flags2 |= WINDOWIZE; + if(dlg.m_NoBanner) TargetMaps[i].flags2 |= NOBANNER; if(dlg.m_NoEmulateSurface) { dlg.m_EmulateSurface = FALSE; dlg.m_EmulateBuffer = FALSE; @@ -783,6 +793,8 @@ void CDxwndhostView::OnAdd() if(dlg.m_ImportTable) TargetMaps[i].tflags |= OUTIMPORTTABLE; if(dlg.m_HandleDC) TargetMaps[i].flags |= HANDLEDC; if(dlg.m_HandleExceptions) TargetMaps[i].flags |= HANDLEEXCEPTIONS; + if(dlg.m_SuppressIME) TargetMaps[i].flags2 |= SUPPRESSIME; + if(dlg.m_LimitResources) TargetMaps[i].flags2 |= LIMITRESOURCES; if(dlg.m_SaveLoad) TargetMaps[i].flags |= SAVELOAD; if(dlg.m_SlowDown) TargetMaps[i].flags |= SLOWDOWN; if(dlg.m_BlitFromBackBuffer) TargetMaps[i].flags |= BLITFROMBACKBUFFER; diff --git a/makebuild.bat b/makebuild.bat new file mode 100644 index 0000000..4b901f5 --- /dev/null +++ b/makebuild.bat @@ -0,0 +1,17 @@ +del dll\dxwnd.*.user +del dll\dxwnd.*.ncb + +del host\dxwndhost.*.user +del host\dxwndhost.*.ncb + +copy Release\dxwnd.exe build +copy Release\dxwnd.dll build + +del dll\Debug\*.* +del dll\Release\*.* + +del host\Debug\*.* +del host\Release\*.* + +echo build done +pause