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

    show a message box without waiting for any user-action



    I want to display a message box during the program does a time-intensive action. If I use the MessageBox() - function or if i use a resource constructed box with the DModal() - function, the program stops and waits for a user action.


    What kind of function can I use to get this:


    {

    program shows a message-box <-- ?????


    program does some action, message-box is displayed


    program clears message box <-- ?????

    }

  2. #2
    Join Date
    Apr 1999
    Posts
    43

    Re: show a message box without waiting for any user-action



    There is a timermessagebox on this site othervise you have to show a normal window.


    Mike

  3. #3
    Join Date
    Apr 1999
    Posts
    32

    Re: show a message box without waiting for any user-action



    Don't call DoModal(), use Create() and ShowWindow(). This

    will create a modeless dialog for you.

    CDialog *pDlg = new CDialog();

    if (pDlg)

    {

    if (0 != pDlg-&gt;Create(IDD_MYDIALOG, this))

    {

    pDlg-&gt;ShowWindow(SW_SHOW);

    }

    }



    Remember to delete the object (unless you decide to create it

    on the stack).

  4. #4

    Re: show a message box without waiting for any user-action



    Many thanks for your help, it works fine!

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