i have created a window with a button but what i want to do when i press the button is delete or hide the Minimize, Maximaize and close buttons at the top right of the window now the thing is i know how to do this when i make the window structure but i would like to do this when and only when i press the button but cant seem to find out how i have tried some example from google but none seem to work
anyway any help or advice will very much be appreciated

Thanks in advance

I think it goes along the lines of ..

// Get current style
LONG dwStyle = GetWindowLong(hWnd, GWL_STYLE);
// Drop WS_SYSMENU
dwStyle &= ~WS_SYSMENU;
// Apply current style
SetWindowLong(hWnd, GWL_STYLE, dwStyle);

and immediately after that, use SetWindowPos() speficying the SWP_FRAMECHANGED flag.

Although, note that this also gets rid of the window's system menu (as implied by the style name).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.