mirror of
https://github.com/reactos/reactos.git
synced 2024-07-13 16:15:05 +00:00
Add a new cursor scheme to the scheme list and select it after it has been saved.
svn path=/trunk/; revision=26524
This commit is contained in:
parent
66b0c897a2
commit
f2e37886f7
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
//TODO:
|
//TODO:
|
||||||
// add missing icons
|
// add missing icons
|
||||||
// Options- pointer precision
|
|
||||||
|
|
||||||
#define WINVER 0x0501
|
#define WINVER 0x0501
|
||||||
|
|
||||||
|
@ -690,7 +689,7 @@ SaveCursorScheme(HWND hwndDlg)
|
||||||
LPTSTR lpSchemeData;
|
LPTSTR lpSchemeData;
|
||||||
HKEY hCuKey;
|
HKEY hCuKey;
|
||||||
HKEY hCuCursorKey;
|
HKEY hCuCursorKey;
|
||||||
LONG lResult = ERROR_SUCCESS;
|
LONG lError = ERROR_SUCCESS;
|
||||||
BOOL bSchemeExists;
|
BOOL bSchemeExists;
|
||||||
|
|
||||||
LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH);
|
LoadString(hApplet, IDS_SYSTEM_SCHEME, szSystemScheme, MAX_PATH);
|
||||||
|
@ -775,15 +774,25 @@ SaveCursorScheme(HWND hwndDlg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
lResult = RegSetValueEx(hCuCursorKey, szNewSchemeName, 0, REG_EXPAND_SZ,
|
lError = RegSetValueEx(hCuCursorKey, szNewSchemeName, 0, REG_EXPAND_SZ,
|
||||||
(LPBYTE)lpSchemeData, nLength * sizeof(TCHAR));
|
(LPBYTE)lpSchemeData, nLength * sizeof(TCHAR));
|
||||||
|
|
||||||
RegCloseKey(hCuCursorKey);
|
RegCloseKey(hCuCursorKey);
|
||||||
RegCloseKey(hCuKey);
|
RegCloseKey(hCuKey);
|
||||||
|
|
||||||
|
/* Add the new scheme to the scheme list and select it */
|
||||||
|
if (lError == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
LPTSTR copy = _tcsdup(lpSchemeData);
|
||||||
|
|
||||||
|
nSel = SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_ADDSTRING, (WPARAM)0, (LPARAM)szNewSchemeName);
|
||||||
|
SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_SETITEMDATA, (WPARAM)nSel, (LPARAM)copy);
|
||||||
|
SendDlgItemMessage(hwndDlg, IDC_COMBO_CURSOR_SCHEME, CB_SETCURSEL, (WPARAM)nSel, (LPARAM)0);
|
||||||
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpSchemeData);
|
HeapFree(GetProcessHeap(), 0, lpSchemeData);
|
||||||
|
|
||||||
return (lResult == ERROR_SUCCESS);
|
return (lError == ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue