Partial shell32 wine-sync

svn path=/trunk/; revision=24807
This commit is contained in:
Aleksey Bragin 2006-11-23 16:57:58 +00:00
parent b1d908abe5
commit 46e065bf4e
6 changed files with 247 additions and 150 deletions

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
@ -174,7 +174,7 @@ static ULONG WINAPI IAutoComplete_fnAddRef(
IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(%lu)\n", This, refCount - 1);
TRACE("(%p)->(%u)\n", This, refCount - 1);
return refCount;
}
@ -188,7 +188,7 @@ static ULONG WINAPI IAutoComplete_fnRelease(
IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(%lu)\n", This, refCount + 1);
TRACE("(%p)->(%u)\n", This, refCount + 1);
if (!refCount) {
TRACE(" destroying IAutoComplete(%p)\n",This);
@ -347,7 +347,7 @@ static ULONG WINAPI IAutoComplete2_fnAddRef(
{
IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref);
TRACE ("(%p)->(count=%u)\n", This, This->ref);
return IAutoComplete2_AddRef((IAutoComplete*)This);
}
@ -360,7 +360,7 @@ static ULONG WINAPI IAutoComplete2_fnRelease(
{
IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref);
TRACE ("(%p)->(count=%u)\n", This, This->ref);
return IAutoComplete_Release((IAutoComplete*)This);
}
@ -425,7 +425,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE("(%p) -> (0x%lx)\n", This, dwFlag);
TRACE("(%p) -> (0x%x)\n", This, dwFlag);
This->options = dwFlag;

View file

@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* FIXME:
* - many memory leaks
@ -64,7 +64,7 @@ static void FillTreeView(browse_info*, LPSHELLFOLDER,
static HTREEITEM InsertTreeViewItem( browse_info*, IShellFolder *,
LPCITEMIDLIST, LPCITEMIDLIST, IEnumIDList*, HTREEITEM);
const WCHAR szBrowseFolderInfo[] = {
static const WCHAR szBrowseFolderInfo[] = {
'_','_','W','I','N','E','_',
'B','R','S','F','O','L','D','E','R','D','L','G','_',
'I','N','F','O',0
@ -108,7 +108,7 @@ static void InitializeTreeView( browse_info *info )
Shell_GetImageList(NULL, &hImageList);
if (hImageList)
TreeView_SetImageList( info->hwndTreeView, hImageList, 0 );
SendMessageW( info->hwndTreeView, TVM_SETIMAGELIST, 0, (LPARAM)hImageList );
/* We want to call InsertTreeViewItem down the code, in order to insert
* the root item of the treeview. Due to InsertTreeViewItem's signature,
@ -132,7 +132,7 @@ static void InitializeTreeView( browse_info *info )
IShellFolder *lpsfDesktop;
hr = SHGetDesktopFolder(&lpsfDesktop);
if (!SUCCEEDED(hr)) {
WARN("SHGetDesktopFolder failed! hr = %08lx\n", hr);
WARN("SHGetDesktopFolder failed! hr = %08x\n", hr);
return;
}
hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent);
@ -140,7 +140,7 @@ static void InitializeTreeView( browse_info *info )
}
if (!SUCCEEDED(hr)) {
WARN("Could not bind to parent shell folder! hr = %08lx\n", hr);
WARN("Could not bind to parent shell folder! hr = %08x\n", hr);
return;
}
@ -152,7 +152,7 @@ static void InitializeTreeView( browse_info *info )
}
if (!SUCCEEDED(hr)) {
WARN("Could not bind to root shell folder! hr = %08lx\n", hr);
WARN("Could not bind to root shell folder! hr = %08x\n", hr);
IShellFolder_Release(lpsfParent);
return;
}
@ -160,16 +160,16 @@ static void InitializeTreeView( browse_info *info )
flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags );
hr = IShellFolder_EnumObjects( lpsfRoot, info->hWnd, flags, &pEnumChildren );
if (!SUCCEEDED(hr)) {
WARN("Could not get child iterator! hr = %08lx\n", hr);
WARN("Could not get child iterator! hr = %08x\n", hr);
IShellFolder_Release(lpsfParent);
IShellFolder_Release(lpsfRoot);
return;
}
TreeView_DeleteAllItems( info->hwndTreeView );
SendMessageW( info->hwndTreeView, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT );
item = InsertTreeViewItem( info, lpsfParent, pidlChild,
pidlParent, pEnumChildren, TVI_ROOT );
TreeView_Expand( info->hwndTreeView, item, TVE_EXPAND );
SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item );
IShellFolder_Release(lpsfRoot);
IShellFolder_Release(lpsfParent);
@ -225,14 +225,9 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR
BOOL bSuccess=TRUE;
STRRET str;
TRACE("%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
TRACE("%p %p %x %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str)))
{
if (FAILED(StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi)))
{
bSuccess = FALSE;
}
}
bSuccess = StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi);
else
bSuccess = FALSE;
@ -359,9 +354,7 @@ static void FillTreeView( browse_info *info, IShellFolder * lpsf,
done:
ReleaseCapture();
SetCursor(LoadCursorW(0, (LPWSTR)IDC_ARROW));
if (pidlTemp)
SHFree(pidlTemp);
SHFree(pidlTemp);
}
static inline BOOL PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type)
@ -445,7 +438,8 @@ static LRESULT BrsFolder_Treeview_Expand( browse_info *info, NMTREEVIEWW *pnmtv
/* My Computer is already sorted and trying to do a simple text
* sort will only mess things up */
if (!_ILIsMyComputer(lptvid->lpi))
TreeView_SortChildren(info->hwndTreeView, pnmtv->itemNew.hItem, FALSE);
SendMessageW( info->hwndTreeView, TVM_SORTCHILDREN,
FALSE, (LPARAM)pnmtv->itemNew.hItem );
return 0;
}
@ -544,6 +538,112 @@ static BOOL BrsFolder_OnCommand( browse_info *info, UINT id )
return FALSE;
}
static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection,
BOOL is_str, HTREEITEM *pItem)
{
LPITEMIDLIST pidlSelection = (LPITEMIDLIST)selection;
LPCITEMIDLIST pidlCurrent, pidlRoot;
TVITEMEXW item;
BOOL bResult = FALSE;
/* If 'selection' is a string, convert to a Shell ID List. */
if (is_str) {
IShellFolder *psfDesktop;
HRESULT hr;
hr = SHGetDesktopFolder(&psfDesktop);
if (FAILED(hr))
goto done;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL,
(LPOLESTR)selection, NULL, &pidlSelection, NULL);
IShellFolder_Release(psfDesktop);
if (FAILED(hr))
goto done;
}
/* Move pidlCurrent behind the SHITEMIDs in pidlSelection, which are the root of
* the sub-tree currently displayed. */
pidlRoot = info->lpBrowseInfo->pidlRoot;
pidlCurrent = pidlSelection;
while (!_ILIsEmpty(pidlRoot) && _ILIsEqualSimple(pidlRoot, pidlCurrent)) {
pidlRoot = ILGetNext(pidlRoot);
pidlCurrent = ILGetNext(pidlCurrent);
}
/* The given ID List is not part of the SHBrowseForFolder's current sub-tree. */
if (!_ILIsEmpty(pidlRoot))
goto done;
/* Initialize item to point to the first child of the root folder. */
memset(&item, 0, sizeof(item));
item.mask = TVIF_PARAM;
item.hItem = TreeView_GetRoot(info->hwndTreeView);
if (item.hItem)
item.hItem = TreeView_GetChild(info->hwndTreeView, item.hItem);
/* Walk the tree along the nodes corresponding to the remaining ITEMIDLIST */
while (item.hItem && !_ILIsEmpty(pidlCurrent)) {
LPTV_ITEMDATA pItemData;
SendMessageW(info->hwndTreeView, TVM_GETITEMW, 0, (LPARAM)&item);
pItemData = (LPTV_ITEMDATA)item.lParam;
if (_ILIsEqualSimple(pItemData->lpi, pidlCurrent)) {
pidlCurrent = ILGetNext(pidlCurrent);
if (!_ILIsEmpty(pidlCurrent)) {
/* Only expand current node and move on to it's first child,
* if we didn't already reach the last SHITEMID */
SendMessageW(info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item.hItem);
item.hItem = TreeView_GetChild(info->hwndTreeView, item.hItem);
}
} else {
item.hItem = TreeView_GetNextSibling(info->hwndTreeView, item.hItem);
}
}
if (_ILIsEmpty(pidlCurrent) && item.hItem)
bResult = TRUE;
done:
if (pidlSelection && pidlSelection != (LPITEMIDLIST)selection)
ILFree(pidlSelection);
if (pItem)
*pItem = item.hItem;
return bResult;
}
static BOOL BrsFolder_OnSetSelectionW(browse_info *info, LPVOID selection, BOOL is_str) {
HTREEITEM hItem;
BOOL bResult;
bResult = BrsFolder_OnSetExpanded(info, selection, is_str, &hItem);
if (bResult)
SendMessageW(info->hwndTreeView, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItem );
return bResult;
}
static BOOL BrsFolder_OnSetSelectionA(browse_info *info, LPVOID selection, BOOL is_str) {
LPWSTR selectionW = NULL;
BOOL result = FALSE;
int length;
if (!is_str)
return BrsFolder_OnSetSelectionW(info, selection, is_str);
if ((length = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, NULL, 0)) &&
(selectionW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR))) &&
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, selectionW, length))
{
result = BrsFolder_OnSetSelectionW(info, selectionW, is_str);
}
HeapFree(GetProcessHeap(), 0, selectionW);
return result;
}
/*************************************************************************
* BrsFolderDlgProc32 (not an exported API function)
*/
@ -588,25 +688,13 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
break;
case BFFM_SETSELECTIONA:
if (wParam)
FIXME("Set selection %s\n", debugstr_a((LPSTR)lParam));
else
FIXME("Set selection %p\n", (void*)lParam);
break;
return BrsFolder_OnSetSelectionA(info, (LPVOID)lParam, (BOOL)wParam);
case BFFM_SETSELECTIONW:
if (wParam)
FIXME("Set selection %s\n", debugstr_w((LPWSTR)lParam));
else
FIXME("Set selection %p\n", (void*)lParam);
break;
return BrsFolder_OnSetSelectionW(info, (LPVOID)lParam, (BOOL)wParam);
case BFFM_SETEXPANDED: /* unicode only */
if (wParam)
FIXME("Set expanded %s\n", debugstr_w((LPWSTR)lParam));
else
FIXME("Set expanded %p\n", (void*)lParam);
break;
return BrsFolder_OnSetExpanded(info, (LPVOID)lParam, (BOOL)wParam, NULL);
}
return FALSE;
}
@ -623,7 +711,8 @@ LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
BROWSEINFOW bi;
LPITEMIDLIST lpid;
INT len;
LPWSTR title;
TRACE("%p\n", lpbi);
bi.hwndOwner = lpbi->hwndOwner;
@ -639,12 +728,13 @@ LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
if (lpbi->lpszTitle)
{
len = MultiByteToWideChar( CP_ACP, 0, lpbi->lpszTitle, -1, NULL, 0 );
bi.lpszTitle = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpbi->lpszTitle, -1, (LPWSTR)bi.lpszTitle, len );
title = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpbi->lpszTitle, -1, title, len );
}
else
bi.lpszTitle = NULL;
title = NULL;
bi.lpszTitle = title;
bi.ulFlags = lpbi->ulFlags;
bi.lpfn = lpbi->lpfn;
bi.lParam = lpbi->lParam;
@ -656,7 +746,7 @@ LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
lpbi->pszDisplayName, MAX_PATH, 0, NULL);
HeapFree( GetProcessHeap(), 0, bi.pszDisplayName );
}
HeapFree(GetProcessHeap(), 0, (LPVOID)bi.lpszTitle);
HeapFree(GetProcessHeap(), 0, title);
lpbi->iImage = bi.iImage;
return lpid;
}

