I am building a WPF application in C# and I want to display thumbnails of open IE tabs in a listbox. I’m essentially trying to duplicate the DWM functionality in Windows 7.

I have figured out how to enumerate a list of open tabs using Interop.ShDocVW, but in order to use the DWM API calls, I have to pass in an hwnd, and the tabs all share the same handle as Internet Explorer.
So I’ve been messing with EnumWindows and EnumChildWindows but I can’t get anything to work.
Any suggestions on how to best approach this?
The solution I went with was using
EnumWindowsandGetWindowTextfrom the Win32 API. I enumerate through Internet Explorer windows usingshdocvw.dlland pass the tab’s caption to a method that parses the results ofGetWindowTextto find the hwnd of the window with that caption.This works for all IE windows, not just tabs.