MessageBox() that appears and disappears automatically

This is a discussion on MessageBox() that appears and disappears automatically within the Windows Programming forums, part of the Platform Specific Boards category; How can I create a messagebox that says something like "Waiting for keypress" (it's looking for a key to be ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    USA::Colorado
    Posts
    155

    MessageBox() that appears and disappears automatically

    How can I create a messagebox that says something like "Waiting for keypress" (it's looking for a key to be pressed, for a control). And when the key is pressed, the messagebox disappears.

    How can I do this?

    **EDIT**
    I guess what I'm asking is how to close a messagebox when you have it's hwnd.


    Thanks,

    Matt
    Last edited by guitarist809; 04-17-2008 at 07:50 PM.
    ~guitarist809~

  2. #2
    Registered User
    Join Date
    Mar 2006
    Location
    USA::Colorado
    Posts
    155
    Nevermind, I figured out how to do it.

    SendMessage(hwnd,WM_CLOSE,0,0);
    ~guitarist809~

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Window appears in a flash! But also disappears as fast...
    By legit in forum Windows Programming
    Replies: 8
    Last Post: 07-04-2009, 10:30 AM
  2. 'Hello World' - window disappears as soon as I run.
    By GandyCobra in forum C Programming
    Replies: 16
    Last Post: 09-15-2004, 11:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21