Mikołaj Zalewski : shell32: autocomplete: Implement GetDropDownStatus.

Alexandre Julliard julliard at winehq.org
Thu Sep 18 07:56:06 CDT 2008


Module: wine
Branch: master
Commit: d9190052a2ff07793e8d2e8676ad0df8cc1da24f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d9190052a2ff07793e8d2e8676ad0df8cc1da24f

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Wed Sep 17 21:42:46 2008 +0200

shell32: autocomplete: Implement GetDropDownStatus.

---

 dlls/shell32/autocomplete.c |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 8901e8f..da11b25 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -361,15 +361,36 @@ static HRESULT WINAPI IAutoCompleteDropDown_fnGetDropDownStatus(
     LPWSTR *ppwszString)
 {
     IAutoCompleteImpl *This = impl_from_IAutoCompleteDropDown(iface);
+    BOOL dropped;
 
-    FIXME("(%p) -> (%p, %p): stub\n", This, pdwFlags, ppwszString);
+    TRACE("(%p) -> (%p, %p)\n", This, pdwFlags, ppwszString);
+
+    dropped = IsWindowVisible(This->hwndListBox);
 
     if (pdwFlags)
-        *pdwFlags = 0;
-    if (ppwszString)
-        *ppwszString = NULL;
+        *pdwFlags = (dropped ? ACDD_VISIBLE : 0);
+
+    if (ppwszString) {
+        if (dropped) {
+            int sel;
+
+            sel = SendMessageW(This->hwndListBox, LB_GETCURSEL, 0, 0);
+            if (sel >= 0)
+            {
+                DWORD len;
+
+                len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, 0);
+                *ppwszString = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
+                SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)*ppwszString);
+            }
+            else
+                *ppwszString = NULL;
+        }
+        else
+            *ppwszString = NULL;
+    }
 
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 /**************************************************************************




More information about the wine-cvs mailing list