Hi all,

Suppose I create a normal window, and in it's clientarea I create a MDI window.
Is it possible to get rid of the Sysmenu on the MDI Window.
I tried and tried, but couldn't get rid of it.

Thanks in advance for your advise.

Friendly regards,
Posted on 2005-03-06 01:18:59 by mdevries
I haven't used it but suspect this is where to start:


using the API DeleteMenu
Posted on 2005-03-06 11:12:03 by drarem
Hi Drarem,

Thanks for your reply.
Ik have looked at DeleteMenu in the link you provided. But it handles the normal menu structure. Not the SysMenu: that is the Close- , Minimize- and Maximize buttons. So my question remains the same.

Friendly regards,
Posted on 2005-03-06 13:07:40 by mdevries
this works for me:

invoke CreateWindowEx,WS_EX_LEFT,
ADDR ClassName2,
ADDR tChild2,

The child window defaults with a caption only. There are other settings also (windows styles or ex styles) you can use to change appearance of.
Posted on 2005-03-07 10:41:55 by drarem
Well yes, you can also try this..

Sorry that it's in C but it should be easy enough to convert it. Basically you get the Window long and bitwise AND the styles you don't want out of it.

style = GetWindowLong(hwnd, GWL_STYLE);
style = style & (~WS_MAXIMIZEBOX) & (~WS_THICKFRAME);
style = style | WS_BORDER;
SetWindowLong(hwnd, GWL_STYLE, style);
/* We should repaint here perhaps, so that the Window long gets set. */

Posted on 2005-03-07 18:01:06 by drs