Commit 4cfce24f authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Complete the unicodification of comctl32undoc.

parent 04881fae
...@@ -88,6 +88,8 @@ typedef struct _LOADDATA ...@@ -88,6 +88,8 @@ typedef struct _LOADDATA
typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM); typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM);
static const WCHAR strMRUList[] = { 'M','R','U','L','i','s','t',0 };
/************************************************************************** /**************************************************************************
* DPA_LoadStream [COMCTL32.9] * DPA_LoadStream [COMCTL32.9]
* *
...@@ -558,7 +560,7 @@ typedef struct tagWINEMRULIST ...@@ -558,7 +560,7 @@ typedef struct tagWINEMRULIST
BOOL isUnicode; /* is compare fn Unicode */ BOOL isUnicode; /* is compare fn Unicode */
DWORD wineFlags; /* internal flags */ DWORD wineFlags; /* internal flags */
DWORD cursize; /* current size of realMRU */ DWORD cursize; /* current size of realMRU */
LPSTR realMRU; /* pointer to string of index names */ LPWSTR realMRU; /* pointer to string of index names */
LPWINEMRUITEM *array; /* array of pointers to data */ LPWINEMRUITEM *array; /* array of pointers to data */
/* in 'a' to 'z' order */ /* in 'a' to 'z' order */
} WINEMRULIST, *LPWINEMRULIST; } WINEMRULIST, *LPWINEMRULIST;
...@@ -603,12 +605,12 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp ) ...@@ -603,12 +605,12 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
} }
if (mp->wineFlags & WMRUF_CHANGED) { if (mp->wineFlags & WMRUF_CHANGED) {
mp->wineFlags &= ~WMRUF_CHANGED; mp->wineFlags &= ~WMRUF_CHANGED;
err = RegSetValueExA(newkey, "MRUList", 0, REG_SZ, err = RegSetValueExW(newkey, strMRUList, 0, REG_SZ, (LPBYTE)mp->realMRU,
mp->realMRU, strlen(mp->realMRU) + 1); (strlenW(mp->realMRU) + 1)*sizeof(WCHAR));
if (err) { if (err) {
ERR("error saving MRUList, err=%d\n", err); ERR("error saving MRUList, err=%d\n", err);
} }
TRACE("saving MRUList=/%s/\n", mp->realMRU); TRACE("saving MRUList=/%s/\n", debugstr_w(mp->realMRU));
} }
realname[1] = 0; realname[1] = 0;
for(i=0; i<mp->cursize; i++) { for(i=0; i<mp->cursize; i++) {
...@@ -768,7 +770,7 @@ INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData) ...@@ -768,7 +770,7 @@ INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
if ((replace = FindMRUData (hList, lpData, cbData, NULL)) >= 0) { if ((replace = FindMRUData (hList, lpData, cbData, NULL)) >= 0) {
/* Item exists, just move it to the front */ /* Item exists, just move it to the front */
LPSTR pos = strchr(mp->realMRU, replace + 'a'); LPWSTR pos = strchrW(mp->realMRU, replace + 'a');
while (pos > mp->realMRU) while (pos > mp->realMRU)
{ {
pos[0] = pos[-1]; pos[0] = pos[-1];
...@@ -961,7 +963,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp) ...@@ -961,7 +963,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
/* get space to save indices that will turn into names /* get space to save indices that will turn into names
* but in order of most to least recently used * but in order of most to least recently used
*/ */
mp->realMRU = Alloc(mp->extview.nMaxItems + 2); mp->realMRU = Alloc((mp->extview.nMaxItems + 2) * sizeof(WCHAR));
/* get space to save pointers to actual data in order of /* get space to save pointers to actual data in order of
* 'a' to 'z' (0 to n). * 'a' to 'z' (0 to n).
...@@ -988,14 +990,14 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp) ...@@ -988,14 +990,14 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
/* get values from key 'MRUList' */ /* get values from key 'MRUList' */
if (newkey) { if (newkey) {
datasize = mp->extview.nMaxItems + 1; datasize = mp->extview.nMaxItems + 1;
if((err=RegQueryValueExA( newkey, "MRUList", 0, &type, mp->realMRU, if((err=RegQueryValueExW( newkey, strMRUList, 0, &type,
&datasize))) { (LPBYTE)mp->realMRU, &datasize))) {
/* not present - set size to 1 (will become 0 later) */ /* not present - set size to 1 (will become 0 later) */
datasize = 1; datasize = 1;
*mp->realMRU = 0; *mp->realMRU = 0;
} }
TRACE("MRU list = %s, datasize = %ld\n", mp->realMRU, datasize); TRACE("MRU list = %s, datasize = %ld\n", debugstr_w(mp->realMRU), datasize);
mp->cursize = datasize - 1; mp->cursize = datasize - 1;
/* datasize now has number of items in the MRUList */ /* datasize now has number of items in the MRUList */
...@@ -2366,7 +2368,7 @@ static LRESULT DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr) ...@@ -2366,7 +2368,7 @@ static LRESULT DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr)
lpNmh->code = uCode; lpNmh->code = uCode;
} }
return SendMessageA (lpNotify->hwndTo, WM_NOTIFY, idFrom, (LPARAM)lpNmh); return SendMessageW (lpNotify->hwndTo, WM_NOTIFY, idFrom, (LPARAM)lpNmh);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment