diff --git a/build/dxwnd.dll b/build/dxwnd.dll
index 1c875cb..d0fdae3 100644
--- a/build/dxwnd.dll
+++ b/build/dxwnd.dll
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f5024ec55f3917b2908e231698222147516bb21efda0938c969100fc43f7fd9f
-size 626688
+oid sha256:22f399a262f8cb3071bb10d366ee021b542e9c13b6122b70370ecc319b970489
+size 628736
diff --git a/build/dxwnd.exe b/build/dxwnd.exe
index b2e3de1..2be50fe 100644
--- a/build/dxwnd.exe
+++ b/build/dxwnd.exe
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b2afb528861c05b34730d201b567c3e47f969732676f7d9fd998ffe8cf16674d
-size 553472
+oid sha256:393da7c339ffda956ed69f340401cd4dfeef582666d42a812699a641e698d691
+size 558080
diff --git a/build/dxwnd.ini b/build/dxwnd.ini
deleted file mode 100644
index ae9b0a2..0000000
--- a/build/dxwnd.ini
+++ /dev/null
@@ -1,120 +0,0 @@
-[window]
-exportpath=D:\DxWnd\exports\
-exepath=D:\Games\msgolf\Golf '98 Trial\
-posx=981
-posy=464
-sizx=320
-sizy=200
-[target]
-title0=Miscrosoft Golf '98 Trial
-path0=D:\Games\msgolf\Golf '98 Trial\game.exe
-launchpath0=
-module0=
-opengllib0=
-notes0=
-registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"InstallType"="1"\n"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"\n"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\msgolf\\Golf '98 Trial"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009\n\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"InstallType"="1"\n"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"\n"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\msgolf\\Golf '98 Trial"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009
-ver0=0
-coord0=0
-flag0=2101474
-flagg0=1476395016
-flagh0=1044
-flagi0=1210187780
-flagj0=128
-flagk0=327680
-flagl0=4
-flagm0=0
-tflag0=0
-posx0=50
-posy0=50
-sizx0=880
-sizy0=660
-maxfps0=0
-initts0=0
-winver0=0
-maxres0=-1
-swapeffect0=0
-maxddinterface0=0
-title1=M1 Tank Platoon 2
-path1=D:\Games\M1 Tank Platoon 2\M1TP2.exe
-launchpath1=
-module1=
-opengllib1=
-notes1=
-registry1=
-ver1=0
-coord1=0
-flag1=134238242
-flagg1=1207959552
-flagh1=20
-flagi1=138412036
-flagj1=268439680
-flagk1=0
-flagl1=0
-flagm1=0
-tflag1=0
-posx1=50
-posy1=50
-sizx1=800
-sizy1=600
-maxfps1=0
-initts1=8
-winver1=0
-maxres1=-1
-swapeffect1=0
-maxddinterface1=7
-title2=Imperialism II
-path2=D:\Games\Imperialism 2\imperialism II.exe
-launchpath2=
-module2=
-opengllib2=
-notes2=
-registry2=
-ver2=0
-coord2=0
-flag2=679485474
-flagg2=1207959552
-flagh2=20
-flagi2=4194308
-flagj2=0
-flagk2=262144
-flagl2=4
-flagm2=0
-tflag2=0
-posx2=50
-posy2=50
-sizx2=800
-sizy2=600
-maxfps2=0
-initts2=0
-winver2=0
-maxres2=0
-swapeffect2=0
-maxddinterface2=7
-title3=Imperialism
-path3=D:\Games\Imperialism\Imperialism.exe
-launchpath3=
-module3=
-opengllib3=
-notes3=Note:\nMap zooming is currently not workind. Do not click on the magnifying glass, \nor the game will crash.
-registry3=
-ver3=0
-coord3=0
-flag3=1746935843
-flagg3=1744830464
-flagh3=20
-flagi3=71303172
-flagj3=128
-flagk3=262144
-flagl3=4
-flagm3=0
-tflag3=0
-posx3=50
-posy3=50
-sizx3=800
-sizy3=600
-maxfps3=0
-initts3=0
-winver3=0
-maxres3=-1
-swapeffect3=0
-maxddinterface3=7
diff --git a/build/dxwnd.reg b/build/dxwnd.reg
deleted file mode 100644
index 89fc615..0000000
--- a/build/dxwnd.reg
+++ /dev/null
@@ -1,31 +0,0 @@
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\]
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]
-"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"
-"InstallType"="1"
-"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"
-"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"
-"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"
-"Launched"="1"
-"PID"=""
-"Path"="D:\\Games\\msgolf\\Golf '98 Trial"
-"VersionType"="TrialVersion"
-"InstalledGroup"="1"
-"LangID"=dword:00000009
-
-
-[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games]
-[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98]
-[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]
-"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"
-"InstallType"="1"
-"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"
-"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"
-"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"
-"Launched"="1"
-"PID"=""
-"Path"="D:\\Games\\msgolf\\Golf '98 Trial"
-"VersionType"="TrialVersion"
-"InstalledGroup"="1"
-"LangID"=dword:00000009
\ No newline at end of file
diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt
index 730503e..566cdee 100644
--- a/build/readme-relnotes.txt
+++ b/build/readme-relnotes.txt
@@ -1049,4 +1049,14 @@ fix: improved handling of clipping regions in shared dc mode
add: added DWM status to log file
add: flags for preliminary hook of DirectSound and Smack libraries
fix: changed icon colors (yellow for red, doesn't suggest the idea of error or danger)
-add: menu commands for entry movement (top, bottom, up, down) or duplication
\ No newline at end of file
+add: menu commands for entry movement (top, bottom, up, down) or duplication
+
+v2.03/58
+add: added program manifest stating Win10/8/7/Vista compatibility
+add: "Clear compatbility flag" tool
+add: "Recover screen mode" tool
+add: "Set path" tool
+fix: reorganized menu commands
+fix: proper handling of DEFAULT win size on CreateWindowEx - fixes "Imperialism" problem
+fix: fixed stretced blit operation because Blt behaves differently from StretchBlt. Fixes "3D Minigolf" partial background
+fix: GetPixel logging
diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp
index 9feee4d..9f17ce0 100644
--- a/dll/dxwnd.cpp
+++ b/dll/dxwnd.cpp
@@ -18,7 +18,7 @@ along with this program. If not, see .
*/
#define _CRT_SECURE_NO_WARNINGS
-#include
+#include
#include
#include
#include
@@ -27,7 +27,7 @@ along with this program. If not, see .
#include "TlHelp32.h"
-#define VERSION "2.03.57"
+#define VERSION "2.03.58"
#define DDTHREADLOCK 1
//#define LOCKTHREADS
diff --git a/dll/dxwnd.dll.manifest b/dll/dxwnd.dll.manifest
new file mode 100644
index 0000000..8c52281
--- /dev/null
+++ b/dll/dxwnd.dll.manifest
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo
index 250b4f3..b46f3b0 100644
Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ
diff --git a/dll/dxwnd.vs2008.vcproj b/dll/dxwnd.vs2008.vcproj
index 9115aa3..e7e3517 100644
--- a/dll/dxwnd.vs2008.vcproj
+++ b/dll/dxwnd.vs2008.vcproj
@@ -1,7 +1,7 @@
#include
-int KillProcByName(char *szToTerminate, BOOL bKill)
+int KillProcByName(char *sProcessTail, BOOL bKill)
// Created: 6/23/2000 (RK)
// Last modified: 3/10/2002 (RK)
// Please report any problems or bugs to kochhar@physiology.wisc.edu
// The latest version of this routine can be found at:
// http://www.neurophys.wisc.edu/ravi/software/killproc/
-// Terminate the process "szToTerminate" if it is currently running
+// Terminate the process "sProcessTail" if it is currently running
// This works for Win/95/98/ME and also Win/NT/2000/XP
// The process name is case-insensitive, i.e. "notepad.exe" and "NOTEPAD.EXE"
-// will both work (for szToTerminate)
+// will both work (for sProcessTail)
// Return codes are as follows:
// 0 = Process was successfully terminated
// 603 = Process was not currently running
@@ -52,10 +52,10 @@ int KillProcByName(char *szToTerminate, BOOL bKill)
// Transfer Process name into "szToTermUpper" and
// convert it to upper case
- iLenP=strlen(szToTerminate);
+ iLenP=strlen(sProcessTail);
if(iLenP<1 || iLenP>MAX_PATH) return 632;
for(indx=0;indxMAX_PATH) return FALSE;
+ for(indx=0;indx=VER_PLATFORM_WIN32_NT)
+ {
+ // Win/NT or 2000 or XP or greater
+
+ // Load library and get the procedures explicitly. We do
+ // this so that we don't have to worry about modules using
+ // this code failing to load under Windows 9x, because
+ // it can't resolve references to the PSAPI.DLL.
+ hInstLib = LoadLibraryA("PSAPI.DLL");
+ if(hInstLib == NULL)
+ return 605;
+
+ // Get procedure addresses.
+ lpfEnumProcesses = (BOOL(WINAPI *)(DWORD *,DWORD,DWORD*))
+ GetProcAddress( hInstLib, "EnumProcesses" ) ;
+ lpfEnumProcessModules = (BOOL(WINAPI *)(HANDLE, HMODULE *,
+ DWORD, LPDWORD)) GetProcAddress( hInstLib,
+ "EnumProcessModules" ) ;
+ lpfGetModuleBaseName =(DWORD (WINAPI *)(HANDLE, HMODULE,
+ LPTSTR, DWORD )) GetProcAddress( hInstLib,
+ "GetModuleBaseNameA" ) ;
+ lpfGetModuleFileName =(DWORD (WINAPI *)(HANDLE, HMODULE,
+ LPTSTR, DWORD )) GetProcAddress( hInstLib,
+ "GetModuleFileNameExA" ) ;
+
+ if(lpfEnumProcesses == NULL ||
+ lpfEnumProcessModules == NULL ||
+ lpfGetModuleBaseName == NULL ||
+ lpfGetModuleFileName == NULL)
+ {
+ FreeLibrary(hInstLib);
+ return 700;
+ }
+
+ bResult=lpfEnumProcesses(aiPID,iCb,&iCbneeded);
+ if(!bResult)
+ {
+ // Unable to get process list, EnumProcesses failed
+ FreeLibrary(hInstLib);
+ return 701;
+ }
+
+ // How many processes are there?
+ iNumProc=iCbneeded/sizeof(DWORD);
+
+ // Get and match the name of each process
+ for(i=0;i
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps
index 5798c9e..b405cf7 100644
Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ
diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc
index 69e1097..f551700 100644
Binary files a/host/dxwndhost.rc and b/host/dxwndhost.rc differ
diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo
index 6cd93da..025237b 100644
Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ
diff --git a/host/dxwndhost.vs2008.vcproj b/host/dxwndhost.vs2008.vcproj
index 712dffd..70126fb 100644
--- a/host/dxwndhost.vs2008.vcproj
+++ b/host/dxwndhost.vs2008.vcproj
@@ -1,7 +1,7 @@
isUpdated=TRUE;
+ }
+ else {
+ sprintf(sMessage, "Path \"%s\" was already set.", FullPath);
+ MessageBox(sMessage, "DxWnd set path", MB_OK);
+ }
+ }
+ else{
+ sprintf(sMessage, "Replacement for \"%s\" not found, run the game!", lpProcName);
+ MessageBox(sMessage, "DxWnd set path", MB_ICONEXCLAMATION);
+ }
+}
+
void CDxwndhostView::OnSetRegistry()
{
int i;
@@ -2148,6 +2192,9 @@ void CDxwndhostView::OnRButtonDown(UINT nFlags, CPoint point)
case ID_SETREGISTRY:
OnSetRegistry();
break;
+ case ID_SETPATH:
+ OnSetPath();
+ break;
case ID_TASK_KILL:
OnKill();
break;
@@ -2178,6 +2225,12 @@ void CDxwndhostView::OnRButtonDown(UINT nFlags, CPoint point)
case ID_DESKTOPCOLORDEPTH_32BPP:
OnDesktopcolordepth32bpp();
break;
+ case ID_TOOLS_RECOVERSCREENMODE:
+ OnRecoverScreenMode();
+ break;
+ case ID_TOOLS_CLEARCOMPATIBILITYFLAGS:
+ OnClearCompatibilityFlags();
+ break;
case ID_MOVE_TOP:
OnMoveTop();
break;
@@ -2452,24 +2505,101 @@ void SwitchToColorDepth(int bpp)
void CDxwndhostView::OnDesktopcolordepth8bpp()
{
- // TODO: Add your command handler code here
SwitchToColorDepth(8);
}
void CDxwndhostView::OnDesktopcolordepth16bpp()
{
- // TODO: Add your command handler code here
SwitchToColorDepth(16);
}
void CDxwndhostView::OnDesktopcolordepth24bpp()
{
- // TODO: Add your command handler code here
SwitchToColorDepth(24);
}
void CDxwndhostView::OnDesktopcolordepth32bpp()
{
- // TODO: Add your command handler code here
SwitchToColorDepth(32);
}
+
+void CDxwndhostView::OnRecoverScreenMode()
+{
+ RevertScreenChanges(&this->InitDevMode);
+}
+
+void CDxwndhostView::OnClearCompatibilityFlags()
+{
+ int i;
+ POSITION pos;
+ CListCtrl& listctrl = GetListCtrl();
+ CString FilePath;
+ HRESULT res;
+ char sMessage[500];
+ DWORD lKeyLength;
+ LONG ret;
+
+ if(!listctrl.GetSelectedCount()) return ;
+ pos = listctrl.GetFirstSelectedItemPosition();
+ i = listctrl.GetNextSelectedItem(pos);
+
+ sprintf(sMessage, "Clear all compatibility flags for \"%s\"?", PrivateMaps[i].title);
+ res=MessageBox(sMessage, "DxWnd", MB_YESNO | MB_ICONQUESTION);
+ if(res!=IDYES) return;
+
+ FilePath=TargetMaps[i].path;
+ if (FilePath.GetLength()==0) return;
+
+ HKEY hk;
+ lKeyLength = 0L;
+ DWORD lType;
+ ret=RegOpenKeyEx(HKEY_CURRENT_USER,
+ "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers", 0, KEY_ALL_ACCESS, &hk);
+ if(ret){
+ if(ret != ERROR_FILE_NOT_FOUND){
+ sprintf(sMessage, "error %ld in RegOpenKeyEx HKEY_CURRENT_USER", ret);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ }
+ else {
+ ret=RegQueryValueEx(hk, TargetMaps[i].path, NULL, &lType, NULL, &lKeyLength);
+ if(ret && (ret != ERROR_FILE_NOT_FOUND)){
+ sprintf(sMessage, "error %ld in RegQueryValue hk=%lx \"%s\"", ret, hk, TargetMaps[i].path);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ if(lKeyLength > 0L) {
+ MessageBox("Found compatibility flag in HKEY_CURRENT_USER", "DxWnd", MB_OK);
+ if(ret = RegDeleteValue(hk, TargetMaps[i].path)) {
+ sprintf(sMessage, "error %ld in RegDeleteValue hk=%lx \"%s\"", ret, hk, TargetMaps[i].path);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ }
+ RegCloseKey(hk);
+ }
+
+ hk=0L;
+ lKeyLength = 0L;
+ ret=RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers", 0, KEY_ALL_ACCESS, &hk);
+ if(ret){
+ if(ret != ERROR_FILE_NOT_FOUND){
+ sprintf(sMessage, "error %ld in RegOpenKeyEx HKEY_LOCAL_MACHINE", ret);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ }
+ else{
+ ret=RegQueryValueEx(hk, TargetMaps[i].path, NULL, &lType, NULL, &lKeyLength);
+ if(ret && (ret != ERROR_FILE_NOT_FOUND)){
+ sprintf(sMessage, "error %ld in RegQueryValue hk=%lx \"%s\"", ret, hk, TargetMaps[i].path);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ if(lKeyLength > 0L) {
+ MessageBox("Found compatibility flag in HKEY_LOCAL_MACHINE", "DxWnd", MB_OK);
+ if(ret = RegDeleteValue(hk, TargetMaps[i].path)) {
+ sprintf(sMessage, "error %ld in RegDeleteValue hk=%lx \"%s\"", ret, hk, TargetMaps[i].path);
+ MessageBox(sMessage, "DxWnd", MB_OK);
+ }
+ }
+ RegCloseKey(hk);
+ }
+}
diff --git a/host/dxwndhostView.h b/host/dxwndhostView.h
index 771cde4..f9bde0d 100644
--- a/host/dxwndhostView.h
+++ b/host/dxwndhostView.h
@@ -80,6 +80,7 @@ protected:
afx_msg void OnDeleteLog();
afx_msg void OnDebugView();
afx_msg void OnSetRegistry();
+ afx_msg void OnSetPath();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRun();
afx_msg void OnClearAllLogs();
@@ -98,6 +99,8 @@ protected:
afx_msg void OnDesktopcolordepth16bpp();
afx_msg void OnDesktopcolordepth24bpp();
afx_msg void OnDesktopcolordepth32bpp();
+ afx_msg void OnRecoverScreenMode();
+ afx_msg void OnClearCompatibilityFlags();
afx_msg void OnMoveTop();
afx_msg void OnMoveUp();
afx_msg void OnMoveDown();
diff --git a/host/resource b/host/resource
index 9cc79cd..ac1b3f7 100644
Binary files a/host/resource and b/host/resource differ