View file

@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
@ -178,6 +178,8 @@ void FreeChangeNotifications(void)
DeleteNode( head );
LeaveCriticalSection(&SHELL32_ChangenotifyCS);
DeleteCriticalSection(&SHELL32_ChangenotifyCS);
}
/*************************************************************************
@ -198,7 +200,7 @@ SHChangeNotifyRegister(
item = SHAlloc(sizeof(NOTIFICATIONLIST));
TRACE("(%p,0x%08x,0x%08lx,0x%08x,%d,%p) item=%p\n",
TRACE("(%p,0x%08x,0x%08x,0x%08x,%d,%p) item=%p\n",
hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item);
item->next = NULL;
@ -234,7 +236,7 @@ BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
{
LPNOTIFICATIONLIST node;
TRACE("(0x%08lx)\n", hNotify);
TRACE("(0x%08x)\n", hNotify);
EnterCriticalSection(&SHELL32_ChangenotifyCS);
@ -253,7 +255,7 @@ BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2,
DWORD unknown3, DWORD unknown4)
{
FIXME("(0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx)\n",
FIXME("(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
unknown1, unknown2, unknown3, unknown4);
return -1;
@ -283,7 +285,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
Pidls[0] = NULL;
Pidls[1] = NULL;
TRACE("(0x%08lx,0x%08x,%p,%p):stub.\n", wEventId, uFlags, dwItem1, dwItem2);
TRACE("(0x%08x,0x%08x,%p,%p):stub.\n", wEventId, uFlags, dwItem1, dwItem2);
if( ( wEventId & SHCNE_NOITEMEVENTS ) && ( dwItem1 || dwItem2 ) )
{
@ -339,10 +341,10 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
WCHAR path[MAX_PATH];
if( Pidls[0] && SHGetPathFromIDListW(Pidls[0], path ))
TRACE("notify %08lx on item1 = %s\n", wEventId, debugstr_w(path));
TRACE("notify %08x on item1 = %s\n", wEventId, debugstr_w(path));
if( Pidls[1] && SHGetPathFromIDListW(Pidls[1], path ))
TRACE("notify %08lx on item2 = %s\n", wEventId, debugstr_w(path));
TRACE("notify %08x on item2 = %s\n", wEventId, debugstr_w(path));
}
EnterCriticalSection(&SHELL32_ChangenotifyCS);
@ -380,7 +382,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
ptr->pidlSignaled = ILClone(Pidls[0]);
TRACE("notifying %s, event %s(%lx) before\n", NodeName( ptr ), DumpEvent(
TRACE("notifying %s, event %s(%x) before\n", NodeName( ptr ), DumpEvent(
wEventId ),wEventId );
ptr->wSignalledEvent |= wEventId;
@ -390,7 +392,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
else
SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId);
TRACE("notifying %s, event %s(%lx) after\n", NodeName( ptr ), DumpEvent(
TRACE("notifying %s, event %s(%x) after\n", NodeName( ptr ), DumpEvent(
wEventId ),wEventId );
}
@ -400,8 +402,8 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
/* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */
if ((typeFlag & SHCNF_PATHA) || (typeFlag & SHCNF_PRINTERA))
{
if (Pidls[0]) SHFree((LPITEMIDLIST)Pidls[0]);
if (Pidls[1]) SHFree((LPITEMIDLIST)Pidls[1]);
SHFree((LPITEMIDLIST)Pidls[0]);
SHFree((LPITEMIDLIST)Pidls[1]);
}
}
@ -419,7 +421,7 @@ DWORD WINAPI NTSHChangeNotifyRegister(
int count,
SHChangeNotifyEntry *idlist)
{
FIXME("(%p,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):semi stub.\n",
FIXME("(%p,0x%08x,0x%08x,0x%08x,0x%08x,%p):semi stub.\n",
hwnd,events1,events2,msg,count,idlist);
return (DWORD) SHChangeNotifyRegister(hwnd, events1, events2, msg, count, idlist);
@ -438,7 +440,7 @@ HANDLE WINAPI SHChangeNotification_Lock(
LPNOTIFICATIONLIST node;
LPCITEMIDLIST *idlist;
TRACE("%p %08lx %p %p\n", hChange, dwProcessId, lppidls, lpwEventId);
TRACE("%p %08x %p %p\n", hChange, dwProcessId, lppidls, lpwEventId);
/* EnterCriticalSection(&SHELL32_ChangenotifyCS); */
@ -474,7 +476,7 @@ BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock)
*/
DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1)
{
FIXME("(0x%08lx):semi stub.\n",x1);
FIXME("(0x%08x):semi stub.\n",x1);
return SHChangeNotifyDeregister( x1 );
}

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <assert.h>
@ -163,7 +163,7 @@ static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTA* cs)
#define YICON 32
#define YSTEP 64
static BOOL Control_Localize(const CPanel* panel, unsigned cx, unsigned cy,
static BOOL Control_Localize(const CPanel* panel, int cx, int cy,
CPlApplet** papplet, unsigned* psp)
{
unsigned i, x = (XSTEP-XICON)/2, y = 0;
@ -228,7 +228,7 @@ static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up)
unsigned i;
CPlApplet* applet;
if (Control_Localize(panel, LOWORD(lParam), HIWORD(lParam), &applet, &i)) {
if (Control_Localize(panel, (short)LOWORD(lParam), (short)HIWORD(lParam), &applet, &i)) {
if (up) {
if (panel->clkApplet == applet && panel->clkSP == i) {
applet->proc(applet->hWnd, CPL_DBLCLK, i, applet->info[i].lData);
@ -352,7 +352,6 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
unsigned sp = 0;
LPWSTR extraPmts = NULL;
int quoted = 0;
BOOL spSet = FALSE;
buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd));
if (!buffer) return;
@ -367,10 +366,8 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
if (beg) {
if (*beg == '@') {
sp = atoiW(beg + 1);
spSet = TRUE;
} else if (*beg == '\0') {
sp = 0;
spSet = TRUE;
} else {
extraPmts = beg;
}
@ -384,9 +381,6 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
while ((ptr = StrChrW(buffer, '"')))
memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
while ((ptr = StrChrW(extraPmts, '"')))
memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp);
Control_LoadApplet(hWnd, buffer, panel);
@ -399,13 +393,6 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
WARN("Out of bounds (%u >= %u), setting to 0\n", sp, applet->count);
sp = 0;
}
if ((extraPmts)&&(!spSet))
{
while ((lstrcmpiW(extraPmts, applet->info[sp].szName)) && (sp < applet->count))
sp++;
}
if (applet->info[sp].dwSize) {
if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts))
applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData);
@ -423,7 +410,7 @@ void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdS
{
CPanel panel;
TRACE("(%p, %p, %s, 0x%08lx)\n",
TRACE("(%p, %p, %s, 0x%08x)\n",
hWnd, hInst, debugstr_w(cmd), nCmdShow);
memset(&panel, 0, sizeof(panel));
@ -456,7 +443,7 @@ void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdSh
*/
HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
{
FIXME("%p %p 0x%08lx 0x%08lx stub\n", hWnd, hModule, w, x);
FIXME("%p %p 0x%08x 0x%08x stub\n", hWnd, hModule, w, x);
return 0;
}
@ -481,7 +468,7 @@ void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst,
WORD args[5];
SEGPTR cmdline_seg;
TRACE( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n",
TRACE( "proc %x hwnd %p inst %p cmdline %s cmdshow %d\n",
proc, hwnd, inst, debugstr_a(cmdline), cmdshow );
cmdline_seg = MapLS( cmdline );
@ -507,6 +494,6 @@ void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst,
*/
DWORD WINAPI CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6)
{
FIXME("(%p, %p, %08lx, %08lx, %08lx, %08lx): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6);
FIXME("(%p, %p, %08x, %08x, %08x, %08x): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6);
return 0x0deadbee;
}

View file

@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* NOTES:
*
@ -209,6 +209,14 @@ BOOL _ILIsValue (LPCITEMIDLIST pidl);
BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl);
BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl);
BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl);
static inline
BOOL _ILIsEqualSimple (LPCITEMIDLIST pidlA, LPCITEMIDLIST pidlB)
{
return (pidlA->mkid.cb > 0 && !memcmp(pidlA, pidlB, pidlA->mkid.cb)) ||
(!pidlA->mkid.cb && !pidlB->mkid.cb);
}
static inline
BOOL _ILIsEmpty (LPCITEMIDLIST pidl) { return _ILIsDesktop(pidl); }
/*
* simple pidls
@ -240,6 +248,7 @@ HRESULT _ILCreateFromPathW (LPCWSTR szPath, LPITEMIDLIST* ppidl);
/* Other helpers */
LPITEMIDLIST _ILCreateMyComputer (void);
LPITEMIDLIST _ILCreateMyDocuments (void);
LPITEMIDLIST _ILCreateIExplore (void);
LPITEMIDLIST _ILCreateControlPanel (void);
LPITEMIDLIST _ILCreatePrinters (void);

View file

@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* FIXME: The order by part of the background context menu should be
* buily according to the columns shown.
@ -146,7 +146,7 @@ static inline IShellViewImpl *impl_from_IViewObject( IViewObject *iface )
#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501)
#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502)
#define ID_LISTVIEW 2000
#define ID_LISTVIEW 1
#define SHV_CHANGE_NOTIFY WM_USER + 0x1111
@ -156,7 +156,7 @@ static inline IShellViewImpl *impl_from_IViewObject( IViewObject *iface )
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
/*
Items merged into the toolbar and and the filemenu
Items merged into the toolbar and the filemenu
*/
typedef struct
{ int idCommand;
@ -167,7 +167,7 @@ typedef struct
BYTE bStyle;
} MYTOOLINFO, *LPMYTOOLINFO;
MYTOOLINFO Tools[] =
static const MYTOOLINFO Tools[] =
{
{ FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, BTNS_BUTTON },
{ FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, BTNS_BUTTON },
@ -222,7 +222,7 @@ static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl)
{
TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl);
TRACE("--0x%08lx\n", ret);
TRACE("--0x%08x\n", ret);
}
return ret;
}
@ -235,7 +235,7 @@ static HRESULT OnDefaultCommand(IShellViewImpl * This)
{
TRACE("ICommDlgBrowser::OnDefaultCommand\n");
ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This);
TRACE("-- returns %08lx\n", ret);
TRACE("-- returns %08x\n", ret);
}
return ret;
}
@ -342,12 +342,17 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
This->ListViewSortInfo.nLastHeaderID = -1;
if (This->FolderSettings.fFlags & FWF_DESKTOP) {
if (0) /* FIXME: look into registry vale HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow and activate drop shadows */
ListView_SetTextBkColor(This->hWndList, CLR_NONE);
/*
* FIXME: look at the registry value
* HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow
* and activate drop shadows if necessary
*/
if (0)
SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);
else
ListView_SetTextBkColor(This->hWndList, GetSysColor(COLOR_DESKTOP));
SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP));
ListView_SetTextColor(This->hWndList, RGB(255,255,255));
SendMessageW(This->hWndList, LVM_SETTEXTCOLOR, 0, RGB(255,255,255));
}
/* UpdateShellSettings(); */
@ -361,14 +366,14 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
*/
static BOOL ShellView_InitList(IShellViewImpl * This)
{
LVCOLUMNA lvColumn;
LVCOLUMNW lvColumn;
SHELLDETAILS sd;
int i;
char szTemp[50];
WCHAR szTemp[50];
TRACE("%p\n",This);
ListView_DeleteAllItems(This->hWndList);
SendMessageW(This->hWndList, LVM_DELETEALLITEMS, 0, 0);
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
lvColumn.pszText = szTemp;
@ -381,8 +386,8 @@ static BOOL ShellView_InitList(IShellViewImpl * This)
break;
lvColumn.fmt = sd.fmt;
lvColumn.cx = sd.cxChar*8; /* chars->pixel */
StrRetToStrNA( szTemp, 50, &sd.str, NULL);
ListView_InsertColumnA(This->hWndList, i, &lvColumn);
StrRetToStrNW( szTemp, 50, &sd.str, NULL);
SendMessageW(This->hWndList, LVM_INSERTCOLUMNW, i, (LPARAM) &lvColumn);
}
}
else
@ -390,8 +395,8 @@ static BOOL ShellView_InitList(IShellViewImpl * This)
FIXME("no SF2\n");
}
ListView_SetImageList(This->hWndList, ShellSmallIconList, LVSIL_SMALL);
ListView_SetImageList(This->hWndList, ShellBigIconList, LVSIL_NORMAL);
SendMessageW(This->hWndList, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ShellSmallIconList);
SendMessageW(This->hWndList, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)ShellBigIconList);
return TRUE;
}
@ -522,9 +527,11 @@ static int LV_FindItemByPidl(
LPCITEMIDLIST pidl)
{
LVITEMA lvItem;
ZeroMemory(&lvItem, sizeof(LVITEMA));
lvItem.iSubItem = 0;
lvItem.mask = LVIF_PARAM;
for(lvItem.iItem = 0; ListView_GetItemA(This->hWndList, &lvItem); lvItem.iItem++)
for(lvItem.iItem = 0;
SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
lvItem.iItem++)
{
LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam;
HRESULT hr = IShellFolder_CompareIDs(This->pSFParent, 0, pidl, currentpidl);
@ -545,9 +552,9 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
TRACE("(%p)(pidl=%p)\n", This, pidl);
ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/
lvItem.iItem = ListView_GetItemCount(This->hWndList); /*add the item to the end of the list*/
lvItem.iSubItem = 0;
lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/
lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
@ -580,17 +587,16 @@ static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCIT
nItem = LV_FindItemByPidl(This, ILFindLastID(pidlOld));
if ( -1 != nItem )
{
ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/
lvItem.mask = LVIF_PARAM; /* only the pidl */
lvItem.iItem = nItem;
ListView_GetItemA(This->hWndList, &lvItem);
SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
SHFree((LPITEMIDLIST)lvItem.lParam);
lvItem.mask = LVIF_PARAM;
lvItem.iItem = nItem;
lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */
ListView_SetItemA(This->hWndList, &lvItem);
ListView_Update(This->hWndList, nItem);
SendMessageA(This->hWndList, LVM_SETITEMA, 0, (LPARAM) &lvItem);
SendMessageA(This->hWndList, LVM_UPDATE, nItem, 0);
return TRUE; /* FIXME: better handling */
}
return FALSE;
@ -772,19 +778,21 @@ static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu)
*/
static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu)
{ MENUITEMINFOA mii;
{
TRACE("(%p)->(submenu=%p)\n",This,hSubMenu);
if(hSubMenu)
{ /*add a separator at the correct position in the menu*/
MENUITEMINFOA mii;
static char view[] = "View";
_InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
ZeroMemory(&mii, sizeof(mii));
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;
mii.fType = MFT_STRING;
mii.dwTypeData = "View";
mii.dwTypeData = view;
mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001");
InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
}
@ -803,10 +811,7 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
LVITEMA lvItem;
UINT i = 0;
if (This->apidl)
{
SHFree(This->apidl);
}
SHFree(This->apidl);
This->cidl = ListView_GetSelectedCount(This->hWndList);
This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST));
@ -817,9 +822,10 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
{
TRACE("-- Items selected =%u\n", This->cidl);
ZeroMemory(&lvItem, sizeof(lvItem));
lvItem.mask = LVIF_STATE | LVIF_PARAM;
lvItem.stateMask = LVIS_SELECTED;
lvItem.iItem = 0;
lvItem.iSubItem = 0;
while(ListView_GetItemA(This->hWndList, &lvItem) && (i < This->cidl))
{
@ -1191,7 +1197,7 @@ static LRESULT ShellView_OnKillFocus(IShellViewImpl * This)
*/
static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd)
{
TRACE("(%p)->(0x%08lx 0x%08lx %p) stub\n",This, dwCmdID, dwCmd, hwndCmd);
TRACE("(%p)->(0x%08x 0x%08x %p) stub\n",This, dwCmdID, dwCmd, hwndCmd);
switch(dwCmdID)
{
@ -1227,11 +1233,11 @@ static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dw
This->ListViewSortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30);
This->ListViewSortInfo.bIsAscending = TRUE;
This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID;
ListView_SortItems(This->hWndList, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo)));
SendMessageA(This->hWndList, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_ListViewCompareItems);
break;
default:
TRACE("-- COMMAND 0x%04lx unhandled\n", dwCmdID);
TRACE("-- COMMAND 0x%04x unhandled\n", dwCmdID);
}
return 0;
}
@ -1323,7 +1329,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
}
This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID;
ListView_SortItems(lpnmlv->hdr.hwndFrom, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo)));
SendMessageA(lpnmlv->hdr.hwndFrom, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_ListViewCompareItems);
break;
case LVN_GETDISPINFOA:
@ -1420,10 +1426,10 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
WCHAR wszNewName[MAX_PATH];
LVITEMA lvItem;
ZeroMemory(&lvItem, sizeof(LVITEMA));
lvItem.iItem = lpdi->item.iItem;
lvItem.iSubItem = 0;
lvItem.mask = LVIF_PARAM;
ListView_GetItemA(This->hWndList, &lvItem);
SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
pidl = (LPITEMIDLIST)lpdi->item.lParam;
if (!MultiByteToWideChar( CP_ACP, 0, lpdi->item.pszText, -1, wszNewName, MAX_PATH ))
@ -1434,7 +1440,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
{
lvItem.mask = LVIF_PARAM;
lvItem.lParam = (LPARAM)pidl;
ListView_SetItemA(This->hWndList, &lvItem);
SendMessageA(This->hWndList, LVM_SETITEMA, 0, (LPARAM) &lvItem);
return TRUE;
}
}
@ -1466,8 +1472,8 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
i = ListView_GetNextItem(This->hWndList, -1,
LVNI_SELECTED);
ListView_EnsureVisible(This->hWndList, i, 0);
ListView_EditLabelA(This->hWndList, i);
SendMessageW(This->hWndList, LVM_ENSUREVISIBLE, i, 0);
SendMessageW(This->hWndList, LVM_EDITLABELW, i, 0);
}
}
#if 0
@ -1503,8 +1509,8 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
item_index = ListView_GetNextItem(This->hWndList,
item_index, LVNI_SELECTED);
item.iItem = item_index;
item.mask |= LVIF_PARAM;
ListView_GetItemA(This->hWndList, &item);
item.mask = LVIF_PARAM;
SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &item);
/* get item pidl */
pItems[i] = (LPITEMIDLIST)item.lParam;
@ -1544,7 +1550,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, LONG wEventId)
{
TRACE("(%p)(%p,%p,0x%08lx)\n", This, Pidls[0], Pidls[1], wEventId);
TRACE("(%p)(%p,%p,0x%08x)\n", This, Pidls[0], Pidls[1], wEventId);
switch(wEventId)
{
case SHCNE_MKDIR:
@ -1678,7 +1684,7 @@ static ULONG WINAPI IShellView_fnAddRef(IShellView * iface)
IShellViewImpl *This = (IShellViewImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(count=%lu)\n", This, refCount - 1);
TRACE("(%p)->(count=%u)\n", This, refCount - 1);
return refCount;
}
@ -1690,7 +1696,7 @@ static ULONG WINAPI IShellView_fnRelease(IShellView * iface)
IShellViewImpl *This = (IShellViewImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(count=%li)\n", This, refCount + 1);
TRACE("(%p)->(count=%i)\n", This, refCount + 1);
if (!refCount)
{
@ -1704,8 +1710,7 @@ static ULONG WINAPI IShellView_fnRelease(IShellView * iface)
if(This->pSF2Parent)
IShellFolder2_Release(This->pSF2Parent);
if(This->apidl)
SHFree(This->apidl);
SHFree(This->apidl);
if(This->pAdvSink)
IAdviseSink_Release(This->pAdvSink);
@ -1749,7 +1754,7 @@ static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG
#if 0
IShellViewImpl *This = (IShellViewImpl *)iface;
FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam);
FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%x wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam);
#endif
if ((lpmsg->message>=WM_KEYFIRST) && (lpmsg->message>=WM_KEYLAST))
@ -1817,7 +1822,7 @@ static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface)
TRACE("(%p)\n",This);
ListView_DeleteAllItems(This->hWndList);
SendMessageW(This->hWndList, LVM_DELETEALLITEMS, 0, 0);
ShellView_FillList(This);
return S_OK;
@ -1838,7 +1843,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd);
TRACE("-- vmode=%x flags=%x left=%li top=%li right=%li bottom=%li\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
/*set up the member variables*/
This->pShellBrowser = psb;
@ -1878,7 +1883,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
*phWnd = CreateWindowExA(0,
SV_CLASS_NAME,
NULL,
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
WS_CHILD | WS_TABSTOP,
prcView->left,
prcView->top,
prcView->right - prcView->left,
@ -1892,6 +1897,9 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
if(!*phWnd) return E_FAIL;
SetWindowPos(*phWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
UpdateWindow(*phWnd);
return S_OK;
}
@ -1965,13 +1973,14 @@ static HRESULT WINAPI IShellView_fnSelectItem(
LVITEMA lvItem;
if(uFlags & SVSI_ENSUREVISIBLE)
ListView_EnsureVisible(This->hWndList, i, 0);
SendMessageW(This->hWndList, LVM_ENSUREVISIBLE, i, 0);
ZeroMemory(&lvItem, sizeof(LVITEMA));
lvItem.mask = LVIF_STATE;
lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
lvItem.iItem = 0;
lvItem.iSubItem = 0;
while(ListView_GetItemA(This->hWndList, &lvItem))
while(SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem))
{
if (lvItem.iItem == i)
{
@ -1988,13 +1997,13 @@ static HRESULT WINAPI IShellView_fnSelectItem(
if (uFlags & SVSI_DESELECTOTHERS)
lvItem.state &= ~LVIS_SELECTED;
}
ListView_SetItemA(This->hWndList, &lvItem);
SendMessageA(This->hWndList, LVM_SETITEMA, 0, (LPARAM) &lvItem);
lvItem.iItem++;
}
if(uFlags & SVSI_EDIT)
ListView_EditLabelA(This->hWndList, i);
SendMessageW(This->hWndList, LVM_EDITLABELW, i, 0);
}
return S_OK;
@ -2095,14 +2104,14 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryStatus(
UINT i;
IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n",
FIXME("(%p)->(%p(%s) 0x%08x %p %p\n",
This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText);
if (!prgCmds)
return E_POINTER;
for (i = 0; i < cCmds; i++)
{
FIXME("\tprgCmds[%d].cmdID = %ld\n", i, prgCmds[i].cmdID);
FIXME("\tprgCmds[%d].cmdID = %d\n", i, prgCmds[i].cmdID);
prgCmds[i].cmdf = 0;
}
return OLECMDERR_E_UNKNOWNGROUP;
@ -2123,7 +2132,7 @@ static HRESULT WINAPI ISVOleCmdTarget_Exec(
{
IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n",
FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08x Opt:0x%08x %p %p)\n",
This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut);
if (IsEqualIID(pguidCmdGroup, &CGID_Explorer) &&
@ -2167,7 +2176,7 @@ static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface)
{
IShellViewImpl *This = impl_from_IDropTarget(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_AddRef((IShellFolder*)This);
}
@ -2176,7 +2185,7 @@ static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface)
{
IShellViewImpl *This = impl_from_IDropTarget(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_Release((IShellFolder*)This);
}
@ -2249,10 +2258,10 @@ static HRESULT drag_notify_subitem(IShellViewImpl *This, DWORD grfKeyState, POIN
} else {
/* Query the relative PIDL of the shellfolder object represented by the currently
* dragged over listview-item ... */
ZeroMemory(&lvItem, sizeof(lvItem));
lvItem.mask = LVIF_PARAM;
lvItem.iItem = lResult;
ListView_GetItemA(This->hWndList, &lvItem);
lvItem.iSubItem = 0;
SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
/* ... and bind pCurDropTarget to the IDropTarget interface of an UIObject of this object */
hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWndList, 1,
@ -2347,7 +2356,7 @@ static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface)
{
IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_AddRef((IShellFolder*)This);
}
@ -2356,7 +2365,7 @@ static ULONG WINAPI ISVDropSource_Release( IDropSource *iface)
{
IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_Release((IShellFolder*)This);
}
@ -2414,7 +2423,7 @@ static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface)
{
IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_AddRef((IShellFolder*)This);
}
@ -2423,7 +2432,7 @@ static ULONG WINAPI ISVViewObject_Release( IViewObject *iface)
{
IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref);
TRACE("(%p)->(count=%u)\n",This,This->ref);
return IShellFolder_Release((IShellFolder*)This);
}
@ -2498,7 +2507,7 @@ static HRESULT WINAPI ISVViewObject_SetAdvise(
IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("partial stub: %p %08lx %08lx %p\n",
FIXME("partial stub: %p %08x %08x %p\n",
This, aspects, advf, pAdvSink);
/* FIXME: we set the AdviseSink, but never use it to send any advice */