how to show a message for few minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neeraj pandey
    New Member
    • Feb 2007
    • 9

    how to show a message for few minutes

    To notify user can i Show a message for few minutes through dialogs means dialog should get vanished after few minutes. I don't want to dismiss it explicitly.

    If yes , plz. tell me

    If not.... .can u tell me other way around ??


    thanks :)
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    If you are using windows you can send a WM_CLOSE message to the window you want to close. There are other ways to programatically close a window but without more information on your part I can only speculate what might be a good answer.

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      And you can set up a timer to create a timeout to close the window on.

      Comment

      • neeraj pandey
        New Member
        • Feb 2007
        • 9

        #4
        Thanku every body,
        Actually i need to display an information(jus t like notification) for few minutes to user.If i use dialog box for the same , i have to dismiss it explicitly. But i don't want so .I am looking for a mechanism through which that Pop Up box should get vanished after few minutes.I am new to MFC so plz. tell me how can i achieve it ??
        Plz. provide me the prototype for the same.


        Thank u

        Comment

        • RedSon
          Recognized Expert Expert
          • Jan 2007
          • 4980

          #5
          We told you how, now you should go to MSDN and see if any of the documentation on that sight will be useful for you. You also may benefit from reading a book about MFC from your local library. If you are still haveing problems after that please post again!

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Create you dialog box to display the notification.

            In the WM_INITDIALOG handler (which you may have to add) call SetTimer to start a timer going.

            In the WM_TIMER handler (which you will definitely have to add) call EndDialog to destroy the dialogue box.

            Comment

            • neeraj pandey
              New Member
              • Feb 2007
              • 9

              #7
              Thanks Every body,
              Now,i m able to do this

              Comment

              Working...