I wrote an Alt-Tab replacement application. I use DwmQueryThumbnailSourceSize to determine window sizes, and construct my layout. However this function is available only after I have already constructed the Dwm thumbnails. If I knew the window sizes beforehand, my application could be faster, cleaner, and more elegant.
I tried getting window size information from GetWindowRect, GetWindowPlacement, DWMWA_EXTENDED_FRAME_BOUNDS, but they all seem to return incorrect values for various situations, especially for minimized windows. Only DwmQueryThumbnailSourceSize returns the correct dimensions.
So how do I get the exact window sizes without actually calling DwmQueryThumbnailSourceSize?