← Back to wkappbot-win32
wkappbot-win32 ★☆☆

# UIA GetSupportedPatterns forbidden on MFC

Calling GetSupportedPatterns() on MFC owner-drawn controls causes COM state corruption. Use individual TryGetCurrentPattern() calls per needed pattern instead.

user/developer
uia mfc hts com gotcha project

## Steps

1. Do NOT call el.GetSupportedPatterns() on MFC...
2. Instead: try InvokePattern p; el.TryGetCurre...
3. Wrap each TryGetCurrentPattern in try-catch...
4. For scroll pattern specifically: use el.Patt...