Author: ekohl
Date: Fri Apr 27 03:34:48 2007
New Revision: 26527
URL:
http://svn.reactos.org/svn/reactos?rev=26527&view=rev
Log:
Remove quotation marks from the scheme data string to make main.cpl work on WinXP.
Modified:
trunk/reactos/dll/cpl/main/mouse.c
Modified: trunk/reactos/dll/cpl/main/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=2…
==============================================================================
--- trunk/reactos/dll/cpl/main/mouse.c (original)
+++ trunk/reactos/dll/cpl/main/mouse.c Fri Apr 27 03:34:48 2007
@@ -462,10 +462,23 @@
if (_tcslen(szValueData) > 0)
{
- LPTSTR copy = _tcsdup(szValueData);
+ LPTSTR lpCopy, lpStart;
+
+ /* Remove quotation marks */
+ if (szValueData[0] == _T('"'))
+ {
+ lpStart = szValueData + 1;
+ szValueData[_tcslen(szValueData) - 1] = 0;
+ }
+ else
+ {
+ lpStart = szValueData;
+ }
+
+ lpCopy = _tcsdup(lpStart);
lResult = SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0,
(LPARAM)szValueName);
- SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)copy);
+ SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)lpCopy);
}
}
@@ -491,12 +504,26 @@
if (_tcslen(szValueData) > 0)
{
- LPTSTR copy = _tcsdup(szValueData);
+ LPTSTR lpCopy, lpStart;
+
+ /* Remove quotation marks */
+ if (szValueData[0] == _T('"'))
+ {
+ lpStart = szValueData + 1;
+ szValueData[_tcslen(szValueData) - 1] = 0;
+ }
+ else
+ {
+ lpStart = szValueData;
+ }
+
+ lpCopy = _tcsdup(lpStart);
+
_tcscat(szValueName, TEXT(" "));
_tcscat(szValueName, szSystemScheme);
lResult = SendMessage(hDlgCtrl, CB_ADDSTRING, (WPARAM)0,
(LPARAM)szValueName);
- SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)copy);
+ SendMessage(hDlgCtrl, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)lpCopy);
}
}