CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    Austria
    Posts
    116

    Hide a modal Dialog

    I tried to Hide a Modal-Dialog in his OnInitDialog-Function (with ShowDialog(SW_HIDE) but it didnt work. I tried some other things like setting the Size to 0,0,0,0 or clearing the visible flag in his Properties but the Dialog ignored it. Why ???
    Is there a possibility to hide the Dialog at the Moment of creating without using a Timer or so ?


  2. #2
    Join Date
    May 1999
    Posts
    12

    Re: Hide a modal Dialog

    Use ShowWindow(SW_HIDE) in the OnPaint. If you want to activate it later then have a condition in the OnPaint so that the ShowWindow is not called everytime
    CMyDialog::OnPaint()
    {
    if(bCanShow == FALSE)
    {
    ShowWindow(SW_HIDE);
    }
    }
    I hope this helps
    regs
    Rao


  3. #3
    Join Date
    May 1999
    Location
    Austria
    Posts
    116

    Thanks

    Thanks for your Answer!!!

    But what is the reason that it dont work in the OnInitDialog ??

    reg DiDi


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