How to detect if an application window is set to 'always on top' / 'top most' (that is not part of my application)?
I am enumerating through all visible application windows on a system and I want to determine which ones are set to 'always on top' / 'top most'.
My application needs to determine this as it positions various third party applications on a large monitor for fast data entry.
I'm happy with a P开发者_StackOverflow/Invoke solution.
You'll need to P/Invoke GetWindowLongPtr() to get the extended style of the window (GWL_EXSTYLE = -20) and check if the WS_EX_TOPMOST style is turned on (0x08). Visit pinvoke.net for the declarations.
精彩评论