diff options
Diffstat (limited to 'Dbx_mmap_SA/Dbtool/selectdb.cpp')
-rw-r--r-- | Dbx_mmap_SA/Dbtool/selectdb.cpp | 12 |
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]\\"));
|