Do we still have a limit of 255 controls per dialog?

Parchevsky, Konstantin 0 Reputation points
2023-07-24T17:10:41.9933333+00:00

Hello.

I was creating a C++ dialog in the resource editor (Visual Studio 2017). I got a warning that my dialog contains more than 255 controls. Do we still have this limitation in Visual Studio 2017?

Thank you.

Konstantin

Developer technologies | C++
{count} votes

3 answers

Sort by: Most helpful
  1. Minxin Yu 13,506 Reputation points Microsoft External Staff
    2023-07-25T02:47:00.8766667+00:00

    Hi, @Parchevsky, Konstantin

    I do not have Visual Studio 2017 to test.

    But in Visual Studio 2022, I am able to create more than 255 controls.
    Please consider using the latest Visual Studio.

    enter image description here

    enter image description here

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Castorix31 90,686 Reputation points
    2023-07-25T09:52:08.65+00:00

    It was an old limit of Dialog Box Template, which does not exist anymore.

    From old MSDN docs :

    "

    Windows 95/98/Me:The system can support a maximum of 255 controls per dialog box template. To place more than 255 controls in a dialog box, create the controls in the WM_INITDIALOG message handler rather than placing them in the template.

    "

    0 comments No comments

  3. RLWA32 49,641 Reputation points
    2023-07-25T13:31:44.42+00:00

    In VS2017 15.9.55 the dialog editor inserted over 255 controls without complaint. There were also no error messages or warnings when building.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.