CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How to modify size of a dialog based application?

    I have a dialog based application that is very similar to "Find" of the Windows Explorer. When I start the application I want the dialog to have a size such that a list control at the bottom is hidden until I press the button "Find". At this time I want to resize my dialog (application window) and display the results in my list control. How can I achieve this? I have tried MoveWindow and SetWIndowPos and none of them work. Any help will be greatly appreciated. Thanks,
    KAF


  2. #2
    Join Date
    Apr 1999
    Location
    WA, USA
    Posts
    15

    another way to do it, instead of resizing.

    //Instead of resizing the window, you may do the following.

    class CMyDlg: public CDialog
    {

    ....
    ....
    CListCtrl m_list;
    .....
    ...
    ..
    ...
    ..
    };

    void CMyDialog::OnInitDialog()
    {

    ...
    ...
    //add the following line.
    m_list.ShowWindow(SW_HIDE);
    }

    void CMyDialog::OnFind()
    {
    ...
    //add the following line.
    m_list.ShowWindow(SW_SHOW);
    }



  3. #3
    Join Date
    Apr 1999
    Posts
    16

    Re: How to modify size of a dialog based application?

    MoveWindow must work.
    Try to write after it
    PostMessage(WM_PAINT);


    WBR Oak

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