CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Posts
    19

    Howto resize and move a dialog?

    Hiya!

    I have created a modal dialog and wants it to be in the upper left corner of the screen and have its size as in the resource editor.
    I have tried to put MoveWindow in OnInitDialog but that doesn't work.

    Anyone got any idea?

    Thanks
    Magnus


  2. #2
    Join Date
    Apr 1999
    Posts
    21

    Re: Howto resize and move a dialog?

    Hi, try using SetWindowPos() instead of MoveWindow().

    SetWindowPos(NULL, newX, newY, 0, 0, SWP_NOSIZE|SWP_NOZORDER);

    Using the flags SWP_NOSIZE|SWP_NOZORDER, the window just will move.

    Fabian


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