PRB: Can't Remove Minimize or Maximize Button from Caption Bar

Last reviewed: September 29, 1995
Article ID: Q130760
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SYMPTOMS

Under Windows 95, applications cannot create an overlapped or a popup window that contains only the Minimize or the Maximize button.

CAUSE

This is by design. Windows can have both buttons or none depending on the styles specified while creating the window, but specifying just one style (either the WS_MAXIMZIEBOX or WS_MINIMIZEBOX) creates both buttons on the caption, with the other one disabled.

STATUS

This behavior is by design.

MORE INFORMATION

Under Windows version 3.1 or Window NT, applications could remove either the Maximize or Minimize buttons on the caption bar. (This was usually done when the appliction removed a corresponding menu item from the system menu of a window.)

Applications running under Windows 95 that try to remove one of the buttons (not both), will not succeed. The system displays both buttons and disable the one whose style was not specified during creation. This is by design, and there is no way to work around it, unless the application draws its own caption bar.

Applications that removed the maximize or minimize menu items under Windows version 3.1, should just gray them out (disable them) under Windows 95 to maintain a uniform user interface.

Under Windows 95, applications can create a window (overlapped or popup) with just the Close button (the X button) by creating the window without specifying the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. Calling SetWindowLong(GWL_STYLE) to change or remove the minimize of the maxmize buttons dynamically still displays both buttons with one of them disabled.


Additional reference words: 4.00 user
KBCategory: kbui kbprb
KBSubcategory: UsrWndw


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.