MDI Children
Oka. C++ is my language.. I've made an MDI, but on the children I do not want to have the Maximize box. Now I am having troubles with this. And I've found out a couple others have aswell. Now I did solve the problem, but it created another one. See I used the SetWindowLong api to change the Window style, I can do it that way and I can disable the maximize box, but then I get refresh problems on the forms with a lower ZOrder than one on top. It'll leave prints or trails of the form on top if you move the one on the bottom. Now I'm just curious if someone has figured out how to solve this.
I use the CreateMDIWindow() function to create the MDI children. At first I used the MDICREATESTRUCT or what ever it was, but I found it easier to do it with the Create...() I try to specify the window style in the Create...() but even then, I can't get it without the Max box. Any help would be greatly appreciated.
Thanks in advance.
Phar
Doing a bit of reading on MSDN, I've found that when calling CreateMDIWindow, if the MDI client window is created with the MDIS_ALLCHILDstyleS window style, then the dwstyle parameter of CreateMDIWindow can be any combination of the window styles used in the standard CreateWindow function (which would allow you to create the window without a maximize button).
When you tried to use SetWindowLong, how were you removing the maximize box style? It sounds like you were removing other styles in addition to the one that you intended to.
When you tried to use SetWindowLong, how were you removing the maximize box style? It sounds like you were removing other styles in addition to the one that you intended to.
After changing the style with SetWindowLong try using a SetWindowPos with SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED
This will redraw the nc area (as well as the caption with the buttons on top).
This will redraw the nc area (as well as the caption with the buttons on top).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement