Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/oleacc/client.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c index 636e7a1cfea..7b9d6786bb6 100644 --- a/dlls/oleacc/client.c +++ b/dlls/oleacc/client.c @@ -48,6 +48,7 @@ struct win_class_vtbl { HRESULT (*get_name)(Client*, VARIANT, BSTR*); HRESULT (*get_kbd_shortcut)(Client*, VARIANT, BSTR*); HRESULT (*get_value)(Client*, VARIANT, BSTR*); + HRESULT (*put_value)(Client*, VARIANT, BSTR); };
static HRESULT acc_client_get_name_str(WCHAR *name, UINT len, BSTR *name_out) @@ -488,10 +489,15 @@ static HRESULT WINAPI Client_put_accName(IAccessible *iface, VARIANT varID, BSTR return E_NOTIMPL; }
-static HRESULT WINAPI Client_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue) +static HRESULT WINAPI Client_put_accValue(IAccessible *iface, VARIANT id, BSTR value) { Client *This = impl_from_Client(iface); - FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&varID), debugstr_w(pszValue)); + + if (This->vtbl && This->vtbl->put_value) + return This->vtbl->put_value(This, id, value); + + FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&id), debugstr_w(value)); + return E_NOTIMPL; }
@@ -802,12 +808,25 @@ static HRESULT edit_get_value(Client *client, VARIANT id, BSTR *value_out) return S_OK; }
+static HRESULT edit_put_value(Client *client, VARIANT id, BSTR value) +{ + TRACE("(%p, %s, %s)\n", client, debugstr_variant(&id), debugstr_w(value)); + + if(convert_child_id(&id) != CHILDID_SELF || !IsWindow(client->hwnd)) + return E_INVALIDARG; + + SendMessageW(client->hwnd, WM_SETTEXT, 0, (LPARAM)value); + + return S_OK; +} + static const win_class_vtbl edit_vtbl = { edit_init, edit_get_state, edit_get_name, edit_get_kbd_shortcut, edit_get_value, + edit_put_value, };
static const struct win_class_data classes[] = {