Commit 90b9c2fd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32/shellview: Implemented IFolderView::GetSelectionMarkedItem() with basic test.

parent 4261aaff
...@@ -2739,9 +2739,13 @@ static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, ...@@ -2739,9 +2739,13 @@ static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid,
static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *item) static HRESULT WINAPI IFView_GetSelectionMarkedItem(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_GETSELECTIONMARK, 0, 0);
return S_OK;
} }
static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item) static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item)
......
...@@ -298,6 +298,11 @@ static const struct message folderview_getspacing_seq[] = { ...@@ -298,6 +298,11 @@ static const struct message folderview_getspacing_seq[] = {
{ 0 } { 0 }
}; };
static const struct message folderview_getselectionmarked_seq[] = {
{ LVM_GETSELECTIONMARK, sent },
{ 0 }
};
static void test_IShellView_CreateViewWindow(void) static void test_IShellView_CreateViewWindow(void)
{ {
IShellFolder *desktop; IShellFolder *desktop;
...@@ -344,7 +349,7 @@ static void test_IFolderView(void) ...@@ -344,7 +349,7 @@ static void test_IFolderView(void)
IFolderView *fv; IFolderView *fv;
HWND hwnd_view, hwnd_list; HWND hwnd_view, hwnd_list;
HRESULT hr; HRESULT hr;
DWORD ret; INT ret;
POINT pt; POINT pt;
RECT r; RECT r;
...@@ -371,6 +376,9 @@ if (0) ...@@ -371,6 +376,9 @@ if (0)
{ {
/* crashes on Vista and Win2k8 - List not created yet case */ /* crashes on Vista and Win2k8 - List not created yet case */
hr = IFolderView_GetSpacing(fv, &pt); hr = IFolderView_GetSpacing(fv, &pt);
/* crashes on XP */
hr = IFolderView_GetSelectionMarkedItem(fv, NULL);
} }
browser = IShellBrowserImpl_Construct(); browser = IShellBrowserImpl_Construct();
...@@ -414,6 +422,19 @@ if (0) ...@@ -414,6 +422,19 @@ if (0)
ok(pt.x == LOWORD(ret) && pt.y == HIWORD(ret), "got (%d, %d)\n", LOWORD(ret), HIWORD(ret)); ok(pt.x == LOWORD(ret) && pt.y == HIWORD(ret), "got (%d, %d)\n", LOWORD(ret), HIWORD(ret));
} }
/* IFolderView::GetSelectionMarkedItem */
if (0)
{
/* crashes on XP */
hr = IFolderView_GetSelectionMarkedItem(fv, NULL);
}
flush_sequences(sequences, NUM_MSG_SEQUENCES);
hr = IFolderView_GetSelectionMarkedItem(fv, &ret);
ok(hr == S_OK, "got (0x%08x)\n", hr);
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq,
"IFolderView::GetSelectionMarkedItem", 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