CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Location
    Marseille, France
    Posts
    94

    [RESOLVED] Add Maximize property before creating a CDialog herited window

    Hi,

    In my code, i have a customed CDialog class, for some reasons in a customed CBitmapButton, I need to add a maximized property on my cdialog before each other component (button, edit...) is created.

    Adding "ShowWindow(SW_SHOWMAXIMIZED);" in OnInitDialog function isn't what i'm looking for

    thanks for your help.

  2. #2
    Join Date
    Jan 2006
    Location
    Marseille, France
    Posts
    94

    Re: Add Maximize property before creating a CDialog herited window

    ok, i found what i wanted here

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Add Maximize property before creating a CDialog herited window

    Add style WS_MAXIMIZE after dialog creation but before showing it - add this line in your dialog OnInitDialog handler after CDialog::OnInitDialog call:
    Code:
    <your_dialog_class>::OnInitDialog()
    {
            CDialog::OnInitDialog();
            ..........
            ModifyStyle(0, WS_MAXIMIZE);
           return TRUE;
    }

  4. #4
    Join Date
    Jan 2006
    Location
    Marseille, France
    Posts
    94

    Re: [RESOLVED] Add Maximize property before creating a CDialog herited window

    I already tried it, but, window stay the same with this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured