I have a button called CWnd
-derived class named and want to use the CWnd
accessibility CWnd
, I redefine this function in my class:
virtual HRESULT get_accName(VARIANT varChild, BSTR *pszName); virtual HRESULT get_accChildCount(long *pcountChildren); virtual HRESULT get_accDefaultAction(VARIANT varChild, BSTR *pszDefaultAction); virtual HRESULT get_accDescription(VARIANT varChild, BSTR *pszDescription); virtual HRESULT get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKeyboardShortcut); virtual HRESULT get_accParent(IDispatch **ppdispParent); virtual HRESULT get_accRole(VARIANT varChild, VARIANT *pvarRole); virtual HRESULT get_accState(VARIANT varChild, VARIANT *pvarState); virtual HRESULT get_accValue(VARIANT varChild, BSTR *pszValue);
When I run the program and set a break in the implementation of any of these functions, the program does not introduce these functions and instead uses the parent function, can someone help me?
get_accName implementation:
HRESULT Button::get_accName(VARIANT varChild, BSTR *pszName) { //*pszName = SysAllocString(lpstrTitle); return S_OK; }
I call EnableActiveAccessibility()
in the constructor of this class, but it still does not work.
source share