Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/oleacc/client.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c index 1cfbc7cd8cc..38a3111ac04 100644 --- a/dlls/oleacc/client.c +++ b/dlls/oleacc/client.c @@ -32,6 +32,7 @@ typedef struct { HRESULT (*get_name)(IAccessible *, VARIANT, BSTR *); HRESULT (*get_kbd_shortcut)(IAccessible *, VARIANT, BSTR *); HRESULT (*get_value)(IAccessible *, VARIANT, BSTR *); + HRESULT (*put_value)(IAccessible *, VARIANT, BSTR); } WinClassVtbl;
typedef struct { @@ -496,7 +497,12 @@ static HRESULT WINAPI Client_put_accName(IAccessible *iface, VARIANT varID, BSTR static HRESULT WINAPI Client_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue) { Client *This = impl_from_Client(iface); + FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&varID), debugstr_w(pszValue)); + + if (This->vtbl.put_value) + return This->vtbl.put_value(iface, varID, pszValue); + return E_NOTIMPL; }
@@ -848,6 +854,20 @@ static HRESULT edit_get_value(IAccessible *iface, VARIANT var_id, BSTR *out_valu return S_OK; }
+static HRESULT edit_put_value(IAccessible *iface, VARIANT var_id, BSTR value) +{ + Client *This = impl_from_Client(iface); + + TRACE("(%p)->(%s %s)\n", This, debugstr_variant(&var_id), debugstr_w(value)); + + if(convert_child_id(&var_id) != CHILDID_SELF || !IsWindow(This->hwnd)) + return E_INVALIDARG; + + SendMessageW(This->hwnd, WM_SETTEXT, 0, (LPARAM)value); + + return S_OK; +} + HRESULT create_edit_client_object(HWND hwnd, const IID *iid, void **obj) { IAccessible *acc; @@ -863,6 +883,7 @@ HRESULT create_edit_client_object(HWND hwnd, const IID *iid, void **obj) client->vtbl.get_name = &edit_get_name; client->vtbl.get_kbd_shortcut = &edit_get_kbd_shortcut; client->vtbl.get_value = &edit_get_value; + client->vtbl.put_value = &edit_put_value;
hres = IAccessible_QueryInterface(acc, iid, obj); IAccessible_Release(acc);