Revision: 3625
http://svn.sourceforge.net/winmerge/?rev=3625&view=rev
Author: kimmov
Date: 2006-09-23 13:16:47 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Fix Visual C 6 compile by backouting (partly) patches:
- Fix 64-bit pointer truncation in SetWindowLongPtr call (the last I hope)
- PATCH: [ 1561796 ] Get/SetWindowLong not supported in 64-bit Windows
- BUG: [ 1561781 ] 64-bit compile errors from 7zCommon.cpp
Modified Paths:
--------------
branches/R2_6/Src/7zCommon.cpp
branches/R2_6/Src/Changes.txt
branches/R2_6/Src/ChildFrm.cpp
branches/R2_6/Src/Common/CSubclass.cpp
branches/R2_6/Src/Common/MessageBoxDialog.cpp
branches/R2_6/Src/Common/MessageBoxDialog.h
branches/R2_6/Src/Common/sizecbar.cpp
Modified: branches/R2_6/Src/7zCommon.cpp
===================================================================
--- branches/R2_6/Src/7zCommon.cpp 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/7zCommon.cpp 2006-09-23 20:16:47 UTC (rev 3625)
@@ -199,7 +199,7 @@
static const DWORD m_dwVer7zRecommended;
static const TCHAR m_strRegistryKey[];
static const TCHAR m_strDownloadURL[];
- static INT_PTR CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
+ static BOOL CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
static DWORD FormatVersion(LPTSTR, LPTSTR, DWORD);
};
@@ -363,7 +363,7 @@
/**
* @brief DLGPROC for C7ZipMismatchException's ReportError() popup.
*/
-INT_PTR CALLBACK C7ZipMismatchException::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+BOOL CALLBACK C7ZipMismatchException::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
@@ -483,7 +483,7 @@
if (hCursor)
{
SetCursor(hCursor);
- SetWindowLongPtr(hWnd, DWLP_MSGRESULT, 1);
+ SetWindowLong(hWnd, DWL_MSGRESULT, 1);
return TRUE;
}
} return FALSE;
@@ -522,7 +522,7 @@
*/
int C7ZipMismatchException::ReportError(UINT nType, UINT nMessageID)
{
- UINT_PTR response = -1;
+ short response = -1;
m_bShowAllways = nMessageID;
if (!m_bShowAllways)
{
@@ -658,7 +658,7 @@
/**
* @brief Callback to pass to EnumResourceLanguages.
*/
-BOOL CALLBACK FindNextResLang(HANDLE hModule, LPCTSTR lpType, LPCTSTR lpName, WORD wLanguage, LONG_PTR lParam)
+BOOL CALLBACK FindNextResLang(HMODULE hModule, LPCTSTR lpType, LPCTSTR lpName, WORD wLanguage, LONG lParam)
{
LPWORD pwLanguage = (LPWORD)lParam;
WORD wPrevious = *pwLanguage;
@@ -736,7 +736,7 @@
if (HINSTANCE hinstLang = AfxGetResourceHandle())
{
WORD wLangID = 0;
- if (EnumResourceLanguages(hinstLang, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), (ENUMRESLANGPROC)FindNextResLang, (LPARAM)&wLangID) == 0)
+ if (EnumResourceLanguages(hinstLang, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), FindNextResLang, (LPARAM)&wLangID) == 0)
{
flags |= wLangID << 16;
}
Modified: branches/R2_6/Src/Changes.txt
===================================================================
--- branches/R2_6/Src/Changes.txt 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/Changes.txt 2006-09-23 20:16:47 UTC (rev 3625)
@@ -2,6 +2,14 @@
Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-09-23 Kimmo
+ Fix Visual C 6 compile by backouting (partly) patches:
+ - Fix 64-bit pointer truncation in SetWindowLongPtr call (the last I hope)
+ - PATCH: [ 1561796 ] Get/SetWindowLong not supported in 64-bit Windows
+ - BUG: [ 1561781 ] 64-bit compile errors from 7zCommon.cpp
+ Src: 7zCommon.cpp ChildFrm.cpp
+ Src/Common: CSubclass.cpp MessageBoxDialog.cpp MessageBoxDialog.h sizecbar.cpp
+
2006-09-21 WinMerge experimental release 2.5.7.1 (SVN revision 3600)
2006-09-21 Kimmo
Modified: branches/R2_6/Src/ChildFrm.cpp
===================================================================
--- branches/R2_6/Src/ChildFrm.cpp 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/ChildFrm.cpp 2006-09-23 20:16:47 UTC (rev 3625)
@@ -361,7 +361,7 @@
EnumChildWindows(hwnd, EnumChildProc, FALSE);
- pfnOldWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc);
+ pfnOldWndProc = (WNDPROC)SetWindowLong(hwnd, GWL_WNDPROC, (LONG)WndProc);
SetProp(hwnd, _T("OldWndProc"), (HANDLE)pfnOldWndProc);
return TRUE;
}
@@ -373,7 +373,7 @@
{
WNDPROC pfnOldWndProc = (WNDPROC)RemoveProp(hwnd, _T("OldWndProc"));
if (pfnOldWndProc)
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)pfnOldWndProc);
+ SetWindowLong(hwnd, GWL_WNDPROC, (LONG)pfnOldWndProc);
EnumChildWindows(hwnd, EnumChildProc, TRUE);
Modified: branches/R2_6/Src/Common/CSubclass.cpp
===================================================================
--- branches/R2_6/Src/Common/CSubclass.cpp 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/Common/CSubclass.cpp 2006-09-23 20:16:47 UTC (rev 3625)
@@ -2,7 +2,7 @@
\file CSubclass.cpp
\author Perry Rapp, Creator, 1998-2003
\date Created: 1998
- \date Edited: 2006/09/20 Kimmo Varis: use Get/SetWindowLongPtr().
+ \date Edited: 2001/12/12 PR
\brief Implementation of CSubclass
@@ -83,7 +83,7 @@
SubclassRec sdata;
sdata.m_data = data;
sdata.m_newproc = wndproc;
- sdata.m_oldproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
+ sdata.m_oldproc = (WNDPROC) GetWindowLong(hwnd, GWL_WNDPROC);
sdata.m_suppressing = false;
if (unsubclassSucceeded)
sdata.m_succeededMsg = *unsubclassSucceeded;
@@ -93,7 +93,7 @@
sdata.m_failedMsg = *unsubclassFailed;
else
sdata.m_failedMsg.msg = 0;
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LPARAM)(WNDPROC)wndproc);
+ SetWindowLong(hwnd, GWL_WNDPROC, (LPARAM)(WNDPROC)wndproc);
pList->AddHead(sdata);
return true;
}
@@ -114,12 +114,12 @@
SubclassRec srec = pList->GetNext(pos);
if (srec.m_newproc == id)
{ // we're the latest subclass
- WNDPROC curproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
+ WNDPROC curproc = (WNDPROC) GetWindowLong(hwnd, GWL_WNDPROC);
if (id != curproc)
// We're not the current wndproc, so we can't safely unhook
return false;
ASSERT(srec.m_oldproc); // internal error
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LPARAM)(WNDPROC)srec.m_oldproc);
+ SetWindowLong(hwnd, GWL_WNDPROC, (LPARAM)(WNDPROC)srec.m_oldproc);
pList->RemoveHead();
// fall thru to garbage collect list
}
Modified: branches/R2_6/Src/Common/MessageBoxDialog.cpp
===================================================================
--- branches/R2_6/Src/Common/MessageBoxDialog.cpp 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/Common/MessageBoxDialog.cpp 2006-09-23 20:16:47 UTC (rev 3625)
@@ -394,7 +394,7 @@
* displaying the dialog. Otherwise the message box will be displayed in
* the normal way.
*/
-INT_PTR CMessageBoxDialog::DoModal ( )
+int CMessageBoxDialog::DoModal ( )
{
// Check whether the result may be retrieved from the registry.
if ( ( m_nStyle & MB_DONT_DISPLAY_AGAIN ) ||
Modified: branches/R2_6/Src/Common/MessageBoxDialog.h
===================================================================
--- branches/R2_6/Src/Common/MessageBoxDialog.h 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/Common/MessageBoxDialog.h 2006-09-23 20:16:47 UTC (rev 3625)
@@ -159,7 +159,7 @@
// Methods for handling common window functions.
// Method for displaying the dialog.
- virtual INT_PTR DoModal ( );
+ virtual int DoModal ( );
// Method for closing the dialog.
void EndDialog ( int nResult );
Modified: branches/R2_6/Src/Common/sizecbar.cpp
===================================================================
--- branches/R2_6/Src/Common/sizecbar.cpp 2006-09-23 12:40:09 UTC (rev 3624)
+++ branches/R2_6/Src/Common/sizecbar.cpp 2006-09-23 20:16:47 UTC (rev 3625)
@@ -534,7 +534,7 @@
// erase the NC background
mdc.FillRect(rcDraw, CBrush::FromHandle(
- (HBRUSH) GetClassLongPtr(m_hWnd, GCLP_HBRBACKGROUND)));
+ (HBRUSH) GetClassLong(m_hWnd, GCL_HBRBACKGROUND)));
if (m_dwSCBStyle & SCBS_SHOWEDGES)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|