Why can't I tile and cascade captionless windows?
I have several child windows, all with the same parent. I want to cascade/tile these windows and was happy to find the TileWind开发者_运维技巧ows and CascadeWindows functions. But they don't seem to work on my windows if they don't have a caption (and they don't have one)! With caption everything is fine. Why is this?
Those are functions that were designed to work with MDI child windows. An MDI child window must have a caption. If they work with non-MDI child windows too (haven't tried) then surely Windows avoids moving a window that cannot easily be moved back by the user.
Windows allows to tile / cascade windows only if the wsCaption flag of a window is set. This has to do with the original purpose, namely that these functions are mainly used in MDI applications. In addition these functions can also be used on a set of top level windows (right clicking on the task bar gives you respective menu entries) which typically have a titlebar.
精彩评论