CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2005
    Posts
    1,828

    Resizing an MFC DialogBox

    I want to DISABLE resizing of an MFC DialogBox so what kind of change do I have to make while Overriding WM_SIZE or WM_POSITIONCHANGED handlers?

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

    Re: Resizing an MFC DialogBox

    Easier would be overriding (handling) the WM_POSITIONCHANGING message adding the SWP_NOSIZE flag. Similar to http://www.codeguru.com/forum/showth...HANGing&page=3
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: Resizing an MFC DialogBox

    ...or simply get rid of WS_THICKFRAME style.
    Code:
       ModifyStyle(WS_THICKFRAME, 0, SWP_FRAMECHANGED);
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Resizing an MFC DialogBox

    Or even easier, just change the border style in the resource editor.

  5. #5
    Join Date
    Sep 2011
    Posts
    3

    Re: Resizing an MFC DialogBox

    Chang the dialog border style from resizing to dialog frame or none.

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