|
|
@ -114,6 +114,7 @@ void CSnapshotToolDlg::stringFromRegistry(HKEY hKey, const TCHAR *name, CString
|
|
|
|
DWORD type;
|
|
|
|
DWORD type;
|
|
|
|
DWORD size;
|
|
|
|
DWORD size;
|
|
|
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
|
|
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
|
|
|
|
|
|
|
|
|
|
|
if (type != REG_SZ || result != ERROR_SUCCESS || size == 0)
|
|
|
|
if (type != REG_SZ || result != ERROR_SUCCESS || size == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dest = defaultStr;
|
|
|
|
dest = defaultStr;
|
|
|
@ -144,18 +145,22 @@ template <class T, class U> void integralTypeFromRegistry(HKEY hKey, const TCHAR
|
|
|
|
DWORD type;
|
|
|
|
DWORD type;
|
|
|
|
DWORD size;
|
|
|
|
DWORD size;
|
|
|
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
|
|
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
|
|
|
|
|
|
|
|
|
|
|
if (type != REG_DWORD || result != ERROR_SUCCESS || size == 0)
|
|
|
|
if (type != REG_DWORD || result != ERROR_SUCCESS || size == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dest = (T) defaultValue;
|
|
|
|
dest = (T) defaultValue;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DWORD value;
|
|
|
|
DWORD value;
|
|
|
|
result = RegQueryValueEx(hKey, name, NULL, &type, LPBYTE(&value), &size);
|
|
|
|
result = RegQueryValueEx(hKey, name, NULL, &type, LPBYTE(&value), &size);
|
|
|
|
|
|
|
|
|
|
|
|
if (result != ERROR_SUCCESS)
|
|
|
|
if (result != ERROR_SUCCESS)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dest = defaultValue;
|
|
|
|
dest = defaultValue;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dest = (T) value;
|
|
|
|
dest = (T) value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -175,6 +180,7 @@ void CSnapshotToolDlg::fromRegistry()
|
|
|
|
NLMISC::splitString(tStrToUtf8(filters), ",", filterList);
|
|
|
|
NLMISC::splitString(tStrToUtf8(filters), ",", filterList);
|
|
|
|
|
|
|
|
|
|
|
|
m_Filters.ResetContent();
|
|
|
|
m_Filters.ResetContent();
|
|
|
|
|
|
|
|
|
|
|
|
for (uint k = 0; k < filterList.size(); ++k)
|
|
|
|
for (uint k = 0; k < filterList.size(); ++k)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_Filters.AddString(utf8ToTStr(filterList[k]));
|
|
|
|
m_Filters.AddString(utf8ToTStr(filterList[k]));
|
|
|
@ -431,7 +437,6 @@ void CSnapshotToolDlg::OnGo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// make sure that the screen can contains the window client area
|
|
|
|
// make sure that the screen can contains the window client area
|
|
|
|
RECT desktopSize;
|
|
|
|
RECT desktopSize;
|
|
|
|
::GetClientRect(::GetDesktopWindow(), &desktopSize);
|
|
|
|
::GetClientRect(::GetDesktopWindow(), &desktopSize);
|
|
|
|