Maximizing in MDI
Posted on 1997-11-12
I'm writting an MDI-like interface that does not use the standard windows MDI classes and procedures. I have a couple of questions involving maximizing/minimizing the MDI child (document windows).
1. I need to know how to tell when a MDI child window has be maximized, minimized, or restored. What is the best message (or messages) to "hook" for this. WM_SYSCOMMAND, WM_WINDOWPOSCHANGED or is there some other. I don't want to hook a message that occurs only in some cases, like will the SYSCOMMAND message always occur, regardless of how the window is maximized.minimized.
2. The default behavior for maximizing a window is that it enlarges to fill the parent's client area. However, it still has its title (caption). The standard MDI behavior is that the title should disappear. How should I do this? Do I want to resize the MDI child window's client area to fill its window frame (leaving no room for the title)? Do I want to change the window styles so there is no caption? (I don't even know if that can be done) Or is there a better way?
3. How does a program make a window maximize or minimize? Should is send a WM_SYSCOMMAND message to the window or is there a better way?