Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 3085

Nasty gotcha: Positioning your window beneath a topmost window makes it topmost

$
0
0

There’s a nasty gotcha with the Defer­Window­Pos function, and therefore any functions built on top of it, such as Set­Window­Pos: If you specify a hwndInsertAfter, and the insert-after window is topmost, then the window being positioned will be placed immediately after that window.

So far so good.

The hidden gotcha is that the window will be placed in the same zone as the insert-after window, which is the topmost zone.

In other words, the window will be made topmost, even if it wasn’t topmost previously.

Which is probably not what you were expecting.

The post Nasty gotcha: Positioning your window beneath a topmost window makes it topmost appeared first on The Old New Thing.


Viewing all articles
Browse latest Browse all 3085

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>