Commit 8c92ba00 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32/shellview: Implemented IFolderView::GetFocusedItem.

parent 90b9c2fd
...@@ -2751,8 +2751,12 @@ static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *ite ...@@ -2751,8 +2751,12 @@ static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *ite
static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item) static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item)
{ {
IShellViewImpl *This = impl_from_IFolderView(iface); IShellViewImpl *This = impl_from_IFolderView(iface);
FIXME("(%p)->(%p), stub\n", This, item);
return E_NOTIMPL; 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) static HRESULT WINAPI IFView_GetItemPosition(IFolderView *iface, PCUITEMID_CHILD pidl, POINT *ppt)
......
...@@ -303,6 +303,11 @@ static const struct message folderview_getselectionmarked_seq[] = { ...@@ -303,6 +303,11 @@ static const struct message folderview_getselectionmarked_seq[] = {
{ 0 } { 0 }
}; };
static const struct message folderview_getfocused_seq[] = {
{ LVM_GETNEXTITEM, sent|wparam|lparam, -1, LVNI_FOCUSED },
{ 0 }
};
static void test_IShellView_CreateViewWindow(void) static void test_IShellView_CreateViewWindow(void)
{ {
IShellFolder *desktop; IShellFolder *desktop;
...@@ -379,6 +384,7 @@ if (0) ...@@ -379,6 +384,7 @@ if (0)
/* crashes on XP */ /* crashes on XP */
hr = IFolderView_GetSelectionMarkedItem(fv, NULL); hr = IFolderView_GetSelectionMarkedItem(fv, NULL);
hr = IFolderView_GetFocusedItem(fv, NULL);
} }
browser = IShellBrowserImpl_Construct(); browser = IShellBrowserImpl_Construct();
...@@ -435,6 +441,13 @@ if (0) ...@@ -435,6 +441,13 @@ if (0)
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq, ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq,
"IFolderView::GetSelectionMarkedItem", FALSE); "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); IShellBrowser_Release(browser);
IFolderView_Release(fv); IFolderView_Release(fv);
IShellView_Release(view); IShellView_Release(view);
......
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