Home > other >  Minimize/Maximize Box greyed out in MFC Dialog editor
Minimize/Maximize Box greyed out in MFC Dialog editor

Time:10-08

I have a MFC dialog (CDialog) that I would like to add a maximize button to via the Visual Studio 2019 Dialog Editor.

However, the Minimize/Maximize Box options in the properties window for the dialog (in the editor) are greyed out. I have changed the Border to Resizing, which work fine.

Why can't I enable Maximize Box property?

These are the properties for the dialog:

enter image description here

CodePudding user response:

In order for your dialog box to have either the "Maximize Box" or "Minimize Box" (or to customize whether either or both of these are present/enabled), that dialog must have a "System Menu".

From the screen-shot you have posted, it is apparent that yours does not have that option set.

So, to enable the "Maximize Box" or "Minimize Box" options, you must first enable the "System Menu" option (6 properties down from "Minimize Box").

Related reading: Windows Styles (see the section on the WS_MAXIMIZEBOX style).

  • Related