mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_03_36_src
Former-commit-id: 48168527cfa5375694423fef4183d6e561199859
This commit is contained in:
parent
c4c0b5877f
commit
56f19f7c42
@ -200,6 +200,7 @@
|
|||||||
#define FLIPEMULATION 0x00010000 // create virtual primary and backbuffer as un-attached surfaces and replace Flip with Blt
|
#define FLIPEMULATION 0x00010000 // create virtual primary and backbuffer as un-attached surfaces and replace Flip with Blt
|
||||||
#define SETZBUFFERBITDEPTHS 0x00020000 // when not set, set the legacy dwZBufferBitDepths field in the directdraw capability from GetCaps()
|
#define SETZBUFFERBITDEPTHS 0x00020000 // when not set, set the legacy dwZBufferBitDepths field in the directdraw capability from GetCaps()
|
||||||
#define SHAREDDC 0x00040000 // enable sharing window DC and primary surface DC
|
#define SHAREDDC 0x00040000 // enable sharing window DC and primary surface DC
|
||||||
|
#define WOW32REGISTRY 0x00080000 // Sets KEY_WOW32_64KEY registry flag
|
||||||
|
|
||||||
// logging Tflags DWORD:
|
// logging Tflags DWORD:
|
||||||
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
|
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7974a9d6ece70e47422cce4c82daa4d31131c217d89aa967ad23993ba7a3268c
|
oid sha256:f2fe03b12248b3b75bf4e724f83017b2767ac7eaf5f5c25ac2021da81ba9dd23
|
||||||
size 583680
|
size 585728
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cd704d7423b954daf34806d31bb047aa8d606752a5fa6cd1f9f602b668c5e5f3
|
oid sha256:482a21422742238d783015f22714a6001eac5a1dc38332c53db686dcd086c7c3
|
||||||
size 542208
|
size 544256
|
||||||
|
31
build/exports/Beetle Crazy Cup.dxw
Normal file
31
build/exports/Beetle Crazy Cup.dxw
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[target]
|
||||||
|
title0=Beetle Crazy Cup
|
||||||
|
path0=D:\Games\Beetle Crazy Cup\beetle.exe
|
||||||
|
launchpath0=
|
||||||
|
module0=
|
||||||
|
opengllib0=
|
||||||
|
notes0=
|
||||||
|
ver0=0
|
||||||
|
coord0=0
|
||||||
|
flag0=136314914
|
||||||
|
flagg0=1207959552
|
||||||
|
flagh0=20
|
||||||
|
flagi0=138412036
|
||||||
|
flagj0=4224
|
||||||
|
flagk0=327680
|
||||||
|
tflag0=0
|
||||||
|
initx0=0
|
||||||
|
inity0=0
|
||||||
|
minx0=0
|
||||||
|
miny0=0
|
||||||
|
maxx0=0
|
||||||
|
maxy0=0
|
||||||
|
posx0=50
|
||||||
|
posy0=50
|
||||||
|
sizx0=800
|
||||||
|
sizy0=600
|
||||||
|
maxfps0=0
|
||||||
|
initts0=0
|
||||||
|
winver0=0
|
||||||
|
maxres0=-1
|
||||||
|
swapeffect0=0
|
@ -0,0 +1,32 @@
|
|||||||
|
[target]
|
||||||
|
title0=Command & Conquer - Red Alert The Aftermath
|
||||||
|
path0=D:\Games\C&C - Red Alert The Aftermath\RA95.EXE
|
||||||
|
launchpath0=
|
||||||
|
module0=
|
||||||
|
opengllib0=
|
||||||
|
notes0=
|
||||||
|
registry0=
|
||||||
|
ver0=0
|
||||||
|
coord0=0
|
||||||
|
flag0=136331362
|
||||||
|
flagg0=1207959552
|
||||||
|
flagh0=532
|
||||||
|
flagi0=138412036
|
||||||
|
flagj0=4224
|
||||||
|
flagk0=262144
|
||||||
|
tflag0=0
|
||||||
|
initx0=0
|
||||||
|
inity0=0
|
||||||
|
minx0=0
|
||||||
|
miny0=0
|
||||||
|
maxx0=0
|
||||||
|
maxy0=0
|
||||||
|
posx0=50
|
||||||
|
posy0=50
|
||||||
|
sizx0=800
|
||||||
|
sizy0=600
|
||||||
|
maxfps0=0
|
||||||
|
initts0=0
|
||||||
|
winver0=0
|
||||||
|
maxres0=-1
|
||||||
|
swapeffect0=0
|
@ -9,7 +9,7 @@ flag0=671088675
|
|||||||
flagg0=1207959552
|
flagg0=1207959552
|
||||||
flagh0=20
|
flagh0=20
|
||||||
flagi0=4325380
|
flagi0=4325380
|
||||||
tflag0=6147
|
tflag0=0
|
||||||
initx0=0
|
initx0=0
|
||||||
inity0=0
|
inity0=0
|
||||||
minx0=0
|
minx0=0
|
||||||
@ -27,5 +27,6 @@ maxres0=-1
|
|||||||
launchpath0=
|
launchpath0=
|
||||||
notes0=
|
notes0=
|
||||||
flagj0=128
|
flagj0=128
|
||||||
flagk0=0
|
flagk0=65536
|
||||||
swapeffect0=0
|
swapeffect0=0
|
||||||
|
registry0=
|
||||||
|
@ -27,5 +27,5 @@ maxres0=-1
|
|||||||
launchpath0=
|
launchpath0=
|
||||||
notes0=
|
notes0=
|
||||||
flagj0=128
|
flagj0=128
|
||||||
flagk0=0
|
flagk0=65536
|
||||||
swapeffect0=0
|
swapeffect0=0
|
||||||
|
@ -9,7 +9,7 @@ flag0=134217762
|
|||||||
flagg0=1207959552
|
flagg0=1207959552
|
||||||
flagh0=20
|
flagh0=20
|
||||||
flagi0=4194308
|
flagi0=4194308
|
||||||
tflag0=6146
|
tflag0=0
|
||||||
initx0=0
|
initx0=0
|
||||||
inity0=0
|
inity0=0
|
||||||
minx0=0
|
minx0=0
|
||||||
@ -27,3 +27,6 @@ maxres0=-1
|
|||||||
launchpath0=
|
launchpath0=
|
||||||
notes0=
|
notes0=
|
||||||
flagj0=128
|
flagj0=128
|
||||||
|
registry0=
|
||||||
|
flagk0=65536
|
||||||
|
swapeffect0=0
|
||||||
|
@ -26,3 +26,7 @@ winver0=0
|
|||||||
maxres0=-1
|
maxres0=-1
|
||||||
launchpath0=
|
launchpath0=
|
||||||
flagj0=128
|
flagj0=128
|
||||||
|
notes0=
|
||||||
|
registry0=
|
||||||
|
flagk0=65536
|
||||||
|
swapeffect0=0
|
||||||
|
@ -10,7 +10,7 @@ flag0=136331298
|
|||||||
flagg0=1207959552
|
flagg0=1207959552
|
||||||
flagh0=20
|
flagh0=20
|
||||||
flagi0=138412036
|
flagi0=138412036
|
||||||
flagj0=8320
|
flagj0=128
|
||||||
tflag0=0
|
tflag0=0
|
||||||
initx0=0
|
initx0=0
|
||||||
inity0=0
|
inity0=0
|
||||||
@ -26,3 +26,6 @@ maxfps0=0
|
|||||||
initts0=0
|
initts0=0
|
||||||
winver0=0
|
winver0=0
|
||||||
maxres0=-1
|
maxres0=-1
|
||||||
|
notes0=
|
||||||
|
flagk0=65536
|
||||||
|
swapeffect0=0
|
||||||
|
@ -26,6 +26,6 @@ winver0=0
|
|||||||
maxres0=-1
|
maxres0=-1
|
||||||
launchpath0=
|
launchpath0=
|
||||||
notes0=
|
notes0=
|
||||||
flagj0=162
|
flagj0=130
|
||||||
flagk0=0
|
flagk0=73728
|
||||||
swapeffect0=0
|
swapeffect0=0
|
||||||
|
@ -5,7 +5,7 @@ module0=
|
|||||||
opengllib0=
|
opengllib0=
|
||||||
ver0=0
|
ver0=0
|
||||||
coord0=0
|
coord0=0
|
||||||
flag0=134217766
|
flag0=136314918
|
||||||
flagg0=1207959552
|
flagg0=1207959552
|
||||||
flagh0=20
|
flagh0=20
|
||||||
flagi0=4194308
|
flagi0=4194308
|
||||||
@ -27,3 +27,5 @@ maxres0=-1
|
|||||||
launchpath0=
|
launchpath0=
|
||||||
notes0=
|
notes0=
|
||||||
flagj0=128
|
flagj0=128
|
||||||
|
flagk0=0
|
||||||
|
swapeffect0=0
|
||||||
|
32
build/exports/Star Trek Armada.dxw
Normal file
32
build/exports/Star Trek Armada.dxw
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[target]
|
||||||
|
title0=Star Trek Armada
|
||||||
|
path0=D:\Games\Star Trek Armada\Armada.exe
|
||||||
|
launchpath0=
|
||||||
|
module0=
|
||||||
|
opengllib0=
|
||||||
|
notes0=
|
||||||
|
registry0=
|
||||||
|
ver0=0
|
||||||
|
coord0=0
|
||||||
|
flag0=-2011168669
|
||||||
|
flagg0=1543503872
|
||||||
|
flagh0=98320
|
||||||
|
flagi0=136314884
|
||||||
|
flagj0=4224
|
||||||
|
flagk0=327680
|
||||||
|
tflag0=0
|
||||||
|
initx0=0
|
||||||
|
inity0=0
|
||||||
|
minx0=0
|
||||||
|
miny0=0
|
||||||
|
maxx0=0
|
||||||
|
maxy0=0
|
||||||
|
posx0=100
|
||||||
|
posy0=100
|
||||||
|
sizx0=800
|
||||||
|
sizy0=600
|
||||||
|
maxfps0=0
|
||||||
|
initts0=0
|
||||||
|
winver0=0
|
||||||
|
maxres0=-1
|
||||||
|
swapeffect0=0
|
32
build/exports/Star Trek Generations.dxw
Normal file
32
build/exports/Star Trek Generations.dxw
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[target]
|
||||||
|
title0=Star Trek Generations
|
||||||
|
path0=D:\Games\stgen\sgens.exe
|
||||||
|
launchpath0=
|
||||||
|
module0=
|
||||||
|
opengllib0=
|
||||||
|
notes0=
|
||||||
|
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Star Trek Generations]\n[HKEY_LOCAL_MACHINE\SOFTWARE\MicroProse\Star Trek Generations\1.0]\n"Path"="D:\\GAMES\\STGEN"\n"CDPath"="F:\\GENS"\n"InstallSet"="MED"\n
|
||||||
|
ver0=1
|
||||||
|
coord0=0
|
||||||
|
flag0=136314978
|
||||||
|
flagg0=1744830464
|
||||||
|
flagh0=20
|
||||||
|
flagi0=138412036
|
||||||
|
flagj0=4224
|
||||||
|
flagk0=0
|
||||||
|
tflag0=0
|
||||||
|
initx0=0
|
||||||
|
inity0=0
|
||||||
|
minx0=0
|
||||||
|
miny0=0
|
||||||
|
maxx0=0
|
||||||
|
maxy0=0
|
||||||
|
posx0=50
|
||||||
|
posy0=50
|
||||||
|
sizx0=800
|
||||||
|
sizy0=600
|
||||||
|
maxfps0=0
|
||||||
|
initts0=0
|
||||||
|
winver0=0
|
||||||
|
maxres0=-1
|
||||||
|
swapeffect0=0
|
@ -27,5 +27,6 @@ initts0=0
|
|||||||
winver0=0
|
winver0=0
|
||||||
maxres0=-1
|
maxres0=-1
|
||||||
notes0=
|
notes0=
|
||||||
flagk0=0
|
flagk0=65536
|
||||||
swapeffect0=0
|
swapeffect0=0
|
||||||
|
registry0=
|
||||||
|
@ -887,4 +887,16 @@ fix: the flags for disabling DDSCAPS_SYSTEMMEMORY capability are now used also i
|
|||||||
fix: handling of NULL DC in non emulated modes: the NULL DC (corresponding to the whole desktop) is replaced by the window DC. This reduces problems like clearing the whole desktop.
|
fix: handling of NULL DC in non emulated modes: the NULL DC (corresponding to the whole desktop) is replaced by the window DC. This reduces problems like clearing the whole desktop.
|
||||||
fix: EnumDisplayModes was returning wrong modes list in SVGA mode.
|
fix: EnumDisplayModes was returning wrong modes list in SVGA mode.
|
||||||
fix: applied the error suppression to the DeleteAttachedSurface hooker.
|
fix: applied the error suppression to the DeleteAttachedSurface hooker.
|
||||||
fix: hooked User32 CreateRectRegion/Indirect calls.
|
fix: hooked User32 CreateRectRegion/Indirect calls.
|
||||||
|
|
||||||
|
v2.03.36:
|
||||||
|
fix: fixed "fix movies color depth" flag for color depths greater than 8BPP. Fixes the "Horde 2 the Citadel" intro movie.
|
||||||
|
add: added the "Set KEY_WOW64_32KEY flag" flag to prevent registry redirection for win32 applications
|
||||||
|
add: virtual registry configuration integrated in DxWnd configuration and exported files
|
||||||
|
add: hooking of RegEnumValue() call. Useful for "Star trek Generations"
|
||||||
|
fix: fixed mouse handling through "Message processing" option for child windows. Fixes "Star Trek Armada" mouse problems
|
||||||
|
fix: fixed GetDC hooker for child windows. Fixes some "Star Trek Armada" graphic problems
|
||||||
|
fix: CreateCompatibleDC hooker printing wrong error messages in normal conditions
|
||||||
|
fix: fixed DrawText, DrawTextEx hookers returning wrong RECT structure. Fixes "Star Trek Armada" text placement problems
|
||||||
|
add: completed log messages for DrawTextEx, CreateDialogParam, DialogBoxParam and CreateDialogIndirectParam
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
typedef LONG (WINAPI *RegFlushKey_Type)(HKEY);
|
typedef LONG (WINAPI *RegFlushKey_Type)(HKEY);
|
||||||
LONG WINAPI extRegFlushKey(HKEY);
|
LONG WINAPI extRegFlushKey(HKEY);
|
||||||
RegFlushKey_Type pRegFlushKey = NULL;
|
RegFlushKey_Type pRegFlushKey = NULL;
|
||||||
|
typedef LONG (WINAPI *RegEnumValueA_Type)(HKEY, DWORD, LPTSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
|
||||||
|
LONG WINAPI extRegEnumValueA(HKEY, DWORD, LPTSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
|
||||||
|
RegEnumValueA_Type pRegEnumValueA = NULL;
|
||||||
|
|
||||||
static HookEntry_Type Hooks[]={
|
static HookEntry_Type Hooks[]={
|
||||||
{HOOK_IAT_CANDIDATE, "RegOpenKeyExA", NULL, (FARPROC *)&pRegOpenKeyEx, (FARPROC)extRegOpenKeyEx},
|
{HOOK_IAT_CANDIDATE, "RegOpenKeyExA", NULL, (FARPROC *)&pRegOpenKeyEx, (FARPROC)extRegOpenKeyEx},
|
||||||
@ -19,6 +22,8 @@ static HookEntry_Type Hooks[]={
|
|||||||
{HOOK_IAT_CANDIDATE, "RegCreateKeyExA", NULL, (FARPROC *)&pRegCreateKeyEx, (FARPROC)extRegCreateKeyEx},
|
{HOOK_IAT_CANDIDATE, "RegCreateKeyExA", NULL, (FARPROC *)&pRegCreateKeyEx, (FARPROC)extRegCreateKeyEx},
|
||||||
{HOOK_IAT_CANDIDATE, "RegSetValueExA", NULL, (FARPROC *)&pRegSetValueEx, (FARPROC)extRegSetValueEx},
|
{HOOK_IAT_CANDIDATE, "RegSetValueExA", NULL, (FARPROC *)&pRegSetValueEx, (FARPROC)extRegSetValueEx},
|
||||||
{HOOK_IAT_CANDIDATE, "RegFlushKey", NULL, (FARPROC *)&pRegFlushKey, (FARPROC)extRegFlushKey},
|
{HOOK_IAT_CANDIDATE, "RegFlushKey", NULL, (FARPROC *)&pRegFlushKey, (FARPROC)extRegFlushKey},
|
||||||
|
// v2.3.36
|
||||||
|
{HOOK_IAT_CANDIDATE, "RegEnumValueA", NULL, (FARPROC *)&pRegEnumValueA, (FARPROC)extRegEnumValueA},
|
||||||
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
|
{HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -152,7 +157,14 @@ LONG WINAPI extRegOpenKeyEx(
|
|||||||
if(res == ERROR_SUCCESS) return res;
|
if(res == ERROR_SUCCESS) return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dxw.dwFlags6 & WOW64REGISTRY) ulOptions |= KEY_WOW64_64KEY;
|
if(dxw.dwFlags6 & WOW64REGISTRY){
|
||||||
|
ulOptions &= ~KEY_WOW64_32KEY;
|
||||||
|
ulOptions |= KEY_WOW64_64KEY;
|
||||||
|
}
|
||||||
|
if(dxw.dwFlags6 & WOW32REGISTRY){
|
||||||
|
ulOptions &= ~KEY_WOW64_64KEY;
|
||||||
|
ulOptions |= KEY_WOW64_32KEY;
|
||||||
|
}
|
||||||
|
|
||||||
res=(*pRegOpenKeyEx)(hKey, lpSubKey, ulOptions, samDesired, phkResult);
|
res=(*pRegOpenKeyEx)(hKey, lpSubKey, ulOptions, samDesired, phkResult);
|
||||||
OutTraceR("RegOpenKeyEx: res=%x phkResult=%x\n", res, phkResult ? *phkResult : 0);
|
OutTraceR("RegOpenKeyEx: res=%x phkResult=%x\n", res, phkResult ? *phkResult : 0);
|
||||||
@ -368,3 +380,12 @@ LONG WINAPI extRegCreateKey(HKEY hKey, LPCTSTR lpSubKey, PHKEY phkResult)
|
|||||||
else
|
else
|
||||||
return (*pRegCreateKey)(hKey, lpSubKey, phkResult);
|
return (*pRegCreateKey)(hKey, lpSubKey, phkResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LONG WINAPI extRegEnumValueA(HKEY hKey, DWORD dwIndex, LPTSTR lpValueName, LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData)
|
||||||
|
{
|
||||||
|
LONG ret;
|
||||||
|
OutTrace("RegEnumValue: hKey=%x(%s) Index=%x\n", hKey, hKey2String(hKey), dwIndex);
|
||||||
|
ret=(*pRegEnumValueA)(hKey, dwIndex, lpValueName, lpcchValueName, lpReserved, lpType, lpData, lpcbData);
|
||||||
|
OutTrace("RegEnumValue: hKey=%x(%s) Index=%x ValueName=\"%s\", Type=%x ret=%x\n", hKey, hKey2String(hKey), dwIndex, lpValueName, lpType ? *lpType : 0, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@ -109,7 +109,7 @@ static char *Flag6Names[32]={
|
|||||||
"SUPPRESSRELEASE", "FIXMOVIESCOLOR", "WOW64REGISTRY", "DISABLEMAXWINMODE",
|
"SUPPRESSRELEASE", "FIXMOVIESCOLOR", "WOW64REGISTRY", "DISABLEMAXWINMODE",
|
||||||
"FIXPITCH", "POWER2WIDTH", "HIDETASKBAR", "ACTIVATEAPP",
|
"FIXPITCH", "POWER2WIDTH", "HIDETASKBAR", "ACTIVATEAPP",
|
||||||
"NOSYSMEMPRIMARY", "NOSYSMEMBACKBUF", "CONFIRMONCLOSE", "TERMINATEONCLOSE",
|
"NOSYSMEMPRIMARY", "NOSYSMEMBACKBUF", "CONFIRMONCLOSE", "TERMINATEONCLOSE",
|
||||||
"FLIPEMULATION", "SETZBUFFERBITDEPTHS", "SHAREDDC", "",
|
"FLIPEMULATION", "SETZBUFFERBITDEPTHS", "SHAREDDC", "WOW32REGISTRY",
|
||||||
"", "", "", "",
|
"", "", "", "",
|
||||||
"", "", "", "",
|
"", "", "", "",
|
||||||
"", "", "", "",
|
"", "", "", "",
|
||||||
@ -1383,6 +1383,7 @@ void HookModule(HMODULE base, int dxversion)
|
|||||||
if(dxw.dwFlags4 & HOOKGLIDE) HookGlideLibs(base);
|
if(dxw.dwFlags4 & HOOKGLIDE) HookGlideLibs(base);
|
||||||
if( (dxw.dwFlags3 & EMULATEREGISTRY) ||
|
if( (dxw.dwFlags3 & EMULATEREGISTRY) ||
|
||||||
(dxw.dwFlags4 & OVERRIDEREGISTRY) ||
|
(dxw.dwFlags4 & OVERRIDEREGISTRY) ||
|
||||||
|
(dxw.dwFlags6 & (WOW32REGISTRY|WOW64REGISTRY)) ||
|
||||||
(dxw.dwTFlags & OUTREGISTRY)) HookAdvApi32(base);
|
(dxw.dwTFlags & OUTREGISTRY)) HookAdvApi32(base);
|
||||||
HookMSV4WLibs(base); // -- used by Aliens & Amazons demo: what for?
|
HookMSV4WLibs(base); // -- used by Aliens & Amazons demo: what for?
|
||||||
HookAVIFil32(base);
|
HookAVIFil32(base);
|
||||||
@ -1485,7 +1486,8 @@ LRESULT CALLBACK MessageHook(int code, WPARAM wParam, LPARAM lParam)
|
|||||||
else {
|
else {
|
||||||
// fix the message point coordinates
|
// fix the message point coordinates
|
||||||
POINT upleft={0,0};
|
POINT upleft={0,0};
|
||||||
(*pClientToScreen)(dxw.GethWnd(), &upleft);
|
// v2.03.36: offset to be calculated from target window
|
||||||
|
(*pClientToScreen)(msg->hwnd, &upleft);
|
||||||
msg->pt = dxw.SubCoordinates(msg->pt, upleft);
|
msg->pt = dxw.SubCoordinates(msg->pt, upleft);
|
||||||
msg->pt=dxw.FixCursorPos(msg->pt);
|
msg->pt=dxw.FixCursorPos(msg->pt);
|
||||||
// beware: needs fix for mousewheel?
|
// beware: needs fix for mousewheel?
|
||||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "TlHelp32.h"
|
#include "TlHelp32.h"
|
||||||
|
|
||||||
#define VERSION "2.03.35"
|
#define VERSION "2.03.36"
|
||||||
|
|
||||||
#define DDTHREADLOCK 1
|
#define DDTHREADLOCK 1
|
||||||
//#define LOCKTHREADS
|
//#define LOCKTHREADS
|
||||||
|
Binary file not shown.
@ -715,7 +715,7 @@ HDC WINAPI extGDICreateCompatibleDC(HDC hdc)
|
|||||||
SetLastError(0);
|
SetLastError(0);
|
||||||
RetHdc=(*pGDICreateCompatibleDC)(hdc);
|
RetHdc=(*pGDICreateCompatibleDC)(hdc);
|
||||||
LastError=GetLastError();
|
LastError=GetLastError();
|
||||||
if(!LastError)
|
if(LastError == 0)
|
||||||
OutTraceDW("GDI.CreateCompatibleDC: returning HDC=%x\n", RetHdc);
|
OutTraceDW("GDI.CreateCompatibleDC: returning HDC=%x\n", RetHdc);
|
||||||
else
|
else
|
||||||
OutTraceE("GDI.CreateCompatibleDC ERROR: err=%d at %d\n", LastError, __LINE__);
|
OutTraceE("GDI.CreateCompatibleDC ERROR: err=%d at %d\n", LastError, __LINE__);
|
||||||
@ -756,20 +756,20 @@ BOOL WINAPI extGDIBitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nH
|
|||||||
OutTrace("Debug: DC dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWDest, nHDest);
|
OutTrace("Debug: DC dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWDest, nHDest);
|
||||||
}
|
}
|
||||||
else if(WindowFromDC(hdcDest)==NULL){
|
else if(WindowFromDC(hdcDest)==NULL){
|
||||||
// V2.02.31: See StretchBlt.
|
// V2.02.31: See StretchBlt.
|
||||||
int nWDest, nHDest;
|
int nWDest, nHDest;
|
||||||
nWDest= nWidth;
|
nWDest= nWidth;
|
||||||
nHDest= nHeight;
|
nHDest= nHeight;
|
||||||
dxw.MapWindow(&nXDest, &nYDest, &nWDest, &nHDest);
|
dxw.MapWindow(&nXDest, &nYDest, &nWDest, &nHDest);
|
||||||
res=(*pGDIStretchBlt)(hdcDest, nXDest, nYDest, nWDest, nHDest, hdcSrc, nXSrc, nYSrc, nWidth, nHeight, dwRop);
|
res=(*pGDIStretchBlt)(hdcDest, nXDest, nYDest, nWDest, nHDest, hdcSrc, nXSrc, nYSrc, nWidth, nHeight, dwRop);
|
||||||
dxw.ShowOverlay(hdcDest);
|
dxw.ShowOverlay(hdcDest);
|
||||||
OutTrace("Debug: NULL dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWDest, nHDest);
|
OutTrace("Debug: NULL dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWDest, nHDest);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop);
|
||||||
|
OutTrace("Debug: PROXY dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWidth, nHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop);
|
|
||||||
OutTrace("Debug: PROXY dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWidth, nHeight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop);
|
res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop);
|
||||||
OutTrace("Debug: MEM dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWidth, nHeight);
|
OutTrace("Debug: MEM dest=(%d,%d) size=(%d,%d)\n", nXDest, nYDest, nWidth, nHeight);
|
||||||
|
@ -312,6 +312,17 @@ static void Stopper(char *s, int line)
|
|||||||
#define STOPPER(s)
|
#define STOPPER(s)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static LPCSTR sTemplateName(LPCSTR tn)
|
||||||
|
{
|
||||||
|
static char sBuf[20+1];
|
||||||
|
if((DWORD)tn >> 16)
|
||||||
|
return tn;
|
||||||
|
else {
|
||||||
|
sprintf(sBuf, "ID:(%x)", ((DWORD)tn & 0x0000FFFF));
|
||||||
|
return sBuf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// globals, externs, static functions...
|
// globals, externs, static functions...
|
||||||
@ -1952,6 +1963,18 @@ static HDC WINAPI sGetDC(HWND hwnd, char *ApiName)
|
|||||||
LPDIRECTDRAWSURFACE lpDDSPrim;
|
LPDIRECTDRAWSURFACE lpDDSPrim;
|
||||||
lpDDSPrim = dxwss.GetPrimarySurface();
|
lpDDSPrim = dxwss.GetPrimarySurface();
|
||||||
if (lpDDSPrim) (*pGetDC)(lpDDSPrim, &hFlippedDC);
|
if (lpDDSPrim) (*pGetDC)(lpDDSPrim, &hFlippedDC);
|
||||||
|
if (!(hwnd == dxw.GethWnd())) {
|
||||||
|
POINT father, child, offset;
|
||||||
|
father.x = father.y = 0;
|
||||||
|
child.x = child.y = 0;
|
||||||
|
(*pClientToScreen)(dxw.GethWnd(),&father);
|
||||||
|
(*pClientToScreen)(hwnd,&child);
|
||||||
|
offset.x = child.x - father.x;
|
||||||
|
offset.y = child.y - father.y;
|
||||||
|
dxw.UnmapClient(&offset);
|
||||||
|
OutTraceDW("%s: child window hwnd=%x offset=(%d,%d)\n", ApiName, hwnd, offset.x, offset.y);
|
||||||
|
(*pSetViewportOrgEx)(hFlippedDC, offset.x, offset.y, NULL);
|
||||||
|
}
|
||||||
OutTraceDW("%s: remapping flipped GDI lpDDSPrim=%x hdc=%x\n", ApiName, lpDDSPrim, hFlippedDC);
|
OutTraceDW("%s: remapping flipped GDI lpDDSPrim=%x hdc=%x\n", ApiName, lpDDSPrim, hFlippedDC);
|
||||||
if(hFlippedDC) return hFlippedDC;
|
if(hFlippedDC) return hFlippedDC;
|
||||||
}
|
}
|
||||||
@ -2012,6 +2035,7 @@ HDC WINAPI extGDIGetWindowDC(HWND hwnd)
|
|||||||
|
|
||||||
return sGetDC(hwnd, "GDI.GetWindowDC");
|
return sGetDC(hwnd, "GDI.GetWindowDC");
|
||||||
}
|
}
|
||||||
|
|
||||||
int WINAPI extGDIReleaseDC(HWND hwnd, HDC hDC)
|
int WINAPI extGDIReleaseDC(HWND hwnd, HDC hDC)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
@ -2120,8 +2144,10 @@ HWND WINAPI extCreateDialogIndirectParam(HINSTANCE hInstance, LPCDLGTEMPLATE lpT
|
|||||||
HWND RetHWND;
|
HWND RetHWND;
|
||||||
BOOL FullScreen;
|
BOOL FullScreen;
|
||||||
FullScreen = dxw.IsFullScreen();
|
FullScreen = dxw.IsFullScreen();
|
||||||
OutTraceDW("CreateDialogIndirectParam: hInstance=%x lpTemplate=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n",
|
OutTraceDW("CreateDialogIndirectParam: hInstance=%x lpTemplate=(style=%x extstyle=%x items=%d pos=(%d,%d) size=(%dx%d)) hWndParent=%x lpDialogFunc=%x lParamInit=%x\n",
|
||||||
hInstance, "tbd", hWndParent, lpDialogFunc, lParamInit);
|
hInstance,
|
||||||
|
lpTemplate->style, lpTemplate->dwExtendedStyle, lpTemplate->cdit, lpTemplate->x, lpTemplate->y, lpTemplate->cx, lpTemplate->cy,
|
||||||
|
hWndParent, lpDialogFunc, lParamInit);
|
||||||
if(dxw.IsFullScreen() && hWndParent==NULL) hWndParent=dxw.GethWnd();
|
if(dxw.IsFullScreen() && hWndParent==NULL) hWndParent=dxw.GethWnd();
|
||||||
RetHWND=(*pCreateDialogIndirectParam)(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit);
|
RetHWND=(*pCreateDialogIndirectParam)(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit);
|
||||||
dxw.SetFullScreen(FullScreen);
|
dxw.SetFullScreen(FullScreen);
|
||||||
@ -2143,7 +2169,7 @@ HWND WINAPI extCreateDialogParam(HINSTANCE hInstance, LPCTSTR lpTemplateName, HW
|
|||||||
BOOL FullScreen;
|
BOOL FullScreen;
|
||||||
FullScreen = dxw.IsFullScreen();
|
FullScreen = dxw.IsFullScreen();
|
||||||
OutTraceDW("CreateDialogParam: hInstance=%x lpTemplateName=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n",
|
OutTraceDW("CreateDialogParam: hInstance=%x lpTemplateName=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n",
|
||||||
hInstance, "tbd", hWndParent, lpDialogFunc, lParamInit);
|
hInstance, sTemplateName(lpTemplateName), hWndParent, lpDialogFunc, lParamInit);
|
||||||
if(hWndParent==NULL) hWndParent=dxw.GethWnd();
|
if(hWndParent==NULL) hWndParent=dxw.GethWnd();
|
||||||
RetHWND=(*pCreateDialogParam)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, lParamInit);
|
RetHWND=(*pCreateDialogParam)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, lParamInit);
|
||||||
dxw.SetFullScreen(FullScreen);
|
dxw.SetFullScreen(FullScreen);
|
||||||
@ -2354,35 +2380,64 @@ BOOL gFixed;
|
|||||||
int WINAPI extDrawTextA(HDC hdc, LPCTSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat)
|
int WINAPI extDrawTextA(HDC hdc, LPCTSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
BOOL MustScale;
|
||||||
OutTraceDW("DrawText: hdc=%x rect=(%d,%d)-(%d,%d) Format=%x(%s) Text=(%d)\"%s\"\n",
|
OutTraceDW("DrawText: hdc=%x rect=(%d,%d)-(%d,%d) Format=%x(%s) Text=(%d)\"%s\"\n",
|
||||||
hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, uFormat, ExplainDTFormat(uFormat), nCount, lpchText);
|
hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, uFormat, ExplainDTFormat(uFormat), nCount, lpchText);
|
||||||
|
|
||||||
gFixed = TRUE;
|
MustScale = dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc));
|
||||||
if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){
|
if (MustScale){
|
||||||
dxw.MapClient((RECT *)lpRect);
|
dxw.MapClient((RECT *)lpRect);
|
||||||
OutTraceDW("DrawText: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
OutTraceDW("DrawText: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gFixed = TRUE;
|
||||||
ret=(*pDrawText)(hdc, lpchText, nCount, lpRect, uFormat);
|
ret=(*pDrawText)(hdc, lpchText, nCount, lpRect, uFormat);
|
||||||
gFixed=FALSE;
|
gFixed=FALSE;
|
||||||
|
|
||||||
// if nCount is zero, DrawRect returns 0 as text heigth, but this is not an error! (ref. "Imperialism II")
|
// if nCount is zero, DrawRect returns 0 as text heigth, but this is not an error! (ref. "Imperialism II")
|
||||||
if(nCount && !ret) OutTraceE("DrawText: ERROR ret=%x err=%d\n", ret, GetLastError());
|
if(nCount && !ret) OutTraceE("DrawText: ERROR ret=%x err=%d\n", ret, GetLastError());
|
||||||
|
|
||||||
|
if (MustScale){
|
||||||
|
dxw.UnmapClient((RECT *)lpRect);
|
||||||
|
OutTraceDW("DrawText: fixed output rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WINAPI extDrawTextExA(HDC hdc, LPTSTR lpchText, int nCount, LPRECT lpRect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams)
|
int WINAPI extDrawTextExA(HDC hdc, LPTSTR lpchText, int nCount, LPRECT lpRect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
BOOL MustScale;
|
||||||
|
|
||||||
OutTraceDW("DrawTextEx: hdc=%x rect=(%d,%d)-(%d,%d) DTFormat=%x Text=(%d)\"%s\"\n",
|
OutTraceDW("DrawTextEx: hdc=%x rect=(%d,%d)-(%d,%d) DTFormat=%x Text=(%d)\"%s\"\n",
|
||||||
hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, dwDTFormat, nCount, lpchText);
|
hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, dwDTFormat, nCount, lpchText);
|
||||||
|
if (IsDebug){
|
||||||
|
if(lpDTParams)
|
||||||
|
OutTrace("DTParams: size=%d (L,R)margins=(%d,%d) TabLength=%d lDrawn=%d\n",
|
||||||
|
lpDTParams->cbSize, lpDTParams->iLeftMargin, lpDTParams->iRightMargin,
|
||||||
|
lpDTParams->iTabLength, lpDTParams->uiLengthDrawn);
|
||||||
|
else
|
||||||
|
OutTrace("DTParams: NULL\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){
|
MustScale = dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc));
|
||||||
|
|
||||||
|
if (MustScale){
|
||||||
dxw.MapClient((RECT *)lpRect);
|
dxw.MapClient((RECT *)lpRect);
|
||||||
OutTraceDW("DrawTextEx: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
OutTraceDW("DrawTextEx: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gFixed = TRUE;
|
||||||
ret=(*pDrawTextEx)(hdc, lpchText, nCount, lpRect, dwDTFormat, lpDTParams);
|
ret=(*pDrawTextEx)(hdc, lpchText, nCount, lpRect, dwDTFormat, lpDTParams);
|
||||||
if(!ret) OutTraceE("DrawTextEx: ERROR ret=%x err=%d\n", ret, GetLastError());
|
gFixed=FALSE;
|
||||||
|
if(nCount && !ret) OutTraceE("DrawTextEx: ERROR ret=%x err=%d\n", ret, GetLastError());
|
||||||
|
|
||||||
|
if (MustScale){
|
||||||
|
dxw.UnmapClient((RECT *)lpRect);
|
||||||
|
OutTraceDW("DrawTextEx: fixed output rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2960,7 +3015,8 @@ INT_PTR WINAPI extDialogBoxParamA(HINSTANCE hInstance, LPCTSTR lpTemplateName, H
|
|||||||
{
|
{
|
||||||
BOOL ret, FullScreen;
|
BOOL ret, FullScreen;
|
||||||
FullScreen = dxw.IsFullScreen();
|
FullScreen = dxw.IsFullScreen();
|
||||||
OutTraceDW("DialogBoxParamA: FullScreen=%x\n", FullScreen);
|
OutTraceDW("DialogBoxParamA: FullScreen=%x TemplateName=\"%s\" WndParent=%x\n",
|
||||||
|
FullScreen, sTemplateName(lpTemplateName), hWndParent);
|
||||||
dxw.SetFullScreen(FALSE);
|
dxw.SetFullScreen(FALSE);
|
||||||
ret = (*pDialogBoxParamA)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
ret = (*pDialogBoxParamA)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
|
||||||
dxw.SetFullScreen(FullScreen);
|
dxw.SetFullScreen(FullScreen);
|
||||||
|
@ -49,6 +49,7 @@ void CTabCompat::DoDataExchange(CDataExchange* pDX)
|
|||||||
DDX_Check(pDX, IDC_EMULATEREGISTRY, cTarget->m_EmulateRegistry);
|
DDX_Check(pDX, IDC_EMULATEREGISTRY, cTarget->m_EmulateRegistry);
|
||||||
DDX_Check(pDX, IDC_OVERRIDEREGISTRY, cTarget->m_OverrideRegistry);
|
DDX_Check(pDX, IDC_OVERRIDEREGISTRY, cTarget->m_OverrideRegistry);
|
||||||
DDX_Check(pDX, IDC_WOW64REGISTRY, cTarget->m_Wow64Registry);
|
DDX_Check(pDX, IDC_WOW64REGISTRY, cTarget->m_Wow64Registry);
|
||||||
|
DDX_Check(pDX, IDC_WOW32REGISTRY, cTarget->m_Wow32Registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CTabCompat, CDialog)
|
BEGIN_MESSAGE_MAP(CTabCompat, CDialog)
|
||||||
|
40
host/TabRegistry.cpp
Normal file
40
host/TabRegistry.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// TabRegistry.cpp : implementation file
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "TargetDlg.h"
|
||||||
|
#include "TabRegistry.h"
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#undef THIS_FILE
|
||||||
|
static char THIS_FILE[] = __FILE__;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CTabRegistry dialog
|
||||||
|
|
||||||
|
CTabRegistry::CTabRegistry(CWnd* pParent /*=NULL*/)
|
||||||
|
// : CTargetDlg(pParent)
|
||||||
|
: CDialog(CTabRegistry::IDD, pParent)
|
||||||
|
{
|
||||||
|
//{{AFX_DATA_INIT(CTabRegistry)
|
||||||
|
// NOTE: the ClassWizard will add member initialization here
|
||||||
|
//}}AFX_DATA_INIT
|
||||||
|
}
|
||||||
|
|
||||||
|
void CTabRegistry::DoDataExchange(CDataExchange* pDX)
|
||||||
|
{
|
||||||
|
CDialog::DoDataExchange(pDX);
|
||||||
|
CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent()));
|
||||||
|
DDX_Text(pDX, IDC_REGISTRY, cTarget->m_Registry);
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN_MESSAGE_MAP(CTabRegistry, CDialog)
|
||||||
|
//{{AFX_MSG_MAP(CTabRegistry)
|
||||||
|
// NOTE: the ClassWizard will add message map macros here
|
||||||
|
//}}AFX_MSG_MAP
|
||||||
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CTabRegistry message handlers
|
45
host/TabRegistry.h
Normal file
45
host/TabRegistry.h
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#if !defined(AFX_TABNOTES_H__798A9124_C906_446C_822D_322B5AB6F1F1__INCLUDED_)
|
||||||
|
#define AFX_TABNOTES_H__798A9124_C906_446C_822D_322B5AB6F1F1__INCLUDED_
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
#include "TargetDlg.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CTabRegistry dialog
|
||||||
|
|
||||||
|
//class CTabRegistry : public CTargetDlg
|
||||||
|
class CTabRegistry : public CDialog
|
||||||
|
{
|
||||||
|
// Construction
|
||||||
|
public:
|
||||||
|
CTabRegistry(CWnd* pParent = NULL); // standard constructor
|
||||||
|
|
||||||
|
// Dialog Data
|
||||||
|
//{{AFX_DATA(CTabDirectX)
|
||||||
|
enum { IDD = IDD_TAB_REGISTRY };
|
||||||
|
// 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_)
|
@ -99,6 +99,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
|||||||
m_EmulateRegistry = FALSE;
|
m_EmulateRegistry = FALSE;
|
||||||
m_OverrideRegistry = FALSE;
|
m_OverrideRegistry = FALSE;
|
||||||
m_Wow64Registry = FALSE;
|
m_Wow64Registry = FALSE;
|
||||||
|
m_Wow32Registry = FALSE;
|
||||||
m_FullScreenOnly = FALSE;
|
m_FullScreenOnly = FALSE;
|
||||||
m_FilterMessages = FALSE;
|
m_FilterMessages = FALSE;
|
||||||
m_PeekAllMessages = FALSE;
|
m_PeekAllMessages = FALSE;
|
||||||
@ -246,6 +247,8 @@ BOOL CTargetDlg::OnInitDialog()
|
|||||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||||
LoadString(AfxGetResourceHandle(), DXW_TAB_COMPAT, sCaption, sizeof(sCaption));
|
LoadString(AfxGetResourceHandle(), DXW_TAB_COMPAT, sCaption, sizeof(sCaption));
|
||||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||||
|
LoadString(AfxGetResourceHandle(), DXW_TAB_REGISTRY, sCaption, sizeof(sCaption));
|
||||||
|
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||||
LoadString(AfxGetResourceHandle(), DXW_TAB_NOTES, sCaption, sizeof(sCaption));
|
LoadString(AfxGetResourceHandle(), DXW_TAB_NOTES, sCaption, sizeof(sCaption));
|
||||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||||
LoadString(AfxGetResourceHandle(), DXW_TAB_DEBUG, sCaption, sizeof(sCaption));
|
LoadString(AfxGetResourceHandle(), DXW_TAB_DEBUG, sCaption, sizeof(sCaption));
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
BOOL m_EmulateRegistry;
|
BOOL m_EmulateRegistry;
|
||||||
BOOL m_OverrideRegistry;
|
BOOL m_OverrideRegistry;
|
||||||
BOOL m_Wow64Registry;
|
BOOL m_Wow64Registry;
|
||||||
|
BOOL m_Wow32Registry;
|
||||||
BOOL m_FullScreenOnly;
|
BOOL m_FullScreenOnly;
|
||||||
BOOL m_FilterMessages;
|
BOOL m_FilterMessages;
|
||||||
BOOL m_PeekAllMessages;
|
BOOL m_PeekAllMessages;
|
||||||
@ -75,6 +76,7 @@ public:
|
|||||||
CString m_Title;
|
CString m_Title;
|
||||||
CString m_OpenGLLib;
|
CString m_OpenGLLib;
|
||||||
CString m_Notes;
|
CString m_Notes;
|
||||||
|
CString m_Registry;
|
||||||
BOOL m_SaveLoad;
|
BOOL m_SaveLoad;
|
||||||
BOOL m_SlowDown;
|
BOOL m_SlowDown;
|
||||||
BOOL m_BlitFromBackBuffer;
|
BOOL m_BlitFromBackBuffer;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "TabOpenGL.h"
|
#include "TabOpenGL.h"
|
||||||
#include "TabCompat.h"
|
#include "TabCompat.h"
|
||||||
#include "TabColor.h"
|
#include "TabColor.h"
|
||||||
|
#include "TabRegistry.h"
|
||||||
#include "TabNotes.h"
|
#include "TabNotes.h"
|
||||||
#include "TabSysLibs.h"
|
#include "TabSysLibs.h"
|
||||||
#include "TabDebug.h"
|
#include "TabDebug.h"
|
||||||
@ -58,6 +59,7 @@ CDXTabCtrl::CDXTabCtrl()
|
|||||||
m_tabPages[i++]=new CTabLogs;
|
m_tabPages[i++]=new CTabLogs;
|
||||||
m_tabPages[i++]=new CTabSysLibs;
|
m_tabPages[i++]=new CTabSysLibs;
|
||||||
m_tabPages[i++]=new CTabCompat;
|
m_tabPages[i++]=new CTabCompat;
|
||||||
|
m_tabPages[i++]=new CTabRegistry;
|
||||||
m_tabPages[i++]=new CTabNotes;
|
m_tabPages[i++]=new CTabNotes;
|
||||||
if (gbDebug) m_tabPages[i++]=new CTabDebug;
|
if (gbDebug) m_tabPages[i++]=new CTabDebug;
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ void CDXTabCtrl::Init()
|
|||||||
m_tabPages[i++]->Create(IDD_TAB_LOG, this);
|
m_tabPages[i++]->Create(IDD_TAB_LOG, this);
|
||||||
m_tabPages[i++]->Create(IDD_TAB_SYSLIBS, this);
|
m_tabPages[i++]->Create(IDD_TAB_SYSLIBS, this);
|
||||||
m_tabPages[i++]->Create(IDD_TAB_COMPAT, this);
|
m_tabPages[i++]->Create(IDD_TAB_COMPAT, this);
|
||||||
|
m_tabPages[i++]->Create(IDD_TAB_REGISTRY, this);
|
||||||
m_tabPages[i++]->Create(IDD_TAB_NOTES, this);
|
m_tabPages[i++]->Create(IDD_TAB_NOTES, this);
|
||||||
if (gbDebug) m_tabPages[i++]->Create(IDD_TAB_DEBUG, this);
|
if (gbDebug) m_tabPages[i++]->Create(IDD_TAB_DEBUG, this);
|
||||||
|
|
||||||
|
Binary file not shown.
@ -23,6 +23,7 @@ extern int MessageBoxLangArg(UINT, UINT, UINT, ...);
|
|||||||
// the (limited) IPC space and allow for more record entryes (currently 255).
|
// the (limited) IPC space and allow for more record entryes (currently 255).
|
||||||
|
|
||||||
#define MAX_NOTES 1024
|
#define MAX_NOTES 1024
|
||||||
|
#define MAX_REGISTRY 2048
|
||||||
#define MAX_TITLE 80
|
#define MAX_TITLE 80
|
||||||
|
|
||||||
typedef struct PRIVATEMAP
|
typedef struct PRIVATEMAP
|
||||||
@ -30,6 +31,7 @@ typedef struct PRIVATEMAP
|
|||||||
char title[MAX_TITLE+1];
|
char title[MAX_TITLE+1];
|
||||||
char launchpath[MAX_PATH+1];
|
char launchpath[MAX_PATH+1];
|
||||||
char notes[MAX_NOTES+1];
|
char notes[MAX_NOTES+1];
|
||||||
|
char registry[MAX_REGISTRY+1];
|
||||||
}PRIVATEMAP;
|
}PRIVATEMAP;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -433,6 +433,10 @@
|
|||||||
RelativePath=".\TabProgram.cpp"
|
RelativePath=".\TabProgram.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\TabRegistry.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\TabSysLibs.cpp"
|
RelativePath=".\TabSysLibs.cpp"
|
||||||
>
|
>
|
||||||
@ -554,6 +558,10 @@
|
|||||||
RelativePath=".\TabProgram.h"
|
RelativePath=".\TabProgram.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\TabRegistry.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\TabSysLibs.h"
|
RelativePath=".\TabSysLibs.h"
|
||||||
>
|
>
|
||||||
|
@ -45,7 +45,7 @@ char *strnncpy(char *dest, char *src, size_t count)
|
|||||||
|
|
||||||
static char *Escape(char *s)
|
static char *Escape(char *s)
|
||||||
{
|
{
|
||||||
static char tmp[1024];
|
static char tmp[2048];
|
||||||
char *t = tmp;
|
char *t = tmp;
|
||||||
for(; *s; s++){
|
for(; *s; s++){
|
||||||
if(*s=='\n'){
|
if(*s=='\n'){
|
||||||
@ -66,7 +66,7 @@ static char *Escape(char *s)
|
|||||||
|
|
||||||
static char *Unescape(char *s)
|
static char *Unescape(char *s)
|
||||||
{
|
{
|
||||||
static char tmp[1024];
|
static char tmp[2048];
|
||||||
char *t = tmp;
|
char *t = tmp;
|
||||||
for(; *s; s++){
|
for(; *s; s++){
|
||||||
if((*s=='\\') && (*(s+1)=='n')){
|
if((*s=='\\') && (*(s+1)=='n')){
|
||||||
@ -180,6 +180,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
|||||||
if(dlg->m_EmulateRegistry) t->flags3 |= EMULATEREGISTRY;
|
if(dlg->m_EmulateRegistry) t->flags3 |= EMULATEREGISTRY;
|
||||||
if(dlg->m_OverrideRegistry) t->flags4 |= OVERRIDEREGISTRY;
|
if(dlg->m_OverrideRegistry) t->flags4 |= OVERRIDEREGISTRY;
|
||||||
if(dlg->m_Wow64Registry) t->flags6 |= WOW64REGISTRY;
|
if(dlg->m_Wow64Registry) t->flags6 |= WOW64REGISTRY;
|
||||||
|
if(dlg->m_Wow32Registry) t->flags6 |= WOW32REGISTRY;
|
||||||
if(dlg->m_HookEnabled) t->flags3 |= HOOKENABLED;
|
if(dlg->m_HookEnabled) t->flags3 |= HOOKENABLED;
|
||||||
if(dlg->m_NoBanner) t->flags2 |= NOBANNER;
|
if(dlg->m_NoBanner) t->flags2 |= NOBANNER;
|
||||||
if(dlg->m_StartDebug) t->flags2 |= STARTDEBUG;
|
if(dlg->m_StartDebug) t->flags2 |= STARTDEBUG;
|
||||||
@ -425,6 +426,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
|||||||
dlg->m_EmulateRegistry = t->flags3 & EMULATEREGISTRY ? 1 : 0;
|
dlg->m_EmulateRegistry = t->flags3 & EMULATEREGISTRY ? 1 : 0;
|
||||||
dlg->m_OverrideRegistry = t->flags4 & OVERRIDEREGISTRY ? 1 : 0;
|
dlg->m_OverrideRegistry = t->flags4 & OVERRIDEREGISTRY ? 1 : 0;
|
||||||
dlg->m_Wow64Registry = t->flags6 & WOW64REGISTRY ? 1 : 0;
|
dlg->m_Wow64Registry = t->flags6 & WOW64REGISTRY ? 1 : 0;
|
||||||
|
dlg->m_Wow32Registry = t->flags6 & WOW32REGISTRY ? 1 : 0;
|
||||||
dlg->m_HookEnabled = t->flags3 & HOOKENABLED ? 1 : 0;
|
dlg->m_HookEnabled = t->flags3 & HOOKENABLED ? 1 : 0;
|
||||||
dlg->m_NoBanner = t->flags2 & NOBANNER ? 1 : 0;
|
dlg->m_NoBanner = t->flags2 & NOBANNER ? 1 : 0;
|
||||||
dlg->m_StartDebug = t->flags2 & STARTDEBUG ? 1 : 0;
|
dlg->m_StartDebug = t->flags2 & STARTDEBUG ? 1 : 0;
|
||||||
@ -652,6 +654,8 @@ static void SaveConfigItem(TARGETMAP *TargetMap, PRIVATEMAP *PrivateMap, int i,
|
|||||||
WritePrivateProfileString("target", key, TargetMap->OpenGLLib, InitPath);
|
WritePrivateProfileString("target", key, TargetMap->OpenGLLib, InitPath);
|
||||||
sprintf_s(key, sizeof(key), "notes%i", i);
|
sprintf_s(key, sizeof(key), "notes%i", i);
|
||||||
WritePrivateProfileString("target", key, Escape(PrivateMap->notes), InitPath);
|
WritePrivateProfileString("target", key, Escape(PrivateMap->notes), InitPath);
|
||||||
|
sprintf_s(key, sizeof(key), "registry%i", i);
|
||||||
|
WritePrivateProfileString("target", key, Escape(PrivateMap->registry), InitPath);
|
||||||
sprintf_s(key, sizeof(key), "ver%i", i);
|
sprintf_s(key, sizeof(key), "ver%i", i);
|
||||||
sprintf_s(val, sizeof(val), "%i", TargetMap->dxversion);
|
sprintf_s(val, sizeof(val), "%i", TargetMap->dxversion);
|
||||||
WritePrivateProfileString("target", key, val, InitPath);
|
WritePrivateProfileString("target", key, val, InitPath);
|
||||||
@ -785,6 +789,8 @@ static void ClearTarget(int i, char *InitPath)
|
|||||||
WritePrivateProfileString("target", key, 0, InitPath);
|
WritePrivateProfileString("target", key, 0, InitPath);
|
||||||
sprintf_s(key, sizeof(key), "notes%i", i);
|
sprintf_s(key, sizeof(key), "notes%i", i);
|
||||||
WritePrivateProfileString("target", key, 0, InitPath);
|
WritePrivateProfileString("target", key, 0, InitPath);
|
||||||
|
sprintf_s(key, sizeof(key), "registry%i", i);
|
||||||
|
WritePrivateProfileString("target", key, 0, InitPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int LoadConfigItem(TARGETMAP *TargetMap, PRIVATEMAP *PrivateMap, int i, char *InitPath)
|
static int LoadConfigItem(TARGETMAP *TargetMap, PRIVATEMAP *PrivateMap, int i, char *InitPath)
|
||||||
@ -805,6 +811,9 @@ static int LoadConfigItem(TARGETMAP *TargetMap, PRIVATEMAP *PrivateMap, int i, c
|
|||||||
sprintf_s(key, sizeof(key), "notes%i", i);
|
sprintf_s(key, sizeof(key), "notes%i", i);
|
||||||
GetPrivateProfileString("target", key, "", PrivateMap->notes, MAX_NOTES, InitPath);
|
GetPrivateProfileString("target", key, "", PrivateMap->notes, MAX_NOTES, InitPath);
|
||||||
strcpy(PrivateMap->notes, Unescape(PrivateMap->notes));
|
strcpy(PrivateMap->notes, Unescape(PrivateMap->notes));
|
||||||
|
sprintf_s(key, sizeof(key), "registry%i", i);
|
||||||
|
GetPrivateProfileString("target", key, "", PrivateMap->registry, MAX_NOTES, InitPath);
|
||||||
|
strcpy(PrivateMap->registry, Unescape(PrivateMap->registry));
|
||||||
sprintf_s(key, sizeof(key), "ver%i", i);
|
sprintf_s(key, sizeof(key), "ver%i", i);
|
||||||
TargetMap->dxversion = GetPrivateProfileInt("target", key, 0, InitPath);
|
TargetMap->dxversion = GetPrivateProfileInt("target", key, 0, InitPath);
|
||||||
sprintf_s(key, sizeof(key), "coord%i", i);
|
sprintf_s(key, sizeof(key), "coord%i", i);
|
||||||
@ -887,7 +896,7 @@ void CDxwndhostView::SaveConfigFile()
|
|||||||
|
|
||||||
for(i = 0; i < MAXTARGETS; i ++){
|
for(i = 0; i < MAXTARGETS; i ++){
|
||||||
if(!TargetMaps[i].path[0]) break;
|
if(!TargetMaps[i].path[0]) break;
|
||||||
SaveConfigItem(&TargetMaps[i], &TitleMaps[i], i, InitPath);
|
SaveConfigItem(&TargetMaps[i], &PrivateMaps[i], i, InitPath);
|
||||||
}
|
}
|
||||||
for(; i < MAXTARGETS; i ++) ClearTarget(i, InitPath);
|
for(; i < MAXTARGETS; i ++) ClearTarget(i, InitPath);
|
||||||
this->isUpdated=FALSE;
|
this->isUpdated=FALSE;
|
||||||
@ -977,17 +986,17 @@ void CDxwndhostView::OnInitialUpdate()
|
|||||||
listctrl.InsertColumn(0, &listcol);
|
listctrl.InsertColumn(0, &listcol);
|
||||||
|
|
||||||
for(i = 0; i < MAXTARGETS; i ++){
|
for(i = 0; i < MAXTARGETS; i ++){
|
||||||
if (!LoadConfigItem(&TargetMaps[i], &TitleMaps[i], i, InitPath)) break;
|
if (!LoadConfigItem(&TargetMaps[i], &PrivateMaps[i], i, InitPath)) break;
|
||||||
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
listctrl.InsertItem(&listitem);
|
listctrl.InsertItem(&listitem);
|
||||||
}
|
}
|
||||||
for(; i < MAXTARGETS; i ++) {
|
for(; i < MAXTARGETS; i ++) {
|
||||||
TargetMaps[i].path[0] = 0;
|
TargetMaps[i].path[0] = 0;
|
||||||
TitleMaps[i].title[0] = 0;
|
PrivateMaps[i].title[0] = 0;
|
||||||
}
|
}
|
||||||
Resize();
|
Resize();
|
||||||
SetTarget(TargetMaps);
|
SetTarget(TargetMaps);
|
||||||
@ -997,7 +1006,7 @@ void CDxwndhostView::OnInitialUpdate()
|
|||||||
this->OnHookStop();
|
this->OnHookStop();
|
||||||
if(m_StartToTray) this->OnGoToTrayIcon();
|
if(m_StartToTray) this->OnGoToTrayIcon();
|
||||||
this->isUpdated=FALSE;
|
this->isUpdated=FALSE;
|
||||||
pTitles = &TitleMaps[0];
|
pTitles = &PrivateMaps[0];
|
||||||
pTargets= &TargetMaps[0];
|
pTargets= &TargetMaps[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,7 +1052,7 @@ void CDxwndhostView::OnExport()
|
|||||||
i = listctrl.GetNextSelectedItem(pos);
|
i = listctrl.GetNextSelectedItem(pos);
|
||||||
GetPrivateProfileString("window", "exportpath", NULL, path, MAX_PATH, InitPath);
|
GetPrivateProfileString("window", "exportpath", NULL, path, MAX_PATH, InitPath);
|
||||||
//strcat_s(path, MAX_PATH, "\\");
|
//strcat_s(path, MAX_PATH, "\\");
|
||||||
strcat_s(path, MAX_PATH, TitleMaps[i].title);
|
strcat_s(path, MAX_PATH, PrivateMaps[i].title);
|
||||||
CFileDialog dlg( FALSE, "*.dxw", path, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
CFileDialog dlg( FALSE, "*.dxw", path, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||||
"dxwnd task config (*.dxw)|*.dxw|All Files (*.*)|*.*||", this);
|
"dxwnd task config (*.dxw)|*.dxw|All Files (*.*)|*.*||", this);
|
||||||
if( dlg.DoModal() == IDOK) {
|
if( dlg.DoModal() == IDOK) {
|
||||||
@ -1055,7 +1064,7 @@ void CDxwndhostView::OnExport()
|
|||||||
TargetMap = &TargetMaps[i];
|
TargetMap = &TargetMaps[i];
|
||||||
TFlags = TargetMap->tflags;
|
TFlags = TargetMap->tflags;
|
||||||
TargetMap->tflags = 0;
|
TargetMap->tflags = 0;
|
||||||
SaveConfigItem(&TargetMaps[i], &TitleMaps[i], 0, path);
|
SaveConfigItem(&TargetMaps[i], &PrivateMaps[i], 0, path);
|
||||||
TargetMap->tflags = TFlags;
|
TargetMap->tflags = TFlags;
|
||||||
if(GetPrivateProfileInt("window", "updatepaths", 1, InitPath)) {
|
if(GetPrivateProfileInt("window", "updatepaths", 1, InitPath)) {
|
||||||
GetFolderFromPath(path);
|
GetFolderFromPath(path);
|
||||||
@ -1095,12 +1104,12 @@ void CDxwndhostView::OnImport()
|
|||||||
if(ImportExportPath[ofn.nFileOffset - 1] != '\0'){
|
if(ImportExportPath[ofn.nFileOffset - 1] != '\0'){
|
||||||
// Single-Select
|
// Single-Select
|
||||||
// "buffer" - name of file
|
// "buffer" - name of file
|
||||||
if(LoadConfigItem(&TargetMaps[i], &TitleMaps[i], 0, ImportExportPath)){
|
if(LoadConfigItem(&TargetMaps[i], &PrivateMaps[i], 0, ImportExportPath)){
|
||||||
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listctrl.InsertItem(&listitem);
|
listctrl.InsertItem(&listitem);
|
||||||
if(GetPrivateProfileInt("window", "updatepaths", 1, InitPath)) {
|
if(GetPrivateProfileInt("window", "updatepaths", 1, InitPath)) {
|
||||||
GetFolderFromPath(ImportExportPath);
|
GetFolderFromPath(ImportExportPath);
|
||||||
@ -1122,12 +1131,12 @@ void CDxwndhostView::OnImport()
|
|||||||
if(i==MAXTARGETS) break;
|
if(i==MAXTARGETS) break;
|
||||||
strcpy(pathname, folder);
|
strcpy(pathname, folder);
|
||||||
strcat(pathname, p);
|
strcat(pathname, p);
|
||||||
if (LoadConfigItem(&TargetMaps[i], &TitleMaps[i], 0, pathname)){
|
if (LoadConfigItem(&TargetMaps[i], &PrivateMaps[i], 0, pathname)){
|
||||||
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listctrl.InsertItem(&listitem);
|
listctrl.InsertItem(&listitem);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -1151,21 +1160,23 @@ void CDxwndhostView::OnModify()
|
|||||||
if(!listctrl.GetSelectedCount()) return;
|
if(!listctrl.GetSelectedCount()) return;
|
||||||
pos = listctrl.GetFirstSelectedItemPosition();
|
pos = listctrl.GetFirstSelectedItemPosition();
|
||||||
i = listctrl.GetNextSelectedItem(pos);
|
i = listctrl.GetNextSelectedItem(pos);
|
||||||
dlg.m_Title = TitleMaps[i].title;
|
dlg.m_Title = PrivateMaps[i].title;
|
||||||
dlg.m_Notes = TitleMaps[i].notes;
|
dlg.m_Notes = PrivateMaps[i].notes;
|
||||||
dlg.m_LaunchPath = TitleMaps[i].launchpath;
|
dlg.m_Registry = PrivateMaps[i].registry;
|
||||||
|
dlg.m_LaunchPath = PrivateMaps[i].launchpath;
|
||||||
SetDlgFromTarget(&TargetMaps[i], &dlg);
|
SetDlgFromTarget(&TargetMaps[i], &dlg);
|
||||||
if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){
|
if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){
|
||||||
strnncpy(TitleMaps[i].title, (char *)dlg.m_Title.GetString(), MAX_TITLE);
|
strnncpy(PrivateMaps[i].title, (char *)dlg.m_Title.GetString(), MAX_TITLE);
|
||||||
strnncpy(TitleMaps[i].notes, (char *)dlg.m_Notes.GetString(), MAX_NOTES);
|
strnncpy(PrivateMaps[i].notes, (char *)dlg.m_Notes.GetString(), MAX_NOTES);
|
||||||
strnncpy(TitleMaps[i].launchpath, (char *)dlg.m_LaunchPath.GetString(), MAX_PATH);
|
strnncpy(PrivateMaps[i].registry, (char *)dlg.m_Registry.GetString(), MAX_REGISTRY);
|
||||||
|
strnncpy(PrivateMaps[i].launchpath, (char *)dlg.m_LaunchPath.GetString(), MAX_PATH);
|
||||||
SetTargetFromDlg(&TargetMaps[i], &dlg);
|
SetTargetFromDlg(&TargetMaps[i], &dlg);
|
||||||
CListCtrl& listctrl = GetListCtrl();
|
CListCtrl& listctrl = GetListCtrl();
|
||||||
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listctrl.SetItem(&listitem);
|
listctrl.SetItem(&listitem);
|
||||||
Resize();
|
Resize();
|
||||||
SetTarget(TargetMaps);
|
SetTarget(TargetMaps);
|
||||||
@ -1269,6 +1280,31 @@ void CDxwndhostView::OnDebugView()
|
|||||||
CloseHandle(pinfo.hThread);
|
CloseHandle(pinfo.hThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDxwndhostView::OnSetRegistry()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
CTargetDlg dlg;
|
||||||
|
POSITION pos;
|
||||||
|
CString Registry;
|
||||||
|
FILE *regfp;
|
||||||
|
|
||||||
|
CListCtrl& listctrl = GetListCtrl();
|
||||||
|
|
||||||
|
if(!listctrl.GetSelectedCount()) return;
|
||||||
|
pos = listctrl.GetFirstSelectedItemPosition();
|
||||||
|
i = listctrl.GetNextSelectedItem(pos);
|
||||||
|
Registry = PrivateMaps[i].registry;
|
||||||
|
|
||||||
|
regfp=fopen("dxwnd.reg", "w");
|
||||||
|
if(regfp==NULL){
|
||||||
|
MessageBox("Error writing virtual registry file", "Error", MB_ICONERROR|MB_OK);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fwrite(Registry.GetString(), Registry.GetLength(), 1, regfp);
|
||||||
|
fclose(regfp);
|
||||||
|
}
|
||||||
|
|
||||||
#define strcasecmp lstrcmpi
|
#define strcasecmp lstrcmpi
|
||||||
|
|
||||||
void CDxwndhostView::OnSort()
|
void CDxwndhostView::OnSort()
|
||||||
@ -1294,14 +1330,14 @@ void CDxwndhostView::OnSort()
|
|||||||
while(swapped){
|
while(swapped){
|
||||||
swapped=0;
|
swapped=0;
|
||||||
for(i=0; i<itemcount-1; i++){
|
for(i=0; i<itemcount-1; i++){
|
||||||
if(strcasecmp(TitleMaps[i].title, TitleMaps[i+1].title)>0){
|
if(strcasecmp(PrivateMaps[i].title, PrivateMaps[i+1].title)>0){
|
||||||
// swap entries
|
// swap entries
|
||||||
MapEntry=TargetMaps[i];
|
MapEntry=TargetMaps[i];
|
||||||
TargetMaps[i]=TargetMaps[i+1];
|
TargetMaps[i]=TargetMaps[i+1];
|
||||||
TargetMaps[i+1]=MapEntry;
|
TargetMaps[i+1]=MapEntry;
|
||||||
TitEntry=TitleMaps[i];
|
TitEntry=PrivateMaps[i];
|
||||||
TitleMaps[i]=TitleMaps[i+1];
|
PrivateMaps[i]=PrivateMaps[i+1];
|
||||||
TitleMaps[i+1]=TitEntry;
|
PrivateMaps[i+1]=TitEntry;
|
||||||
swapped=1;
|
swapped=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1314,7 +1350,7 @@ void CDxwndhostView::OnSort()
|
|||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listctrl.SetItem(&listitem);
|
listctrl.SetItem(&listitem);
|
||||||
listctrl.InsertItem(&listitem);
|
listctrl.InsertItem(&listitem);
|
||||||
}
|
}
|
||||||
@ -1376,7 +1412,7 @@ void CDxwndhostView::OnPause()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wchar_t *wcstring = new wchar_t[48+1];
|
wchar_t *wcstring = new wchar_t[48+1];
|
||||||
mbstowcs_s(NULL, wcstring, 48, TitleMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
mbstowcs_s(NULL, wcstring, 48, PrivateMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
||||||
res=MessageBoxLangArg(DXW_STRING_PAUSETASK, DXW_STRING_INFO, MB_YESNO | MB_ICONQUESTION, wcstring);
|
res=MessageBoxLangArg(DXW_STRING_PAUSETASK, DXW_STRING_INFO, MB_YESNO | MB_ICONQUESTION, wcstring);
|
||||||
if(res!=IDYES) return;
|
if(res!=IDYES) return;
|
||||||
PauseResumeThreadList(DxWndStatus.dwPid, FALSE);
|
PauseResumeThreadList(DxWndStatus.dwPid, FALSE);
|
||||||
@ -1393,7 +1429,7 @@ void CDxwndhostView::OnResume()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wchar_t *wcstring = new wchar_t[48+1];
|
wchar_t *wcstring = new wchar_t[48+1];
|
||||||
mbstowcs_s(NULL, wcstring, 48, TitleMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
mbstowcs_s(NULL, wcstring, 48, PrivateMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
||||||
res=MessageBoxLangArg(DXW_STRING_RESUMETASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
res=MessageBoxLangArg(DXW_STRING_RESUMETASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
||||||
if(res!=IDYES) return;
|
if(res!=IDYES) return;
|
||||||
PauseResumeThreadList(DxWndStatus.dwPid, TRUE);
|
PauseResumeThreadList(DxWndStatus.dwPid, TRUE);
|
||||||
@ -1447,7 +1483,7 @@ void CDxwndhostView::OnKill()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wchar_t *wcstring = new wchar_t[48+1];
|
wchar_t *wcstring = new wchar_t[48+1];
|
||||||
mbstowcs_s(NULL, wcstring, 48, TitleMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
mbstowcs_s(NULL, wcstring, 48, PrivateMaps[DxWndStatus.TaskIdx].title, _TRUNCATE);
|
||||||
res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
||||||
if(res!=IDYES) return;
|
if(res!=IDYES) return;
|
||||||
DxWndStatus.dwPid;
|
DxWndStatus.dwPid;
|
||||||
@ -1487,7 +1523,7 @@ void CDxwndhostView::OnProcessKill()
|
|||||||
|
|
||||||
if(!KillProcByName(lpProcName, FALSE)){
|
if(!KillProcByName(lpProcName, FALSE)){
|
||||||
wchar_t *wcstring = new wchar_t[48+1];
|
wchar_t *wcstring = new wchar_t[48+1];
|
||||||
mbstowcs_s(NULL, wcstring, 48, TitleMaps[i].title, _TRUNCATE);
|
mbstowcs_s(NULL, wcstring, 48, PrivateMaps[i].title, _TRUNCATE);
|
||||||
res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring);
|
||||||
if(res!=IDYES) return;
|
if(res!=IDYES) return;
|
||||||
KillProcByName(lpProcName, TRUE);
|
KillProcByName(lpProcName, TRUE);
|
||||||
@ -1514,24 +1550,25 @@ void CDxwndhostView::OnAdd()
|
|||||||
}
|
}
|
||||||
memset(&TargetMaps[i],0,sizeof(TARGETMAP)); // clean up, just in case....
|
memset(&TargetMaps[i],0,sizeof(TARGETMAP)); // clean up, just in case....
|
||||||
if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){
|
if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){
|
||||||
strnncpy(TitleMaps[i].title, (char *)dlg.m_Title.GetString(), MAX_TITLE);
|
strnncpy(PrivateMaps[i].title, (char *)dlg.m_Title.GetString(), MAX_TITLE);
|
||||||
strnncpy(TitleMaps[i].notes, (char *)dlg.m_Notes.GetString(), MAX_NOTES);
|
strnncpy(PrivateMaps[i].notes, (char *)dlg.m_Notes.GetString(), MAX_NOTES);
|
||||||
strnncpy(TitleMaps[i].launchpath, (char *)dlg.m_LaunchPath.GetString(), MAX_PATH);
|
strnncpy(PrivateMaps[i].registry, (char *)dlg.m_Registry.GetString(), MAX_REGISTRY);
|
||||||
|
strnncpy(PrivateMaps[i].launchpath, (char *)dlg.m_LaunchPath.GetString(), MAX_PATH);
|
||||||
SetTargetFromDlg(&TargetMaps[i], &dlg);
|
SetTargetFromDlg(&TargetMaps[i], &dlg);
|
||||||
CListCtrl& listctrl = GetListCtrl();
|
CListCtrl& listctrl = GetListCtrl();
|
||||||
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
listitem.mask = LVIF_TEXT | LVIF_IMAGE;
|
||||||
listitem.iItem = i;
|
listitem.iItem = i;
|
||||||
listitem.iSubItem = 0;
|
listitem.iSubItem = 0;
|
||||||
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
listitem.iImage = SetTargetIcon(TargetMaps[i]);
|
||||||
if (strlen(TitleMaps[i].title)==0){
|
if (strlen(PrivateMaps[i].title)==0){
|
||||||
int len;
|
int len;
|
||||||
CString FilePath;
|
CString FilePath;
|
||||||
FilePath=TargetMaps[i].path;
|
FilePath=TargetMaps[i].path;
|
||||||
len=FilePath.ReverseFind('\\');
|
len=FilePath.ReverseFind('\\');
|
||||||
FilePath=FilePath.Right(FilePath.GetLength()-len-1);
|
FilePath=FilePath.Right(FilePath.GetLength()-len-1);
|
||||||
strncpy_s(TitleMaps[i].title, sizeof(TitleMaps[i].title), FilePath.GetString(), sizeof(TitleMaps[i].title)-1);
|
strncpy_s(PrivateMaps[i].title, sizeof(PrivateMaps[i].title), FilePath.GetString(), sizeof(PrivateMaps[i].title)-1);
|
||||||
}
|
}
|
||||||
listitem.pszText = TitleMaps[i].title;
|
listitem.pszText = PrivateMaps[i].title;
|
||||||
listctrl.InsertItem(&listitem);
|
listctrl.InsertItem(&listitem);
|
||||||
Resize();
|
Resize();
|
||||||
SetTarget(TargetMaps);
|
SetTarget(TargetMaps);
|
||||||
@ -1551,7 +1588,7 @@ void CDxwndhostView::OnDelete()
|
|||||||
pos = listctrl.GetFirstSelectedItemPosition();
|
pos = listctrl.GetFirstSelectedItemPosition();
|
||||||
i = listctrl.GetNextSelectedItem(pos);
|
i = listctrl.GetNextSelectedItem(pos);
|
||||||
|
|
||||||
FilePath=TitleMaps[i].title;
|
FilePath=PrivateMaps[i].title;
|
||||||
if (FilePath.GetLength()==0){
|
if (FilePath.GetLength()==0){
|
||||||
FilePath = TargetMaps[i].path;
|
FilePath = TargetMaps[i].path;
|
||||||
len=FilePath.ReverseFind('\\');
|
len=FilePath.ReverseFind('\\');
|
||||||
@ -1565,7 +1602,7 @@ void CDxwndhostView::OnDelete()
|
|||||||
if(res!=IDYES) return;
|
if(res!=IDYES) return;
|
||||||
listctrl.DeleteItem(i);
|
listctrl.DeleteItem(i);
|
||||||
for(; i < MAXTARGETS - 1; i ++) {
|
for(; i < MAXTARGETS - 1; i ++) {
|
||||||
TitleMaps[i] = TitleMaps[i + 1]; // V2.1.74 fix
|
PrivateMaps[i] = PrivateMaps[i + 1]; // V2.1.74 fix
|
||||||
TargetMaps[i] = TargetMaps[i + 1];
|
TargetMaps[i] = TargetMaps[i + 1];
|
||||||
}
|
}
|
||||||
Resize();
|
Resize();
|
||||||
@ -1771,7 +1808,7 @@ void CDxwndhostView::Resize()
|
|||||||
|
|
||||||
for(i = 0; i < MAXTARGETS; i ++){
|
for(i = 0; i < MAXTARGETS; i ++){
|
||||||
if(strlen(TargetMaps[i].path) == 0) break;
|
if(strlen(TargetMaps[i].path) == 0) break;
|
||||||
tmp = listctrl.GetStringWidth(TitleMaps[i].title);
|
tmp = listctrl.GetStringWidth(PrivateMaps[i].title);
|
||||||
if(size < tmp) size = tmp;
|
if(size < tmp) size = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1813,6 +1850,9 @@ void CDxwndhostView::OnRButtonDown(UINT nFlags, CPoint point)
|
|||||||
case ID_PLOG_DEBUGVIEW:
|
case ID_PLOG_DEBUGVIEW:
|
||||||
OnDebugView();
|
OnDebugView();
|
||||||
break;
|
break;
|
||||||
|
case ID_SETREGISTRY:
|
||||||
|
OnSetRegistry();
|
||||||
|
break;
|
||||||
case ID_TASK_KILL:
|
case ID_TASK_KILL:
|
||||||
OnKill();
|
OnKill();
|
||||||
break;
|
break;
|
||||||
@ -2037,12 +2077,12 @@ void CDxwndhostView::OnRun()
|
|||||||
PathRemoveFileSpec(path);
|
PathRemoveFileSpec(path);
|
||||||
if(TargetMaps[i].flags2 & STARTDEBUG){
|
if(TargetMaps[i].flags2 & STARTDEBUG){
|
||||||
ThreadInfo.TM=&TargetMaps[i];
|
ThreadInfo.TM=&TargetMaps[i];
|
||||||
ThreadInfo.PM=&TitleMaps[i];
|
ThreadInfo.PM=&PrivateMaps[i];
|
||||||
CloseHandle(CreateThread( NULL, 0, StartDebug, &ThreadInfo, 0, NULL));
|
CloseHandle(CreateThread( NULL, 0, StartDebug, &ThreadInfo, 0, NULL));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
CreateProcess(NULL,
|
CreateProcess(NULL,
|
||||||
(strlen(TitleMaps[i].launchpath)>0) ? TitleMaps[i].launchpath: TargetMaps[i].path,
|
(strlen(PrivateMaps[i].launchpath)>0) ? PrivateMaps[i].launchpath: TargetMaps[i].path,
|
||||||
0, 0, false, CREATE_DEFAULT_ERROR_MODE, NULL, path, &sinfo, &pinfo);
|
0, 0, false, CREATE_DEFAULT_ERROR_MODE, NULL, path, &sinfo, &pinfo);
|
||||||
CloseHandle(pinfo.hProcess); // no longer needed, avoid handle leakage
|
CloseHandle(pinfo.hProcess); // no longer needed, avoid handle leakage
|
||||||
CloseHandle(pinfo.hThread); // no longer needed, avoid handle leakage
|
CloseHandle(pinfo.hThread); // no longer needed, avoid handle leakage
|
||||||
|
@ -21,7 +21,7 @@ private:
|
|||||||
void Resize(void);
|
void Resize(void);
|
||||||
void SaveConfigFile();
|
void SaveConfigFile();
|
||||||
TARGETMAP TargetMaps[MAXTARGETS];
|
TARGETMAP TargetMaps[MAXTARGETS];
|
||||||
PRIVATEMAP TitleMaps[MAXTARGETS];
|
PRIVATEMAP PrivateMaps[MAXTARGETS];
|
||||||
char InitPath[MAX_PATH];
|
char InitPath[MAX_PATH];
|
||||||
BOOL isUpdated;
|
BOOL isUpdated;
|
||||||
DEVMODE InitDevMode;
|
DEVMODE InitDevMode;
|
||||||
@ -79,6 +79,7 @@ protected:
|
|||||||
afx_msg void OnViewLog();
|
afx_msg void OnViewLog();
|
||||||
afx_msg void OnDeleteLog();
|
afx_msg void OnDeleteLog();
|
||||||
afx_msg void OnDebugView();
|
afx_msg void OnDebugView();
|
||||||
|
afx_msg void OnSetRegistry();
|
||||||
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
||||||
afx_msg void OnRun();
|
afx_msg void OnRun();
|
||||||
afx_msg void OnClearAllLogs();
|
afx_msg void OnClearAllLogs();
|
||||||
|
BIN
host/resource
BIN
host/resource
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user