From 534fea9b2d46ddbe51b3841f2ca6af2e468f5c00 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 3 Dec 2011 17:47:07 +0000 Subject: Dbx_mmap_SA: fixed options page showing Dbtool: fixed dbtool starting fixed version info git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@237 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- Dbx_mmap_SA/Dbtool/Version.h | 9 ++ Dbx_mmap_SA/Dbtool/Version.rc | 38 +++++ Dbx_mmap_SA/Dbtool/cleaning.cpp | 4 +- Dbx_mmap_SA/Dbtool/database.h | 4 - Dbx_mmap_SA/Dbtool/dbtool.exe.manifest | 10 +- Dbx_mmap_SA/Dbtool/dbtool.h | 16 +- Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj | 216 ++++++++++++++++----------- Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters | 36 ++--- Dbx_mmap_SA/Dbtool/fileaccess.cpp | 4 +- Dbx_mmap_SA/Dbtool/finished.cpp | 4 +- Dbx_mmap_SA/Dbtool/modulechain.cpp | 12 +- Dbx_mmap_SA/Dbtool/openerror.cpp | 4 +- Dbx_mmap_SA/Dbtool/progress.cpp | 6 +- Dbx_mmap_SA/Dbtool/resource.rc | 48 +----- Dbx_mmap_SA/Dbtool/selectdb.cpp | 12 +- Dbx_mmap_SA/Dbtool/welcome.cpp | 4 +- Dbx_mmap_SA/Dbtool/wizard.cpp | 12 +- 17 files changed, 243 insertions(+), 196 deletions(-) create mode 100644 Dbx_mmap_SA/Dbtool/Version.h create mode 100644 Dbx_mmap_SA/Dbtool/Version.rc (limited to 'Dbx_mmap_SA/Dbtool') diff --git a/Dbx_mmap_SA/Dbtool/Version.h b/Dbx_mmap_SA/Dbtool/Version.h new file mode 100644 index 0000000..1f262e6 --- /dev/null +++ b/Dbx_mmap_SA/Dbtool/Version.h @@ -0,0 +1,9 @@ +#include "../../../include/m_version.h" + +#define __FILEVERSION_STRING MIRANDA_VERSION_FILEVERSION +#define __VERSION_STRING MIRANDA_VERSION_STRING +#define __VERSION_DWORD MIRANDA_VERSION_DWORD +#define __INTERNAL_NAME "dbtool" +#define __FILENAME "dbtool.exe" +#define __DESCRIPTION "Miranda IM Database Tool" +#define __COPYRIGHT "© 2000-2011 Miranda IM project" diff --git a/Dbx_mmap_SA/Dbtool/Version.rc b/Dbx_mmap_SA/Dbtool/Version.rc new file mode 100644 index 0000000..678989d --- /dev/null +++ b/Dbx_mmap_SA/Dbtool/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#include "afxres.h" +#include "version.h" + +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#endif //_WIN32 + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __INTERNAL_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __DESCRIPTION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/Dbx_mmap_SA/Dbtool/cleaning.cpp b/Dbx_mmap_SA/Dbtool/cleaning.cpp index 4efc303..efbbde1 100644 --- a/Dbx_mmap_SA/Dbtool/cleaning.cpp +++ b/Dbx_mmap_SA/Dbtool/cleaning.cpp @@ -18,9 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbtool.h" -BOOL CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn; switch(message) { diff --git a/Dbx_mmap_SA/Dbtool/database.h b/Dbx_mmap_SA/Dbtool/database.h index 91e80d5..aa73d16 100644 --- a/Dbx_mmap_SA/Dbtool/database.h +++ b/Dbx_mmap_SA/Dbtool/database.h @@ -53,10 +53,6 @@ DBHeader #include struct DBHeader { BYTE signature[16]; // 'Miranda ICQ DB',0,26 - /* - DWORD version; //as 4 bytes, ie 1.2.3.10=0x0102030a - //this version is 0x00000700 - */ WORD checkWord; WORD cryptorUID; diff --git a/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest b/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest index dd678ff..1b6aab6 100644 --- a/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest +++ b/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest @@ -1,5 +1,4 @@ - Miranda + + + + + + + Unicode true - - Application - false - Unicode - true - Application false Unicode - - Application - false - Unicode - Application false MultiByte true - + Application false MultiByte + + + Application + false + Unicode true - + + Unicode + + Application false MultiByte + true Application @@ -90,22 +88,22 @@ - + - + - + - + - + - + @@ -113,74 +111,74 @@ - <_ProjectFileVersion>10.0.30319.1 + <_ProjectFileVersion>10.0.30128.1 $(SolutionDir)$(Configuration)\ - $(SolutionDir)\$(Configuration) $(Platform)\ $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ - $(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\ - true - true + true + $(SolutionDir)$(Configuration)64\ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ + true $(SolutionDir)$(Configuration)\ - $(SolutionDir)\$(Configuration) $(Platform)\ $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ - $(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\ true + $(SolutionDir)$(Configuration)64\ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ true - - $(SolutionDir)$(Configuration)\ - $(SolutionDir)\$(Configuration) $(Platform)\ $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ - $(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\ - false - false + true + $(SolutionDir)$(Configuration)64\ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ + true $(SolutionDir)$(Configuration)\ - $(SolutionDir)\$(Configuration) $(Platform)\ $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ - $(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\ true + ../../../../Files/Release64/ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ true - - AllRules.ruleset - AllRules.ruleset - + AllRules.ruleset + AllRules.ruleset - AllRules.ruleset - + AllRules.ruleset + AllRules.ruleset - AllRules.ruleset - + AllRules.ruleset + AllRules.ruleset - AllRules.ruleset - + AllRules.ruleset + _DEBUG;%(PreprocessorDefinitions) true + true Win32 .\Debug/dbtool.tlb + + Disabled - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) - false + + EnableFastChecks - MultiThreadedDebug + MultiThreadedDebugDLL Use dbtool.h Level3 @@ -192,7 +190,7 @@ _DEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) true Windows false @@ -204,15 +202,20 @@ _DEBUG;%(PreprocessorDefinitions) true + true + X64 .\Debug/dbtool.tlb + + Disabled - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) - false + + EnableFastChecks - MultiThreadedDebug + MultiThreadedDebugDLL Use dbtool.h Level3 @@ -224,31 +227,35 @@ _DEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) + type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true Windows false $(IntDir)$(TargetName).lib + MachineX64 NDEBUG;%(PreprocessorDefinitions) true + true Win32 .\Release/dbtool.tlb + + Full OnlyExplicitInline - false Size true - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) true false - MultiThreaded + MultiThreadedDLL true Use dbtool.h @@ -256,12 +263,16 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + true + false + false + Fast NDEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true true @@ -279,19 +290,22 @@ NDEBUG;%(PreprocessorDefinitions) true + true + X64 .\Release/dbtool.tlb + + Full OnlyExplicitInline - false Size true - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) true false - MultiThreaded + MultiThreadedDLL true Use dbtool.h @@ -299,13 +313,17 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + true + false + false + Fast NDEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) - type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) + comctl32.lib;%(AdditionalDependencies) + type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true true $(OutDir)$(ProjectName).map @@ -315,22 +333,27 @@ UseLinkTimeCodeGeneration false $(IntDir)$(TargetName).lib + MachineX64 _DEBUG;%(PreprocessorDefinitions) true + true Win32 .\Debug/dbtool.tlb + + Disabled - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) - false + + EnableFastChecks - MultiThreadedDebug + MultiThreadedDebugDLL Use dbtool.h Level3 @@ -342,7 +365,7 @@ _DEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) true Windows false @@ -354,15 +377,20 @@ _DEBUG;%(PreprocessorDefinitions) true + true + X64 .\Debug/dbtool.tlb + + Disabled - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) _DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) - false + + EnableFastChecks - MultiThreadedDebug + MultiThreadedDebugDLL Use dbtool.h Level3 @@ -374,30 +402,35 @@ _DEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) + type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true Windows false $(IntDir)$(TargetName).lib + MachineX64 NDEBUG;%(PreprocessorDefinitions) true + true Win32 .\Release/dbtool.tlb + + Full OnlyExplicitInline Size true - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../miranda/include;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) true false - MultiThreaded + MultiThreadedDLL true Use dbtool.h @@ -405,37 +438,43 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + true + false + false + Fast NDEBUG;%(PreprocessorDefinitions) - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) + comctl32.lib;%(AdditionalDependencies) type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true - true - $(OutDir)$(ProjectName).map - Windows true true UseLinkTimeCodeGeneration false $(IntDir)$(TargetName).lib MachineX86 + Windows NDEBUG;%(PreprocessorDefinitions) true + true + X64 .\Release/dbtool.tlb + + Full OnlyExplicitInline Size true - ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + ../../../include;../../../ExternalAPI NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions) true false @@ -447,22 +486,25 @@ ProgramDatabase Default 4996;%(DisableSpecificWarnings) + true + false + false + Fast NDEBUG;%(PreprocessorDefinitions) + ./../../include/msapi/ - odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) - type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) - true - true - $(OutDir)$(ProjectName).map - Windows + comctl32.lib;%(AdditionalDependencies) + type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies) true true UseLinkTimeCodeGeneration false $(IntDir)$(TargetName).lib + MachineX64 + Windows @@ -501,23 +543,17 @@ - + - - - - - - - + diff --git a/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters b/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters index 70650a3..202d0b3 100644 --- a/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters +++ b/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters @@ -2,21 +2,21 @@ - {4ecb028e-b6e9-4c02-90b1-dfcb80e4404c} + {72e8c0e0-409e-4656-8598-9a0c769f0e34} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - {56a4bfea-456e-40d2-8754-e25b68cc156a} + {c81aa4f4-b471-4488-909a-ab503857cb18} - {ff918fd4-40e8-4aae-8268-14d308099994} + {eccf4f04-aceb-441f-924b-ead9bbb92168} - {b6f37e6e-873d-4f50-ae49-e2bc0f6c9363} + {12ab2eb9-15e3-4147-ae4a-847ddc95c531} h;hpp;hxx;hm;inl - {7db55a81-4ee8-4583-bfd3-e616d6c619e8} + {07c47951-e20f-43c5-912f-ea300b807935} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe @@ -24,9 +24,6 @@ Source Files - - Source Files - Source Files @@ -87,6 +84,9 @@ Source Files + + Source Files + @@ -95,26 +95,14 @@ Header Files - + Header Files - - Resource Files - - - Resource Files - - - Resource Files - Resource Files - - Resource Files - Resource Files @@ -129,8 +117,8 @@ Resource Files - - - + + Resource Files + \ No newline at end of file diff --git a/Dbx_mmap_SA/Dbtool/fileaccess.cpp b/Dbx_mmap_SA/Dbtool/fileaccess.cpp index 5571406..2fdd16c 100644 --- a/Dbx_mmap_SA/Dbtool/fileaccess.cpp +++ b/Dbx_mmap_SA/Dbtool/fileaccess.cpp @@ -18,9 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbtool.h" -BOOL CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn; switch(message) { diff --git a/Dbx_mmap_SA/Dbtool/finished.cpp b/Dbx_mmap_SA/Dbtool/finished.cpp index 145d5d5..1716f72 100644 --- a/Dbx_mmap_SA/Dbtool/finished.cpp +++ b/Dbx_mmap_SA/Dbtool/finished.cpp @@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "dbtool.h" #define WM_LAUNCHMIRANDA (WM_USER+1) -BOOL CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn; switch(message) { diff --git a/Dbx_mmap_SA/Dbtool/modulechain.cpp b/Dbx_mmap_SA/Dbtool/modulechain.cpp index 6e150f7..515ec9b 100644 --- a/Dbx_mmap_SA/Dbtool/modulechain.cpp +++ b/Dbx_mmap_SA/Dbtool/modulechain.cpp @@ -96,7 +96,17 @@ int WorkModuleChain(int firstTime) modChain[i].ofsNew = modChain[iCurrentModName].ofsNew; n++; } - if (n) AddToStatus(STATUS_WARNING,TranslateT("Module name '%s' is not unique: %d duplicates found)"), modChain[iCurrentModName].name,n); + if (n) { + TCHAR *pszModuleName; +#ifdef UNICODE + TCHAR szModuleName[257]; + MultiByteToWideChar(CP_ACP, 0, modChain[iCurrentModName].name, -1, szModuleName, sizeof(szModuleName) / sizeof(TCHAR)); + pszModuleName = szModuleName; +#else + pszModuleName = modChain[iCurrentModName].name; +#endif + AddToStatus(STATUS_WARNING,TranslateT("Module name '%s' is not unique: %d duplicates found)"), pszModuleName, n); + } } if(iCurrentModName==0) dbhdr.ofsFirstModuleName=modChain[iCurrentModName].ofsNew; diff --git a/Dbx_mmap_SA/Dbtool/openerror.cpp b/Dbx_mmap_SA/Dbtool/openerror.cpp index be51edf..292d688 100644 --- a/Dbx_mmap_SA/Dbtool/openerror.cpp +++ b/Dbx_mmap_SA/Dbtool/openerror.cpp @@ -18,9 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbtool.h" -BOOL CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn; switch(message) { diff --git a/Dbx_mmap_SA/Dbtool/progress.cpp b/Dbx_mmap_SA/Dbtool/progress.cpp index 08b3fd8..4b7d797 100644 --- a/Dbx_mmap_SA/Dbtool/progress.cpp +++ b/Dbx_mmap_SA/Dbtool/progress.cpp @@ -64,9 +64,9 @@ void ProcessingDone(void) SendMessage(hdlgProgress,WM_PROCESSINGDONE,0,0); } -BOOL CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; static int fontHeight,listWidth; static int manualAbort; static HFONT hBoldFont = NULL; @@ -140,7 +140,7 @@ BOOL CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam break; } if(bold) hoFont=(HFONT)SelectObject(dis->hDC,hBoldFont); - ExtTextOut(dis->hDC,dis->rcItem.left,dis->rcItem.top,ETO_CLIPPED|ETO_OPAQUE,&dis->rcItem,str, (int)_tcslen(str),NULL); + ExtTextOut(dis->hDC,dis->rcItem.left,dis->rcItem.top,ETO_CLIPPED|ETO_OPAQUE,&dis->rcItem,str,(UINT)_tcslen(str),NULL); if(bold) SelectObject(dis->hDC,hoFont); return TRUE; } diff --git a/Dbx_mmap_SA/Dbtool/resource.rc b/Dbx_mmap_SA/Dbtool/resource.rc index 5cbe277..7aa4cba 100644 --- a/Dbx_mmap_SA/Dbtool/resource.rc +++ b/Dbx_mmap_SA/Dbtool/resource.rc @@ -13,12 +13,12 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// Russian resources +// Neutral resources -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) #ifdef _WIN32 -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -351,45 +351,7 @@ IDI_PROFILEYELLOW ICON "res\\profiley.ico" IDI_PROFILERED ICON "res\\profiler.ico" IDI_BAD ICON "res\\delete.ico" -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,8,2,0 - PRODUCTVERSION 0,8,2,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Miranda IM Database Tool" - VALUE "FileVersion", "0.8.2.0" - VALUE "InternalName", "dbtool" - VALUE "LegalCopyright", "Copyright © 2001-2008 Richard Hughes, Bio" - VALUE "OriginalFilename", "dbtool.exe" - VALUE "ProductName", "Miranda Database Tool" - VALUE "ProductVersion", "0.8.2.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x809, 1200 - END -END - -#endif // English (U.K.) resources +#endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// diff --git a/Dbx_mmap_SA/Dbtool/selectdb.cpp b/Dbx_mmap_SA/Dbtool/selectdb.cpp index f20de36..d8fa36e 100644 --- a/Dbx_mmap_SA/Dbtool/selectdb.cpp +++ b/Dbx_mmap_SA/Dbtool/selectdb.cpp @@ -128,9 +128,9 @@ TCHAR *addstring(TCHAR *str, TCHAR *add) { return str + _tcslen(add) + 1; } -BOOL CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { - BOOL bReturn; + INT_PTR bReturn; if ( DoMyControlProcessing( hdlg, message, wParam, lParam, &bReturn )) return bReturn; @@ -178,19 +178,19 @@ BOOL CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam _tcscpy(szMirandaProfiles, szMirandaPath); _tcscat(szMirandaProfiles, _T("\\Profiles")); - GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir)); + // search in profile dir (using ini file) if( lstrcmpi(szProfileDir,szMirandaProfiles) ) FindAdd(hdlg, szProfileDir, _T("[ini]\\")); FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\")); // search in current dir (as DBTOOL) - FindAdd(hdlg, szMirandaPath, _T("[ . ]\\")); + FindAdd(hdlg, szMirandaPath, _T("[ . ]\\")); // search in profile dir (using registry path + ini file) - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("SOFTWARE\\Miranda"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) { - if(RegQueryValueEx(hKey,_T("Install_Dir"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) { + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) { + if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) { if( lstrcmp(szProfileDir,szMirandaPath) ) { GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir)); FindAdd(hdlg, szProfileDir, _T("[reg]\\")); diff --git a/Dbx_mmap_SA/Dbtool/welcome.cpp b/Dbx_mmap_SA/Dbtool/welcome.cpp index 99d53af..291281e 100644 --- a/Dbx_mmap_SA/Dbtool/welcome.cpp +++ b/Dbx_mmap_SA/Dbtool/welcome.cpp @@ -18,11 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbtool.h" -BOOL CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam) { static HENHMETAFILE hEmfWatermark; static HFONT hTitleFont; - BOOL bReturn; + INT_PTR bReturn; if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn; switch(message) { diff --git a/Dbx_mmap_SA/Dbtool/wizard.cpp b/Dbx_mmap_SA/Dbtool/wizard.cpp index 8893b36..499b420 100644 --- a/Dbx_mmap_SA/Dbtool/wizard.cpp +++ b/Dbx_mmap_SA/Dbtool/wizard.cpp @@ -54,7 +54,7 @@ static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd,LPARAM lParam) return TRUE; } -int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,BOOL *bReturn) +int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT_PTR *bReturn) { switch(message) { case WM_INITDIALOG: @@ -68,18 +68,18 @@ int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,BOO return TRUE; } if((GetWindowLongPtr((HWND)lParam,GWL_STYLE)&0xFFFF)==0) { - char szText[256]; - GetWindowTextA((HWND)lParam,szText,sizeof(szText)); - if(!strcmp(szText,"whiterect")) { + TCHAR szText[256]; + GetWindowText((HWND)lParam,szText,SIZEOF(szText)); + if(!_tcscmp(szText,_T("whiterect"))) { SetTextColor((HDC)wParam,RGB(255,255,255)); SetBkColor((HDC)wParam,RGB(255,255,255)); SetBkMode((HDC)wParam,OPAQUE); - *bReturn=(BOOL)GetStockObject(WHITE_BRUSH); + *bReturn=(INT_PTR)GetStockObject(WHITE_BRUSH); return TRUE; } else { SetBkMode((HDC)wParam,TRANSPARENT); - *bReturn=(BOOL)GetStockObject(NULL_BRUSH); + *bReturn=(INT_PTR)GetStockObject(NULL_BRUSH); return TRUE; } } -- cgit v1.2.3