shell32/shellview: Implemented IFolderView::GetFocusedItem.
This commit is contained in:
parent
90b9c2fd39
commit
8c92ba009d
|
@ -2750,9 +2750,13 @@ static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *ite
|
|||
|
||||
static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, item);
|
||||
return E_NOTIMPL;
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, item);
|
||||
|
||||
*item = SendMessageW(This->hWndList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetItemPosition(IFolderView *iface, PCUITEMID_CHILD pidl, POINT *ppt)
|
||||
|
|
|
@ -303,6 +303,11 @@ static const struct message folderview_getselectionmarked_seq[] = {
|
|||
{ 0 }
|
||||
};
|
||||
|
||||
static const struct message folderview_getfocused_seq[] = {
|
||||
{ LVM_GETNEXTITEM, sent|wparam|lparam, -1, LVNI_FOCUSED },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static void test_IShellView_CreateViewWindow(void)
|
||||
{
|
||||
IShellFolder *desktop;
|
||||
|
@ -379,6 +384,7 @@ if (0)
|
|||
|
||||
/* crashes on XP */
|
||||
hr = IFolderView_GetSelectionMarkedItem(fv, NULL);
|
||||
hr = IFolderView_GetFocusedItem(fv, NULL);
|
||||
}
|
||||
|
||||
browser = IShellBrowserImpl_Construct();
|
||||
|
@ -435,6 +441,13 @@ if (0)
|
|||
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq,
|
||||
"IFolderView::GetSelectionMarkedItem", FALSE);
|
||||
|
||||
/* IFolderView::GetFocusedItem */
|
||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||
hr = IFolderView_GetFocusedItem(fv, &ret);
|
||||
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getfocused_seq,
|
||||
"IFolderView::GetFocusedItem", FALSE);
|
||||
|
||||
IShellBrowser_Release(browser);
|
||||
IFolderView_Release(fv);
|
||||
IShellView_Release(view);
|
||||
|
|
Loading…
Reference in New Issue