v2_02_82_src
Former-commit-id: c433f1988a2d77b6e1a0a24019a714f1d24fcc81
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b29905bf73aea4baf7a3ca50fc224d6e6f33478efcd19c06230439d48499ed54
|
||||
oid sha256:763a6c83e88092d518e00b641db5f1ec1e1f03273966fa62c3023f5fab35d63c
|
||||
size 125952
|
||||
|
3
build/Resources_EN.dll
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9768c3856e6e7eb99d2a1aa84738dbf54f4742d22f9e3ab85b7e2c1bfcf1a349
|
||||
size 125952
|
3
build/Resources_IT.dll
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b94cb7ee037071908b8b6e8f585c2e20a598de3d21d47c6ed2772603c7509571
|
||||
size 131584
|
@ -1,2 +0,0 @@
|
||||
echo off
|
||||
start "" "dxwnd.exe" "/lang=cn"
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:512069ae0535b5c459f092824da7d559e7950574c161c31657fdcbc739a29f93
|
||||
size 489472
|
||||
oid sha256:053fb6f12d42bc12bc80eac6aae9f57621783b3b69bed282eab3bc43ecde0a01
|
||||
size 491520
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c06874fa4dbb6cee68cbee26cbb5510526ed30c895494280e8d365a0fdb7ce56
|
||||
size 547328
|
||||
oid sha256:8eea2972772c9c037a22822bcc7caa6a42b94e34c0d1e0e94da53eff32f8879f
|
||||
size 548864
|
||||
|
@ -1,37 +1,6 @@
|
||||
[keymapping]
|
||||
timetoggle=0x72
|
||||
altf4=0x73
|
||||
timeslow=0x74
|
||||
timefast=0x75
|
||||
[window]
|
||||
posx=709
|
||||
posy=406
|
||||
posx=402
|
||||
posy=414
|
||||
sizx=320
|
||||
sizy=200
|
||||
[target]
|
||||
title0=Conflict Zone
|
||||
path0=D:\Games\Conflict Zone\Conflict zone.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134217760
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4194308
|
||||
tflag0=64
|
||||
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
|
||||
lang=automatic
|
||||
|
27
build/exports/Age of Wonders.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Age of Wonders
|
||||
path0=D:\Games\Age of Wonders\AoW.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=679477792
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=201326596
|
||||
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
|
27
build/exports/Battle Realms.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Battle Realms
|
||||
path0=D:\Games\Battle Realms\Battle_Realms_F.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=150994976
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
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
|
27
build/exports/Devil Inside, the.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Devil Inside, the
|
||||
path0=D:\Games\Devil Inside\Devil.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=671088672
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=800
|
||||
maxy0=600
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
27
build/exports/O.D.T. Escape Or Die Trying.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=O.D.T. Escape Or Die Trying
|
||||
path0=D:\Games\ODT\ODT.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=1207959648
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=205520900
|
||||
tflag0=6147
|
||||
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
|
27
build/exports/Of Light and Darkness.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Of Light and Darkness
|
||||
path0=D:\Games\Of Light and Darkness\3di.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134234660
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
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
|
27
build/exports/Ominous Horizons.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Ominous Horizons
|
||||
path0=D:\Games\Ominous_Horizons\bin\ominous.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=9
|
||||
coord0=0
|
||||
flag0=134218272
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
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
|
27
build/exports/Outlaws.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Outlaws
|
||||
path0=D:\Games\Outlaws\OUTLAWS.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=671105568
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
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
|
27
build/exports/Panzer Commander.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Panzer Commander
|
||||
path0=D:\Games\Panzer_Commander\Panzer.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134217826
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=136314884
|
||||
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
|
27
build/exports/Theme Hospital.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Theme Hospital
|
||||
path0=D:\Games\Theme Hospital\HOSPITAL_win.EXE
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134283780
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
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
|
27
build/exports/Tomb Raider - Underworld.dxw
Normal file
@ -0,0 +1,27 @@
|
||||
[target]
|
||||
title0=Tomb Raider - Underworld
|
||||
path0=D:\Games\Tomb Raider - Underworld\tru.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=142623264
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=205520900
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=800
|
||||
maxy0=600
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
@ -531,4 +531,11 @@ Preliminary multilanguage release, english and chinese, many thanks to gsky916 s
|
||||
fixed Sleep bug for small delays and accelerated timeshift: fixes "Wind Fantasy SP" reported bug
|
||||
added log for DirectInput::SetCooperativeLevel flags
|
||||
fixed flip emulation mode when backbuffer is lost: fixes cursor problems in "HellCopter"
|
||||
fixed Pitch setting in DirectDraw::EnumDisplayModes when in SVGA emulation mode. Let "Outlive" use this setting
|
||||
fixed Pitch setting in DirectDraw::EnumDisplayModes when in SVGA emulation mode. Let "Outlive" use this setting
|
||||
|
||||
v2.02.81
|
||||
fix: hooked GetMonitorInfoA/W that is a possible way to get the screen resolution. The hooker sets the virtual screen size updating both rcWork & rcMonitor rects in the MONITORINFO structure. This fixes the mouse control in "Tomb Raider Underworld" and likely in other games with a similar engine.
|
||||
|
||||
v2.02.82
|
||||
fix: completed chinese translation and language selection through dxwnd.ini file.
|
||||
added very preliminary (and incomplete) italian translation for debugging.
|
BIN
dll/Debug/BuildLog.htm
Normal file
BIN
dll/Debug/advapi.obj
Normal file
BIN
dll/Debug/ddproxy.obj
Normal file
BIN
dll/Debug/ddraw.obj
Normal file
BIN
dll/Debug/dinput.obj
Normal file
BIN
dll/Debug/dwhide.obj
Normal file
BIN
dll/Debug/dxdiaghook.obj
Normal file
BIN
dll/Debug/dxemublt.obj
Normal file
BIN
dll/Debug/dxhelper.obj
Normal file
BIN
dll/Debug/dxhook.obj
Normal file
BIN
dll/Debug/dxwcore.obj
Normal file
10
dll/Debug/dxwnd.dll.embed.manifest
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
BIN
dll/Debug/dxwnd.dll.embed.manifest.res
Normal file
BIN
dll/Debug/dxwnd.exp
Normal file
BIN
dll/Debug/dxwnd.lib
Normal file
BIN
dll/Debug/dxwnd.obj
Normal file
BIN
dll/Debug/dxwnd.pdb
Normal file
BIN
dll/Debug/dxwnd.res
Normal file
BIN
dll/Debug/gdi32.obj
Normal file
BIN
dll/Debug/glide.obj
Normal file
BIN
dll/Debug/hd3d.obj
Normal file
BIN
dll/Debug/hd3d7.obj
Normal file
BIN
dll/Debug/hotpatch.obj
Normal file
BIN
dll/Debug/iatpatch.obj
Normal file
BIN
dll/Debug/imelib.obj
Normal file
BIN
dll/Debug/kernel32.obj
Normal file
BIN
dll/Debug/msvfw.obj
Normal file
1
dll/Debug/mt.dep
Normal file
@ -0,0 +1 @@
|
||||
Manifest resource last updated at 0:24:39.39 on 30/06/2014
|
BIN
dll/Debug/ole32.obj
Normal file
BIN
dll/Debug/opengl.obj
Normal file
BIN
dll/Debug/smack.obj
Normal file
BIN
dll/Debug/user32.obj
Normal file
BIN
dll/Debug/vc90.idb
Normal file
BIN
dll/Debug/vc90.pdb
Normal file
BIN
dll/Debug/winmm.obj
Normal file
BIN
dll/Debug/wintrust.obj
Normal file
BIN
dll/Debug/wndproc.obj
Normal file
@ -87,7 +87,7 @@ static char *Flag4Names[32]={
|
||||
"STRETCHTIMERS", "NOFLIPEMULATION", "NOTEXTURES", "RETURNNULLREF",
|
||||
"FINETIMING", "NATIVERES", "SUPPORTSVGA", "SUPPORTHDTV",
|
||||
"RELEASEMOUSE", "FRAMECOMPENSATION", "HOTPATCH", "ENABLEHOTKEYS",
|
||||
"HOTPATCHALWAYS", "NOD3DRESET", "OVERRIDEREGISTRY", "",
|
||||
"HOTPATCHALWAYS", "NOD3DRESET", "OVERRIDEREGISTRY", "HIDECDROMEMPTY",
|
||||
};
|
||||
|
||||
static char *TFlagNames[32]={
|
||||
@ -557,7 +557,7 @@ LRESULT CALLBACK extDialogWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPA
|
||||
}
|
||||
|
||||
pWindowProc=WhndGetWindowProc(hwnd);
|
||||
if(pWindowProc) return(*pWindowProc)(hwnd, message, wparam, lparam);
|
||||
if(pWindowProc) return(*pCallWindowProc)(pWindowProc, hwnd, message, wparam, lparam);
|
||||
char *sMsg="ASSERT: DialogWinMsg pWindowProc=NULL !!!\n";
|
||||
OutTraceDW(sMsg);
|
||||
if (IsAssertEnabled) MessageBox(0, sMsg, "WindowProc", MB_OK | MB_ICONEXCLAMATION);
|
||||
@ -571,49 +571,53 @@ LRESULT CALLBACK extChildWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPAR
|
||||
WNDPROC pWindowProc;
|
||||
|
||||
OutTraceW("DEBUG: ChildWinMsg [0x%x]%s(%x,%x)\n", message, ExplainWinMessage(message), wparam, lparam);
|
||||
switch(message){
|
||||
|
||||
// Cybermercs: it seems that all game menus are conveniently handled by the WindowProc routine,
|
||||
// while the action screen get messages processed by the ChildWindowProc, that needs some different
|
||||
// setting ..........
|
||||
// Beware: Cybermercs handles some static info about cursor position handling, so that if you resize
|
||||
// a menu it doesn't work correctly until you don't change screen.
|
||||
case WM_MOUSEMOVE:
|
||||
case WM_MOUSEWHEEL:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_LBUTTONUP:
|
||||
case WM_LBUTTONDBLCLK:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_RBUTTONUP:
|
||||
case WM_RBUTTONDBLCLK:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_MBUTTONDBLCLK:
|
||||
if(dxw.dwFlags1 & MODIFYMOUSE){ // mouse processing
|
||||
POINT prev, curr;
|
||||
// scale mouse coordinates
|
||||
prev.x = LOWORD(lparam);
|
||||
prev.y = HIWORD(lparam);
|
||||
curr = prev;
|
||||
if(message == WM_MOUSEWHEEL){ // v2.02.33 mousewheel fix
|
||||
POINT upleft={0,0};
|
||||
(*pClientToScreen)(dxw.GethWnd(), &upleft);
|
||||
curr = dxw.SubCoordinates(curr, upleft);
|
||||
if(dxw.Windowize){
|
||||
switch(message){
|
||||
// Cybermercs: it seems that all game menus are conveniently handled by the WindowProc routine,
|
||||
// while the action screen get messages processed by the ChildWindowProc, that needs some different
|
||||
// setting ..........
|
||||
// Beware: Cybermercs handles some static info about cursor position handling, so that if you resize
|
||||
// a menu it doesn't work correctly until you don't change screen.
|
||||
case WM_MOUSEMOVE:
|
||||
case WM_MOUSEWHEEL:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_LBUTTONUP:
|
||||
case WM_LBUTTONDBLCLK:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_RBUTTONUP:
|
||||
case WM_RBUTTONDBLCLK:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_MBUTTONDBLCLK:
|
||||
if(dxw.dwFlags1 & MODIFYMOUSE){ // mouse processing
|
||||
POINT prev, curr;
|
||||
// scale mouse coordinates
|
||||
prev.x = LOWORD(lparam);
|
||||
prev.y = HIWORD(lparam);
|
||||
curr = prev;
|
||||
if(message == WM_MOUSEWHEEL){ // v2.02.33 mousewheel fix
|
||||
POINT upleft={0,0};
|
||||
(*pClientToScreen)(dxw.GethWnd(), &upleft);
|
||||
curr = dxw.SubCoordinates(curr, upleft);
|
||||
}
|
||||
//OutTraceC("ChildWindowProc: hwnd=%x pos XY prev=(%d,%d)\n", hwnd, prev.x, prev.y);
|
||||
curr=dxw.FixCursorPos(curr); // Warn! the correction must refer to the main window hWnd, not the current hwnd one !!!
|
||||
lparam = MAKELPARAM(curr.x, curr.y);
|
||||
OutTraceC("ChildWindowProc: hwnd=%x pos XY=(%d,%d)->(%d,%d)\n", hwnd, prev.x, prev.y, curr.x, curr.y);
|
||||
}
|
||||
//OutTraceC("ChildWindowProc: hwnd=%x pos XY prev=(%d,%d)\n", hwnd, prev.x, prev.y);
|
||||
curr=dxw.FixCursorPos(curr); // Warn! the correction must refer to the main window hWnd, not the current hwnd one !!!
|
||||
lparam = MAKELPARAM(curr.x, curr.y);
|
||||
OutTraceC("ChildWindowProc: hwnd=%x pos XY=(%d,%d)->(%d,%d)\n", hwnd, prev.x, prev.y, curr.x, curr.y);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
pWindowProc=WhndGetWindowProc(hwnd);
|
||||
|
||||
if(pWindowProc) return(*pWindowProc)(hwnd, message, wparam, lparam);
|
||||
|
||||
// v2.02.82: use CallWindowProc that handles WinProc handles
|
||||
if(pWindowProc) return(*pCallWindowProc)(pWindowProc, hwnd, message, wparam, lparam);
|
||||
// should never get here ....
|
||||
OutTraceDW("ChildWindowProc: no WndProc for CHILD hwnd=%x\n", hwnd);
|
||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||
}
|
||||
|
||||
|
BIN
dll/dxwnd.aps
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "dxwnd.h"
|
||||
#include "dxwcore.hpp"
|
||||
|
||||
#define VERSION "2.02.80"
|
||||
#define VERSION "2.02.82"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
@ -160,6 +160,7 @@ typedef BOOL (WINAPI *GetCursorPos_Type)(LPPOINT);
|
||||
typedef HDC (WINAPI *GDIGetDC_Type)(HWND);
|
||||
typedef HWND (WINAPI *GetDesktopWindow_Type)(void);
|
||||
typedef BOOL (WINAPI *GetMessage_Type)(LPMSG, HWND, UINT, UINT);
|
||||
typedef BOOL (WINAPI *GetMonitorInfo_Type)(HMONITOR, LPMONITORINFO);
|
||||
typedef int (WINAPI *GetSystemMetrics_Type)(int);
|
||||
typedef HWND (WINAPI *GetTopWindow_Type)(HWND);
|
||||
typedef LONG (WINAPI *GetWindowLong_Type)(HWND, int);
|
||||
@ -364,6 +365,8 @@ DXWEXTERN GetClipCursor_Type pGetClipCursor DXWINITIALIZED;
|
||||
DXWEXTERN GetCursorPos_Type pGetCursorPos DXWINITIALIZED;
|
||||
DXWEXTERN GDIGetDC_Type pGDIGetDC DXWINITIALIZED;
|
||||
DXWEXTERN GetDesktopWindow_Type pGetDesktopWindow DXWINITIALIZED;
|
||||
DXWEXTERN GetMonitorInfo_Type pGetMonitorInfoA DXWINITIALIZED;
|
||||
DXWEXTERN GetMonitorInfo_Type pGetMonitorInfoW DXWINITIALIZED;
|
||||
DXWEXTERN GetSystemMetrics_Type pGetSystemMetrics DXWINITIALIZED;
|
||||
DXWEXTERN GetTopWindow_Type pGetTopWindow DXWINITIALIZED;
|
||||
DXWEXTERN GDIGetDC_Type pGDIGetWindowDC DXWINITIALIZED;
|
||||
@ -573,6 +576,8 @@ extern HDC WINAPI extGDIGetDC(HWND);
|
||||
extern HDC WINAPI extEMUGetDC(HWND);
|
||||
extern HDC WINAPI extDDGetDC(HWND);
|
||||
extern HWND WINAPI extGetDesktopWindow(void);
|
||||
extern BOOL WINAPI extGetMonitorInfoA(HMONITOR, LPMONITORINFO);
|
||||
extern BOOL WINAPI extGetMonitorInfoW(HMONITOR, LPMONITORINFO);
|
||||
extern int WINAPI extGetSystemMetrics(int);
|
||||
extern HWND WINAPI extGetTopWindow(HWND);
|
||||
extern HDC WINAPI extGDIGetWindowDC(HWND);
|
||||
|
188
dll/user32.cpp
@ -22,6 +22,8 @@ static HookEntry_Type Hooks[]={
|
||||
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsExA, (FARPROC *)&pChangeDisplaySettingsExA, (FARPROC)extChangeDisplaySettingsExA},
|
||||
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsW, (FARPROC)extChangeDisplaySettingsW}, // ref. by Knights of Honor
|
||||
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsExW, (FARPROC)extChangeDisplaySettingsExW},
|
||||
{HOOK_HOT_CANDIDATE, "GetMonitorInfoA", (FARPROC)NULL, (FARPROC *)&pGetMonitorInfoA, (FARPROC)extGetMonitorInfoA},
|
||||
{HOOK_HOT_CANDIDATE, "GetMonitorInfoW", (FARPROC)NULL, (FARPROC *)&pGetMonitorInfoW, (FARPROC)extGetMonitorInfoW},
|
||||
{HOOK_IAT_CANDIDATE, "ShowCursor", (FARPROC)ShowCursor, (FARPROC *)&pShowCursor, (FARPROC)extShowCursor},
|
||||
{HOOK_IAT_CANDIDATE, "CreateDialogIndirectParamA", (FARPROC)CreateDialogIndirectParamA, (FARPROC *)&pCreateDialogIndirectParam, (FARPROC)extCreateDialogIndirectParam},
|
||||
{HOOK_IAT_CANDIDATE, "CreateDialogParamA", (FARPROC)CreateDialogParamA, (FARPROC *)&pCreateDialogParam, (FARPROC)extCreateDialogParam},
|
||||
@ -887,7 +889,7 @@ BOOL WINAPI extSetCursorPos(int x, int y)
|
||||
res=0;
|
||||
if (pSetCursorPos) res=(*pSetCursorPos)(x,y);
|
||||
|
||||
OutTraceC("SetCursorPos: res=%x XY=(%d,%d)->(%d,%d)\n",res, PrevX, PrevY, x, y);
|
||||
OutTraceC("SetCursorPos: res=%x XY=(%d,%d)->(%d,%d)\n", res, PrevX, PrevY, x, y);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1122,6 +1124,39 @@ ATOM WINAPI extRegisterClassA(WNDCLASS *lpwcx)
|
||||
return (*pRegisterClassA)(lpwcx);
|
||||
}
|
||||
|
||||
static void HookChildWndProc(HWND hwnd, DWORD dwStyle, LPCTSTR ApiName)
|
||||
{
|
||||
// child window inherit the father's windproc, so if it's redirected to
|
||||
// a hooker (either extWindowProc or extChildWindowProc) you have to retrieve
|
||||
// the correct value (WhndGetWindowProc) before saving it (WhndStackPush).
|
||||
long res;
|
||||
WNDPROC pWindowProc;
|
||||
|
||||
pWindowProc = (WNDPROC)(*pGetWindowLongA)(hwnd, GWL_WNDPROC);
|
||||
if((pWindowProc == extWindowProc) ||
|
||||
(pWindowProc == extChildWindowProc) ||
|
||||
(pWindowProc == extDialogWindowProc)){ // avoid recursions
|
||||
HWND Father;
|
||||
WNDPROC pFatherProc;
|
||||
Father=GetParent(hwnd);
|
||||
pFatherProc=WhndGetWindowProc(Father);
|
||||
OutTraceDW("%s: WndProc=%s father=%x WndProc=%x\n", ApiName,
|
||||
(pWindowProc == extWindowProc) ? "extWindowProc" : ((pWindowProc == extChildWindowProc) ? "extChildWindowProc" : "extDialogWindowProc"),
|
||||
Father, pFatherProc);
|
||||
pWindowProc = pFatherProc;
|
||||
}
|
||||
WhndStackPush(hwnd, pWindowProc);
|
||||
if(dwStyle & WS_CHILD){
|
||||
OutTraceDW("%s: Hooking CHILD hwnd=%x father WindowProc %x->%x\n", ApiName, hwnd, pWindowProc, extChildWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, GWL_WNDPROC, (LONG)extChildWindowProc);
|
||||
}
|
||||
else { // must be dwStyle & WS_DLGFRAME
|
||||
OutTraceDW("%s: Hooking DLGFRAME hwnd=%x father WindowProc %x->%x\n", ApiName, hwnd, pWindowProc, extDialogWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, GWL_WNDPROC, (LONG)extDialogWindowProc);
|
||||
}
|
||||
if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError());
|
||||
}
|
||||
|
||||
static HWND WINAPI extCreateWindowCommon(
|
||||
LPCTSTR ApiName,
|
||||
BOOL WideChar,
|
||||
@ -1139,7 +1174,6 @@ static HWND WINAPI extCreateWindowCommon(
|
||||
LPVOID lpParam)
|
||||
{
|
||||
HWND hwnd;
|
||||
WNDPROC pWindowProc;
|
||||
BOOL isValidHandle=TRUE;
|
||||
|
||||
if(!dxw.Windowize){
|
||||
@ -1147,44 +1181,12 @@ static HWND WINAPI extCreateWindowCommon(
|
||||
hwnd= (*pCreateWindowExW)(dwExStyle, (LPCWSTR)lpClassName, (LPCWSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
||||
else
|
||||
hwnd= (*pCreateWindowExA)(dwExStyle, (LPCSTR)lpClassName, (LPCSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
||||
if ((dwStyle & WS_CHILD) && (dxw.dwFlags1 & HOOKCHILDWIN)){
|
||||
// child window inherit the father's windproc, so if it's redirected to
|
||||
// a hooker (either extWindowProc or extChildWindowProc) you have to retrieve
|
||||
// the correct value (WhndGetWindowProc) before saving it (WhndStackPush).
|
||||
long res;
|
||||
pWindowProc = (WNDPROC)(*pGetWindowLongA)(hwnd, GWL_WNDPROC);
|
||||
if((pWindowProc == extWindowProc) ||
|
||||
(pWindowProc == extChildWindowProc) ||
|
||||
(pWindowProc == extDialogWindowProc)){ // avoid recursions
|
||||
HWND Father;
|
||||
Father=GetParent(hwnd);
|
||||
pWindowProc=WhndGetWindowProc(Father);
|
||||
}
|
||||
OutTraceDW("Hooking CHILD hwnd=%x father WindowProc %x->%x\n", hwnd, pWindowProc, extChildWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, GWL_WNDPROC, (LONG)extChildWindowProc);
|
||||
if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError());
|
||||
WhndStackPush(hwnd, pWindowProc);
|
||||
}
|
||||
if ((dwStyle & WS_DLGFRAME) && (dxw.dwFlags1 & HOOKCHILDWIN)){
|
||||
// child window inherit the father's windproc, so if it's redirected to
|
||||
// a hooker (either extWindowProc or extChildWindowProc) you have to retrieve
|
||||
// the correct value (WhndGetWindowProc) before saving it (WhndStackPush).
|
||||
long res;
|
||||
pWindowProc = (WNDPROC)(*pGetWindowLongA)(hwnd, DWL_DLGPROC);
|
||||
if((pWindowProc == extWindowProc) ||
|
||||
(pWindowProc == extChildWindowProc) ||
|
||||
(pWindowProc == extDialogWindowProc)){ // avoid recursions
|
||||
HWND Father;
|
||||
Father=GetParent(hwnd);
|
||||
pWindowProc=WhndGetWindowProc(Father);
|
||||
}
|
||||
OutTraceDW("Hooking CHILD hwnd=%x father WindowProc %x->%x\n", hwnd, pWindowProc, extChildWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, DWL_DLGPROC, (LONG)extDialogWindowProc);
|
||||
if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError());
|
||||
WhndStackPush(hwnd, pWindowProc);
|
||||
}
|
||||
|
||||
if ((dxw.dwFlags1 & HOOKCHILDWIN) && (dwStyle & (WS_CHILD|WS_DLGFRAME)))
|
||||
HookChildWndProc(hwnd, dwStyle, ApiName);
|
||||
|
||||
OutTraceDW("%s: ret=%x\n", ApiName, hwnd);
|
||||
return hwnd;
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
// no maximized windows in any case
|
||||
@ -1332,43 +1334,8 @@ static HWND WINAPI extCreateWindowCommon(
|
||||
if ((dxw.dwFlags1 & FIXWINFRAME) && !(dwStyle & WS_CHILD) && dxw.IsDesktop(hwnd))
|
||||
dxw.FixWindowFrame(hwnd);
|
||||
|
||||
// to do: handle inner child, and leave dialogue & modal child alone!!!
|
||||
if ((dwStyle & WS_CHILD) && (dxw.dwFlags1 & HOOKCHILDWIN)){
|
||||
// child window inherit the father's windproc, so if it's redirected to
|
||||
// a hooker (either extWindowProc or extChildWindowProc) you have to retrieve
|
||||
// the correct value (WhndGetWindowProc) before saving it (WhndStackPush).
|
||||
long res;
|
||||
pWindowProc = (WNDPROC)(*pGetWindowLongA)(hwnd, GWL_WNDPROC);
|
||||
if((pWindowProc == extWindowProc) ||
|
||||
(pWindowProc == extChildWindowProc) ||
|
||||
(pWindowProc == extDialogWindowProc)){ // avoid recursions
|
||||
HWND Father;
|
||||
Father=GetParent(hwnd);
|
||||
pWindowProc=WhndGetWindowProc(Father);
|
||||
}
|
||||
OutTraceDW("Hooking CHILD hwnd=%x father WindowProc %x->%x\n", hwnd, pWindowProc, extChildWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, GWL_WNDPROC, (LONG)extChildWindowProc);
|
||||
if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError());
|
||||
WhndStackPush(hwnd, pWindowProc);
|
||||
}
|
||||
if ((dwStyle & WS_DLGFRAME) && (dxw.dwFlags1 & HOOKCHILDWIN)){
|
||||
// child window inherit the father's windproc, so if it's redirected to
|
||||
// a hooker (either extWindowProc or extChildWindowProc) you have to retrieve
|
||||
// the correct value (WhndGetWindowProc) before saving it (WhndStackPush).
|
||||
long res;
|
||||
pWindowProc = (WNDPROC)(*pGetWindowLongA)(hwnd, DWL_DLGPROC);
|
||||
if((pWindowProc == extWindowProc) ||
|
||||
(pWindowProc == extChildWindowProc) ||
|
||||
(pWindowProc == extDialogWindowProc)){ // avoid recursions
|
||||
HWND Father;
|
||||
Father=GetParent(hwnd);
|
||||
pWindowProc=WhndGetWindowProc(Father);
|
||||
}
|
||||
OutTraceDW("Hooking CHILD hwnd=%x father WindowProc %x->%x\n", hwnd, pWindowProc, extChildWindowProc);
|
||||
res=(*pSetWindowLongA)(hwnd, DWL_DLGPROC, (LONG)extDialogWindowProc);
|
||||
if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError());
|
||||
WhndStackPush(hwnd, pWindowProc);
|
||||
}
|
||||
if ((dxw.dwFlags1 & HOOKCHILDWIN) && (dwStyle & (WS_CHILD|WS_DLGFRAME)))
|
||||
HookChildWndProc(hwnd, dwStyle, ApiName);
|
||||
|
||||
OutTraceDW("%s: ret=%x\n", ApiName, hwnd);
|
||||
return hwnd;
|
||||
@ -2331,13 +2298,53 @@ BOOL WINAPI extDestroyWindow(HWND hWnd)
|
||||
return res;
|
||||
}
|
||||
|
||||
static char *ExplainTAAlign(UINT c)
|
||||
{
|
||||
static char eb[256];
|
||||
unsigned int l;
|
||||
strcpy(eb,"TA_");
|
||||
strcat(eb, (c & TA_UPDATECP) ? "UPDATECP+" : "NOUPDATECP+");
|
||||
strcat(eb, (c & TA_RIGHT) ? (((c & TA_CENTER) == TA_CENTER) ? "CENTER+" : "RIGHT+") : "LEFT+");
|
||||
strcat(eb, (c & TA_BOTTOM) ? "BOTTOM+" : "TOP+");
|
||||
if ((c & TA_BASELINE)==TA_BASELINE) strcat(eb, "BASELINE+");
|
||||
if (c & TA_RTLREADING) strcat(eb, "RTLREADING+");
|
||||
l=strlen(eb);
|
||||
eb[l-1]=0;
|
||||
return(eb);
|
||||
}
|
||||
|
||||
static char *ExplainDTFormat(UINT c)
|
||||
{
|
||||
static char eb[256];
|
||||
unsigned int l;
|
||||
strcpy(eb,"DT_");
|
||||
if(!(c & (DT_CENTER|DT_RIGHT))) strcat(eb, "LEFT+");
|
||||
if(c & DT_CENTER) strcat(eb, "CENTER+");
|
||||
if(c & DT_RIGHT) strcat(eb, "RIGHT+");
|
||||
if(!(c & (DT_VCENTER|DT_BOTTOM))) strcat(eb, "TOP+");
|
||||
if(c & DT_VCENTER) strcat(eb, "VCENTER+");
|
||||
if(c & DT_BOTTOM) strcat(eb, "BOTTOM+");
|
||||
if(c & DT_WORDBREAK) strcat(eb, "WORDBREAK+");
|
||||
if(c & DT_SINGLELINE) strcat(eb, "SINGLELINE+");
|
||||
if(c & DT_EXPANDTABS) strcat(eb, "EXPANDTABS+");
|
||||
if(c & DT_TABSTOP) strcat(eb, "TABSTOP+");
|
||||
if(c & DT_NOCLIP) strcat(eb, "NOCLIP+");
|
||||
if(c & DT_EXTERNALLEADING) strcat(eb, "EXTERNALLEADING+");
|
||||
if(c & DT_CALCRECT) strcat(eb, "CALCRECT+");
|
||||
if(c & DT_NOPREFIX) strcat(eb, "NOPREFIX+");
|
||||
if(c & DT_INTERNAL) strcat(eb, "INTERNAL+");
|
||||
l=strlen(eb);
|
||||
eb[l-1]=0;
|
||||
return(eb);
|
||||
}
|
||||
|
||||
BOOL gFixed;
|
||||
|
||||
int WINAPI extDrawTextA(HDC hdc, LPCTSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat)
|
||||
{
|
||||
int ret;
|
||||
OutTraceDW("DrawText: hdc=%x rect=(%d,%d)-(%d,%d) Format=%x Text=(%d)\"%s\"\n",
|
||||
hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, uFormat, nCount, lpchText);
|
||||
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);
|
||||
|
||||
gFixed = TRUE;
|
||||
if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){
|
||||
@ -2642,3 +2649,28 @@ HWND WINAPI extChildWindowFromPointEx(HWND hWndParent, POINT Point, UINT uFlags)
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL extGetMonitorInfo(HMONITOR hMonitor, LPMONITORINFO lpmi, GetMonitorInfo_Type pGetMonitorInfo)
|
||||
{
|
||||
BOOL res;
|
||||
OutTrace("GetMonitorInfo: hMonitor=%x mi=MONITORINFO%s\n", hMonitor, lpmi->cbSize==sizeof(MONITORINFO)?"":"EX");
|
||||
res=(*pGetMonitorInfo)(hMonitor, lpmi);
|
||||
if(res && dxw.Windowize){
|
||||
OutTraceDW("GetMonitorInfo: FIX Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d) -> (%d,%d)-(%d,%d)\n",
|
||||
lpmi->rcWork.left, lpmi->rcWork.top, lpmi->rcWork.right, lpmi->rcWork.bottom,
|
||||
lpmi->rcMonitor.left, lpmi->rcMonitor.top, lpmi->rcMonitor.right, lpmi->rcMonitor.bottom,
|
||||
0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight());
|
||||
lpmi->rcWork = dxw.GetScreenRect();
|
||||
lpmi->rcMonitor = dxw.GetScreenRect();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
BOOL WINAPI extGetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpmi)
|
||||
{
|
||||
return extGetMonitorInfo(hMonitor, lpmi, pGetMonitorInfoA);
|
||||
}
|
||||
|
||||
BOOL WINAPI extGetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpmi)
|
||||
{
|
||||
return extGetMonitorInfo(hMonitor, lpmi, pGetMonitorInfoW);
|
||||
}
|
||||
|
BIN
doc/dxwnd_manual.odt
Normal file
BIN
doc/dxwnd_manual.pdf
Normal file
BIN
doc/resources/config_compat.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
doc/resources/config_directx.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
doc/resources/config_input.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
doc/resources/config_libs.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
doc/resources/config_log.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
doc/resources/config_main.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
doc/resources/config_timing.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
doc/resources/config_video.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
doc/resources/dxwnd.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
doc/resources/dxwnd_menu.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
doc/resources/help_about.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
doc/resources/menu_edit.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
doc/resources/menu_file.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
doc/resources/menu_help.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
doc/resources/menu_view.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
doc/resources/view_palette.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
doc/resources/view_status.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
doc/resources/view_timeslider.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
@ -29,10 +29,3 @@ int MessageBoxLangArg(UINT iText, UINT iCaption, UINT uType, ...)
|
||||
return MessageBoxExW(NULL, sBuffer, sCaption, uType, NULL);
|
||||
}
|
||||
|
||||
int MessageBoxLangWstr(LPWSTR lpBuffer, UINT iCaption, UINT uType)
|
||||
{
|
||||
WCHAR sCaption[48+1];
|
||||
LoadStringW(AfxGetResourceHandle(), iCaption, (LPWSTR)&sCaption, sizeof(sCaption));
|
||||
|
||||
return MessageBoxExW(NULL, lpBuffer, sCaption, uType, NULL);
|
||||
}
|
||||
|
BIN
host/Resource.h
@ -72,6 +72,8 @@ static char *Resolutions[]={
|
||||
"" // terminator
|
||||
};
|
||||
|
||||
char UnlimitedString[20+1];
|
||||
|
||||
BOOL CTabWindow::OnInitDialog()
|
||||
{
|
||||
|
||||
@ -82,6 +84,9 @@ BOOL CTabWindow::OnInitDialog()
|
||||
int i;
|
||||
List=(CListBox *)this->GetDlgItem(IDC_LISTRES);
|
||||
List->ResetContent();
|
||||
if(LoadString(AfxGetResourceHandle(), DXW_STRING_UNLIMITED, UnlimitedString, sizeof(UnlimitedString))){
|
||||
Resolutions[0]=UnlimitedString;
|
||||
}
|
||||
for(i=0; strlen(Resolutions[i]); i++) List->AddString(Resolutions[i]);
|
||||
List->SetCurSel(cTarget->m_MaxScreenRes);
|
||||
|
||||
|
@ -172,6 +172,7 @@ BOOL CTargetDlg::OnInitDialog()
|
||||
int i=0;
|
||||
AfxEnableControlContainer();
|
||||
CDialog::OnInitDialog();
|
||||
#if 0
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T("Main"));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T("Video"));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T("Input"));
|
||||
@ -181,6 +182,27 @@ BOOL CTargetDlg::OnInitDialog()
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T("Libs"));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T("Compat"));
|
||||
if (gbDebug) m_tabdxTabCtrl.InsertItem(i++, _T("Debug"));
|
||||
#else
|
||||
char sCaption[48+1];
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_MAIN, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_VIDEO, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_INPUT, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_DIRECTX, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_TIMING, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_LOGS, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_LIBS, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_COMPAT, sCaption, sizeof(sCaption));
|
||||
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
LoadString(AfxGetResourceHandle(), DXW_TAB_DEBUG, sCaption, sizeof(sCaption));
|
||||
if (gbDebug) m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
|
||||
#endif
|
||||
m_tabdxTabCtrl.Init();
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -27,4 +27,6 @@ public:
|
||||
virtual BOOL OnInitDialog();
|
||||
protected:
|
||||
virtual void OnOK();
|
||||
private:
|
||||
char IdleString[20+1];
|
||||
};
|
||||
|
@ -12,6 +12,7 @@ IMPLEMENT_DYNAMIC(CTimeSliderDialog, CDialog)
|
||||
CTimeSliderDialog::CTimeSliderDialog(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CTimeSliderDialog::IDD, pParent)
|
||||
{
|
||||
LoadString(AfxGetResourceHandle(), DXW_STRING_IDLE, IdleString, sizeof(IdleString));
|
||||
}
|
||||
|
||||
CTimeSliderDialog::~CTimeSliderDialog()
|
||||
@ -52,7 +53,7 @@ void CTimeSliderDialog::OnTimer(UINT_PTR nIDEvent)
|
||||
i_TimeSlider=Slider->GetPos();
|
||||
if(GetHookStatus(NULL)!=DXW_RUNNING) {
|
||||
Slider->SetPos(0);
|
||||
Text->SetWindowTextA("idle");
|
||||
Text->SetWindowTextA(IdleString);
|
||||
return;
|
||||
}
|
||||
if(i_TimeSlider==iLastPos){
|
||||
|
5
host/dxwnd.ini
Normal file
@ -0,0 +1,5 @@
|
||||
[window]
|
||||
posx=1213
|
||||
posy=261
|
||||
sizx=320
|
||||
sizy=200
|
@ -45,6 +45,9 @@ class CNewCommandLineInfo : public CCommandLineInfo
|
||||
void ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast);
|
||||
};
|
||||
|
||||
BOOL LangSelected=FALSE;
|
||||
char LangString[20+1] = {0};
|
||||
|
||||
void CNewCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast)
|
||||
{
|
||||
if(bFlag) {
|
||||
@ -66,8 +69,12 @@ void CNewCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast)
|
||||
CString Lang;
|
||||
Lang = sParam.MakeLower().Right(2);
|
||||
ResLib=LoadLibrary("Resources_"+Lang+".dll");
|
||||
if(ResLib) AfxSetResourceHandle(ResLib);
|
||||
if(ResLib) {
|
||||
AfxSetResourceHandle(ResLib);
|
||||
LangSelected=TRUE;
|
||||
}
|
||||
else MessageBoxEx(NULL, "Missing language \""+Lang+"\"\nUsing default language \"en\"", "Warning", MB_OK, NULL);
|
||||
//strcpy(LangString, sParam.MakeLower().Mid(5));
|
||||
return;
|
||||
}
|
||||
if (sParam.Left(2).MakeLower() == "c:"){
|
||||
@ -124,6 +131,50 @@ BOOL CDxwndhostApp::InitInstance()
|
||||
CNewCommandLineInfo cmdInfo;
|
||||
ParseCommandLine(cmdInfo);
|
||||
|
||||
if(!LangSelected){
|
||||
LANGID LangId;
|
||||
char LangString[20+1];
|
||||
char InitPath[MAX_PATH];
|
||||
GetCurrentDirectory(MAX_PATH, InitPath);
|
||||
strcat_s(InitPath, sizeof(InitPath), "\\dxwnd.ini");
|
||||
GetPrivateProfileString("window", "lang", "", LangString, 20+1, InitPath);
|
||||
if(!strcmp(LangString, "default") || !strlen(LangString)){ // if no specification, or lang=default
|
||||
// do nothing
|
||||
}
|
||||
if(!strcmp(LangString, "automatic")){ // lang=automatic
|
||||
HMODULE ResLib;
|
||||
LangId=GetUserDefaultUILanguage();
|
||||
// other codes to be implemented:
|
||||
// 409 (2-9): english (default)
|
||||
// 411 (2-11): japanese
|
||||
switch(LangId & 0x1FF){
|
||||
case 0x04: // chinese family
|
||||
ResLib=LoadLibrary("Resources_CN.dll");
|
||||
if(ResLib) AfxSetResourceHandle(ResLib);
|
||||
else MessageBoxEx(NULL, "Missing language \"CN\"\nUsing default language \"en\"", "Warning", MB_OK, NULL);
|
||||
break;
|
||||
case 0x10: // 410 - italian, 810 - switzerland italian
|
||||
ResLib=LoadLibrary("Resources_IT.dll");
|
||||
if(ResLib) AfxSetResourceHandle(ResLib);
|
||||
else MessageBoxEx(NULL, "Missing language \"CN\"\nUsing default language \"en\"", "Warning", MB_OK, NULL);
|
||||
break;
|
||||
default:
|
||||
//char sBuf[81];
|
||||
//sprintf(sBuf, "Got Lang=%x(%x-%x)", LangId, LangId>>9, (LangId & 0x1FF));
|
||||
//MessageBox(NULL, sBuf, "LangId", MB_OK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(strcmp(LangString, "automatic") && strcmp(LangString, "default") && strlen(LangString)) { // lang=something different from both automatic and default
|
||||
HMODULE ResLib;
|
||||
CString Lang;
|
||||
Lang.SetString(LangString);
|
||||
ResLib=LoadLibrary("Resources_"+Lang+".dll");
|
||||
if(ResLib) AfxSetResourceHandle(ResLib);
|
||||
else MessageBoxEx(NULL, "Missing language \""+Lang+"\"\nUsing default language \"en\"", "Warning", MB_OK, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// Dispatch commands specified on the command line.
|
||||
if (!ProcessShellCommand(cmdInfo))
|
||||
return FALSE;
|
||||
|
@ -14,6 +14,9 @@
|
||||
|
||||
#include "resource.h" // Main symbols
|
||||
|
||||
extern int MessageBoxLang(UINT, UINT, UINT);
|
||||
extern int MessageBoxLangArg(UINT, UINT, UINT, ...);
|
||||
|
||||
// DxWnd host app private data
|
||||
// fields here are associated to TARGETMAP records, but need not to be passed
|
||||
// to the dxwnd hook callback, so they are left in a separate array to save
|
||||
|
@ -3,10 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwndhost", "dxwndhost.vs2008.vcproj", "{FD0B0234-8EC5-43C0-A384-1B881DD3D925}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Resources_Ch", "..\locale\ch\Resources_Ch.vcproj", "{F8D07BBB-A04B-4C0C-8AF8-7F839A152456}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwnd", "..\dll\dxwnd.vs2008.vcproj", "{579E7FE7-2745-4100-A802-23511711FCDE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -17,14 +13,6 @@ Global
|
||||
{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
|
||||
{F8D07BBB-A04B-4C0C-8AF8-7F839A152456}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F8D07BBB-A04B-4C0C-8AF8-7F839A152456}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F8D07BBB-A04B-4C0C-8AF8-7F839A152456}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F8D07BBB-A04B-4C0C-8AF8-7F839A152456}.Release|Win32.Build.0 = Release|Win32
|
||||
{579E7FE7-2745-4100-A802-23511711FCDE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{579E7FE7-2745-4100-A802-23511711FCDE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{579E7FE7-2745-4100-A802-23511711FCDE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{579E7FE7-2745-4100-A802-23511711FCDE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1 +0,0 @@
|
||||
Manifest resource last updated at 17:52:51.01 on 22/06/2014
|