private static BOOL RegisterACWindowRecursive(IntPtr handle) { if (!s_ACWindows.ContainsKey(handle)) { ACNativeWindow newAC = new ACNativeWindow(handle); } return(BOOL.TRUE); }
private BOOL Callback(IntPtr hWnd) { HandleRef hRef = new HandleRef(null, hWnd); // Check class name and see if it's visible if (GetClassName(hRef) == AutoCompleteClassName) { ACNativeWindow.RegisterACWindow(hRef.Handle, _shouldSubClass); } return(BOOL.TRUE); }
internal void FindDropDowns(bool subclass) { if (!subclass) { //generating a before snapshot -- lets lose the null handles ACNativeWindow.ClearNullACWindows(); } // Look for a popped up dropdown _shouldSubClass = subclass; EnumThreadWindows( Kernel32.GetCurrentThreadId(), Callback); }
internal static void RegisterACWindow(IntPtr acHandle, bool subclass) { if (subclass && s_ACWindows.ContainsKey(acHandle)) { if (s_ACWindows[acHandle] is null) { s_ACWindows.Remove(acHandle); //if an external handle got destroyed, don't let it stop us. } } if (!s_ACWindows.ContainsKey(acHandle)) { if (subclass) { ACNativeWindow newAC = new ACNativeWindow(acHandle); } else { s_ACWindows.Add(acHandle, null); } } }
internal static void RegisterACWindow(IntPtr acHandle, bool subclass) { if (subclass && ACWindows.ContainsKey(acHandle)) { if (ACWindows[acHandle] == null) { ACWindows.Remove(acHandle); //if an external handle got destroyed, dont let it stop us. } } if (!ACWindows.ContainsKey(acHandle)) { if (subclass) { ACNativeWindow newAC = new ACNativeWindow(acHandle); } else { ACWindows.Add(acHandle, null); } } }
private static bool RegisterACWindowRecursive(IntPtr handle, IntPtr lparam) { if (!ACWindows.ContainsKey(handle)) { ACNativeWindow newAC = new ACNativeWindow(handle); } return true; }