summaryrefslogtreecommitdiff
path: root/Dbx_mmap_SA/Dbtool/selectdb.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-12-03 17:47:07 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-12-03 17:47:07 +0000
commit534fea9b2d46ddbe51b3841f2ca6af2e468f5c00 (patch)
tree450c080d226f53cd1bfc8e100eacfdf84a45504e /Dbx_mmap_SA/Dbtool/selectdb.cpp
parent331bd873e62c59d7e188eb7054c5abd46eeba15a (diff)
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
Diffstat (limited to 'Dbx_mmap_SA/Dbtool/selectdb.cpp')
-rw-r--r--Dbx_mmap_SA/Dbtool/selectdb.cpp12
1 files changed, 6 insertions, 6 deletions
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]\\"));